torchcell.models.fungal_up_down_transformer.FungalUpDownTransformer
- class FungalUpDownTransformer(model_name: str = '', target_layer: int | tuple[int, ...] = (8,))[source]
Bases:
NucleotideModelEmbed DNA sequences upstream and downstream of the CDS via SpeciesLM.
The FungalUpDownTransformer embeds DNA sequences upstream the CDS and downstream the CDS. It was trained on 1003 bp upstream sequences (including the start codon) and 300 bp downstream sequences (including the stop codon). It handles both upstream and downstream sequences. valid models include
["downstream_species_lm", "upstream_species_lm"]. The original paper discusses two other models (["downstream_agnostic_lm","upstream_agnostic_lm"]), but they are not supported here.- load_model(model_name: str = '') None[source]
Load the model and tokenizer used for embedding sequences.