ngs_tools.gtf.GtfEntry

Module Contents

Classes

GtfEntry

Represents a single GTF entry.

exception ngs_tools.gtf.GtfEntry.GtfEntryError

Bases: Exception

Common base class for all non-exit exceptions.

class ngs_tools.gtf.GtfEntry.GtfEntry(line: str)

Represents a single GTF entry.

PARSER

Static attribute that contains a compiled regex. Used to parse a GTF line.

ATTRIBUTE_PARSER

Static attribute that contains a compiled regex. Used to parse GTF entry attributes.

_line

Raw GTF line; for internal use only. Use line instead.

_chromosome

Chromosome; for internal use only. Use chromosome instead.

_feature

Feature; for internal use only. Use feature instead.

_start

Start; for internal use only. Use start instead.

_end

End; for internal use only. Use end instead.

_strand

Strand; for internal use only. Use strand instead.

_attribute_str

Raw GTF entry attribute string; for internal use only. Use attributes instead.

property line: str

Raw GTF line

property chromosome: str

Chromosome

property feature: str

Feature

property start: int

Start, 1-indexed

property end: int

End, 1-indexed, inclusive

property strand: str

Strand

property attributes: Dict[str, str]

Dictionary of attributes

PARSER
ATTRIBUTE_PARSER
to_segment() ngs_tools.gtf.Segment.Segment

Convert this GTF entry into a Segment.

Returns:

The new segment