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, Deinitable, Movable, Sized, Writable
Methods
Section titled “Methods”__init__
Section titled “__init__”fn def __init__(out self)Args:
- self (
Self)
Returns:
Self
fn def add(mut self, var key: BString, var value: BString)Append a key-value pair.
Args:
- self (
Self) - key (
BString) - value (
BString)
add_multi
Section titled “add_multi”fn def add_multi(mut self, var key: BString, var values: List[BString])Append a key with multiple values (GFF3 comma-separated).
Args:
- self (
Self) - key (
BString) - values (
List[BString])
fn def get(ref self, key: String) -> Optional[BString]Return first value for key, if any.
Args:
- self (
Self) - key (
String)
Returns:
Optional[BString]
get_all
Section titled “get_all”fn 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[BString]
__len__
Section titled “__len__”fn def __len__(self) -> IntArgs:
- self (
Self)
Returns:
Int
fn def id(ref self) -> Optional[BString]ID attribute — unique feature identifier.
Args:
- self (
Self)
Returns:
Optional[BString]
fn def name(ref self) -> Optional[BString]Name attribute — display name of the feature.
Args:
- self (
Self)
Returns:
Optional[BString]
parent
Section titled “parent”fn def parent(ref self) -> List[BString]Parent attribute — part-of relationships (multi-value).
Args:
- self (
Self)
Returns:
List[BString]
aliases
Section titled “aliases”fn def aliases(ref self) -> List[BString]Alias attribute — secondary names (multi-value).
Args:
- self (
Self)
Returns:
List[BString]
fn def note(ref self) -> Optional[BString]Note attribute — free-text description.
Args:
- self (
Self)
Returns:
Optional[BString]
derives_from
Section titled “derives_from”fn def derives_from(ref self) -> Optional[BString]Derives_from attribute — processed from relationship.
Args:
- self (
Self)
Returns:
Optional[BString]
dbxref
Section titled “dbxref”fn def dbxref(ref self) -> List[BString]Dbxref attribute — database cross-references (multi-value).
Args:
- self (
Self)
Returns:
List[BString]
ontology_term
Section titled “ontology_term”fn def ontology_term(ref self) -> List[BString]Ontology_term attribute — controlled vocabulary terms (multi-value).
Args:
- self (
Self)
Returns:
List[BString]
is_circular
Section titled “is_circular”fn 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”fn 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)