GtfAttributes
Mojo struct 🡭
GtfAttributes
Section titled “GtfAttributes”@memory_onlystruct GtfAttributesParsed GTF column 9 attributes.
gene_id and transcript_id are mandatory GTF2.2 fields stored directly. All other attributes are in _extras as single-value key-value pairs.
Fields
Section titled “Fields”- gene_id (
BString) - transcript_id (
BString)
Implemented traits
Section titled “Implemented traits”AnyType, Copyable, ImplicitlyDestructible, Movable, Sized, Writable
Methods
Section titled “Methods”__init__
Section titled “__init__”def __init__(out self, var gene_id: BString, var transcript_id: BString)Args:
- gene_id (
BString) - transcript_id (
BString) - self (
Self)
Returns:
Self
def __init__(out self, *, copy: Self)Args:
- copy (
Self) - self (
Self)
Returns:
Self
def get(ref self, key: String) -> Optional[BString]Return the value for the given attribute key, if any.
Args:
- self (
Self) - key (
String)
Returns:
Optional
__len__
Section titled “__len__”def __len__(self) -> IntArgs:
- self (
Self)
Returns:
Int
write_to
Section titled “write_to”def write_to[w: Writer](ref self, mut writer: w)Emit attributes in GTF format: gene_id ”…”; transcript_id ”…”; …
Parameters:
- w (
Writer)
Args:
- self (
Self) - writer (
w)