genome_entropy.orf.types

Data types for ORF representation.

Classes

OrfRecord(parent_id, orf_id, start, end, ...)

Represents a single Open Reading Frame (ORF).

class genome_entropy.orf.types.OrfRecord(parent_id, orf_id, start, end, strand, frame, nt_sequence, aa_sequence, table_id, has_start_codon, has_stop_codon, in_genbank=False)[source]

Represents a single Open Reading Frame (ORF).

Parameters:
parent_id

ID of the parent DNA sequence

Type:

str

orf_id

Unique identifier for this ORF

Type:

str

start

0-based start position (inclusive)

Type:

int

end

0-based end position (exclusive)

Type:

int

strand

Strand orientation (‘+’ or ‘-‘)

Type:

Literal[‘+’, ‘-’]

frame

Reading frame (0, 1, or 2)

Type:

int

nt_sequence

Nucleotide sequence of the ORF

Type:

str

aa_sequence

Amino acid sequence of the ORF

Type:

str

table_id

NCBI genetic code table ID used

Type:

int

has_start_codon

Whether the ORF has a start codon

Type:

bool

has_stop_codon

Whether the ORF has a stop codon

Type:

bool

in_genbank

Whether this ORF matches a CDS annotated in GenBank

Type:

bool

parent_id: str
orf_id: str
start: int
end: int
strand: Literal['+', '-']
frame: int
nt_sequence: str
aa_sequence: str
table_id: int
has_start_codon: bool
has_stop_codon: bool
in_genbank: bool = False
__post_init__()[source]

Validate ORF attributes.

Return type:

None

__init__(parent_id, orf_id, start, end, strand, frame, nt_sequence, aa_sequence, table_id, has_start_codon, has_stop_codon, in_genbank=False)
Parameters:
Return type:

None