torchcell.sequence

Genome and sequence data structures. Genome is the abstract genome interface (lazy gene-set and sequence access), Gene a gene within it, and DnaWindowResult and DnaSelectionResult the sequence windows the embedding datasets consume. torchcell.sequence.genome.base holds the organism-agnostic AnnotatedGenome (the recorded data.db cache, GO, gene-name resolution) that each host subclasses; the S. cerevisiae S288C implementation lives in torchcell.sequence.genome.scerevisiae, and torchcell.sequence.genome.registry resolves the sha256-pinned reference genome files.

Classes

DnaSelectionResult

A validated DNA region selection with coordinates, strand, and sequence.

DnaWindowResult

A DNA selection extended with the surrounding window coordinates.

Gene

Abstract gene exposing windowed-sequence extraction methods.

GeneSet

A sorted set that requires all members to be strings.

Genome

Abstract genome providing lazy gene-set and sequence access.

ParsedGenome

Validated container holding a genome's GeneSet.

Functions

calculate_window_bounds

Calculate the window bounds for genomic sequences.

calculate_window_bounds_symmetric

Calculate symmetric window bounds considering chromosome limits.

compute_codon_frequency

Compute relative codon frequencies for a coding sequence.

get_chr_from_description

Extracts the chromosome number from a given description string.

mismatch_positions

Computes the positions at which two sequences differ.

roman_to_int

Converts a Roman numeral string to an integer.