sc_reconstruction.models.ReconPretrainedscimilarity#
- class sc_reconstruction.models.ReconPretrainedscimilarity(checkpoint_path, emb_key='X_scimilarity', **kwargs)[source]#
Bases:
object- __init__(checkpoint_path, emb_key='X_scimilarity', **kwargs)[source]#
Pre-trained SCimilarity foundation model wrapper.
Wraps the SCimilarity encoder for ReconEval’s foundation-model reconstruction task. Requires the
scimilaritypackage and runs in thescimilarity_envconda env.- Args:
- checkpoint_path: Path to the pre-trained model checkpoint
(config, model weights, gene mapping).
Methods
__init__(checkpoint_path[, emb_key])Pre-trained SCimilarity foundation model wrapper.
get_latent_representation(X)get_overlap_genes(genes)Not implemented for SCimilarity; reserved for parity with other FM wrappers.
load(path[, map_location])Load model configuration
prepare([adata])Cache the adata reference and its gene list on the wrapper.
set_genes(genes)Set the genes for reconstruction
train([datamodule])No-op: SCimilarity is used frozen.