Skip to content

GtfView

Mojo struct 🡭

@memory_only
struct 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.

  • O (Origin)
  • start (UInt64)
  • end (UInt64)
  • score (Optional[Float64])
  • strand (Optional[GtfStrand])
  • phase (Optional[UInt8])

AnyType, ImplicitlyDestructible, Movable

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

def source(self) -> StringSlice[O]

Args:

  • self (Self)

Returns:

StringSlice

def feature_type(self) -> StringSlice[O]

Args:

  • self (Self)

Returns:

StringSlice

def attributes_span(self) -> Span[UInt8, O]

Args:

  • self (Self)

Returns:

Span

def start_position(self) -> Position

Args:

  • self (Self)

Returns:

Position

def end_position(self) -> Position

Args:

  • self (Self)

Returns:

Position

def interval(self) -> Interval

Args:

  • self (Self)

Returns:

Interval

def to_record(self) -> GtfRecord

Materialize an owned GtfRecord by parsing attributes from column 9.

Args:

  • self (Self)

Returns:

GtfRecord

Raises: