GtfView
Mojo struct 🡭
GtfView
Section titled “GtfView”@memory_onlystruct GtfView[O: Origin[mut=O.mut]]Zero-copy view over one GTF data line.
Lifetime: Valid only until the next parser read. Do not store;
call .to_record() when the record must outlive the current iteration.
Coordinates are 1-based inclusive.
Parameters
Section titled “Parameters”- O (
Origin)
Fields
Section titled “Fields”- start (
UInt64) - end (
UInt64) - score (
Optional[Float64]) - strand (
Optional[GtfStrand]) - phase (
Optional[UInt8])
Implemented traits
Section titled “Implemented traits”AnyType, ImplicitlyDestructible, Movable
Methods
Section titled “Methods”__init__
Section titled “__init__”def __init__(out self, _seqid: Span[UInt8, O], _source: Span[UInt8, O], _type: Span[UInt8, O], start: UInt64, end: UInt64, score: Optional[Float64], strand: Optional[GtfStrand], phase: Optional[UInt8], _attributes: Span[UInt8, O])Args:
- _seqid (
Span) - _source (
Span) - _type (
Span) - start (
UInt64) - end (
UInt64) - score (
Optional) - strand (
Optional) - phase (
Optional) - _attributes (
Span) - self (
Self)
Returns:
Self
def seqid(self) -> StringSlice[O]Args:
- self (
Self)
Returns:
StringSlice
source
Section titled “source”def source(self) -> StringSlice[O]Args:
- self (
Self)
Returns:
StringSlice
feature_type
Section titled “feature_type”def feature_type(self) -> StringSlice[O]Args:
- self (
Self)
Returns:
StringSlice
attributes_span
Section titled “attributes_span”def attributes_span(self) -> Span[UInt8, O]Args:
- self (
Self)
Returns:
Span
start_position
Section titled “start_position”def start_position(self) -> PositionArgs:
- self (
Self)
Returns:
Position
end_position
Section titled “end_position”def end_position(self) -> PositionArgs:
- self (
Self)
Returns:
Position
interval
Section titled “interval”def interval(self) -> IntervalArgs:
- self (
Self)
Returns:
Interval
to_record
Section titled “to_record”def to_record(self) -> GtfRecordMaterialize an owned GtfRecord by parsing attributes from column 9.
Args:
- self (
Self)
Returns:
GtfRecord
Raises: