Gff3Attributes
Mojo struct 🡭
Gff3Attributes
Section titled “Gff3Attributes”@memory_onlystruct Gff3AttributesParsed GFF3 attributes: list of (key, list of values).
Provides typed accessors for GFF3 reserved attributes (ID, Name, Parent, Alias, Note, Derives_from, Dbxref, Ontology_term, Is_circular) in addition to generic get() / get_all() access.
Implemented traits
Section titled “Implemented traits”AnyType, Copyable, ImplicitlyDestructible, Movable, Sized, Writable
Methods
Section titled “Methods”__init__
Section titled “__init__”def __init__(out self)Args:
- self (
Self)
Returns:
Self
def __init__(out self, *, copy: Self)Args:
- copy (
Self) - self (
Self)
Returns:
Self
def add(mut self, key: BString, value: BString)Append a key-value pair.
Args:
- self (
Self) - key (
BString) - value (
BString)
add_multi
Section titled “add_multi”def add_multi(mut self, key: BString, values: List[BString])Append a key with multiple values (GFF3 comma-separated).
Args:
- self (
Self) - key (
BString) - values (
List)
def get(ref self, key: String) -> Optional[BString]Return first value for key, if any.
Args:
- self (
Self) - key (
String)
Returns:
Optional
get_all
Section titled “get_all”def get_all(ref self, key: String) -> List[BString]Return all values for key (GFF3 multi-value attributes).
Args:
- self (
Self) - key (
String)
Returns:
List
__len__
Section titled “__len__”def __len__(self) -> IntArgs:
- self (
Self)
Returns:
Int
def id(ref self) -> Optional[BString]ID attribute — unique feature identifier.
Args:
- self (
Self)
Returns:
Optional
def name(ref self) -> Optional[BString]Name attribute — display name of the feature.
Args:
- self (
Self)
Returns:
Optional
parent
Section titled “parent”def parent(ref self) -> List[BString]Parent attribute — part-of relationships (multi-value).
Args:
- self (
Self)
Returns:
List
aliases
Section titled “aliases”def aliases(ref self) -> List[BString]Alias attribute — secondary names (multi-value).
Args:
- self (
Self)
Returns:
List
def note(ref self) -> Optional[BString]Note attribute — free-text description.
Args:
- self (
Self)
Returns:
Optional
derives_from
Section titled “derives_from”def derives_from(ref self) -> Optional[BString]Derives_from attribute — processed from relationship.
Args:
- self (
Self)
Returns:
Optional
dbxref
Section titled “dbxref”def dbxref(ref self) -> List[BString]Dbxref attribute — database cross-references (multi-value).
Args:
- self (
Self)
Returns:
List
ontology_term
Section titled “ontology_term”def ontology_term(ref self) -> List[BString]Ontology_term attribute — controlled vocabulary terms (multi-value).
Args:
- self (
Self)
Returns:
List
is_circular
Section titled “is_circular”def is_circular(ref self) -> BoolIs_circular attribute — True if the feature is circular.
Args:
- self (
Self)
Returns:
Bool
write_to
Section titled “write_to”def write_to[w: Writer](ref self, mut writer: w)Emit attributes in GFF3 format: key=value;key=val1,val2
Parameters:
- w (
Writer)
Args:
- self (
Self) - writer (
w)