Skip to content

GtfParser

Mojo struct 🡭

@memory_only
struct GtfParser[R: Reader]

Streaming GTF2.2 parser. Yields GtfView / GtfRecord.

Pass strict_mandatory_attrs=True to raise an error when gene_id or transcript_id is absent from a feature line, as required by GTF2.2.

  • R (Reader)

AnyType, Deinitable, Movable

fn def __init__(out self, var reader: R, *, strict_mandatory_attrs: Bool = False)

Args:

  • reader (R)
  • strict_mandatory_attrs (Bool)
  • self (Self)

Returns:

Self

Raises:

fn def has_more(self) -> Bool

Args:

  • self (Self)

Returns:

Bool

fn def next_view(mut self) -> GtfView[MutUntrackedOrigin]

Args:

  • self (Self)

Returns:

GtfView[MutUntrackedOrigin]

Raises:

fn def next_record(mut self) -> GtfRecord

Args:

  • self (Self)

Returns:

GtfRecord

Raises:

fn def views(ref self) -> _GtfParserViewIter[R, origin_of(self)]

Args:

  • self (Self)

Returns:

_GtfParserViewIter[R, origin_of(self)]

fn def records(ref self) -> _GtfParserRecordIter[R, origin_of(self)]

Args:

  • self (Self)

Returns:

_GtfParserRecordIter[R, origin_of(self)]

fn def __iter__(ref self) -> _GtfParserRecordIter[R, origin_of(self)]

Args:

  • self (Self)

Returns:

_GtfParserRecordIter[R, origin_of(self)]