torchcell.datasets.CalmDataset
- class CalmDataset(root: str, genome: SCerevisiaeGenome, model_name: str | None = 'calm', transform: Callable[[...], Any] | None = None, pre_transform: Callable[[...], Any] | None = None, batch_size: int = 100)[source]
Bases:
BaseEmbeddingDatasetEmbedding dataset that runs the CaLM model over gene CDS sequences.
CaLM tokenizes its input into codons, so each gene embeds its spliced CDS (the
orf_codingFASTA record), truncated to the first 3,072 nt (1,024 codons, in frame from the start codon) when longer.dna_windowsstores exactly the string embedded.- static parse_genome(genome: SCerevisiaeGenome | None) ParsedGenome | None[source]
Extract the gene set from a genome into a ParsedGenome (or None).