torchcell.sequence.Gene

class Gene[source]

Bases: ABC

Abstract gene exposing windowed-sequence extraction methods.

abstractmethod window(window_size: int, is_max_size: bool = True) → DnaWindowResult[source]

Return a sequence window centered on the gene.

abstractmethod window_five_prime(window_size: int, allow_undersize: bool = False) → DnaWindowResult[source]

Return a sequence window anchored at the 5’ end.

abstractmethod window_three_prime(window_size: int, allow_undersize: bool = False) → DnaWindowResult[source]

Return a sequence window anchored at the 3’ end.