sc_reconstruction.models.ReconPretrainedscimilarity#

class sc_reconstruction.models.ReconPretrainedscimilarity(checkpoint_path, emb_key='X_scimilarity', **kwargs)[source]#

Bases: object

Parameters:
  • checkpoint_path (str)

  • emb_key (str)

__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 scimilarity package and runs in the scimilarity_env conda env.

Args:
checkpoint_path: Path to the pre-trained model checkpoint

(config, model weights, gene mapping).

Parameters:
  • checkpoint_path (str)

  • emb_key (str)

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.