sc_reconstruction.models.ReconPretrainedStateModel#
- class sc_reconstruction.models.ReconPretrainedStateModel(checkpoint_path, protein_embeds_path, emb_key='X_state', read_depth=4.0, encode_batch_size=64, decode_batch_size=64, **kwargs)[source]#
Bases:
BaseReconstructionModel- Parameters:
- __init__(checkpoint_path, protein_embeds_path, emb_key='X_state', read_depth=4.0, encode_batch_size=64, decode_batch_size=64, **kwargs)[source]#
Pre-trained State Embedding (SE) foundation model [Adduri et al., 2025].
Wraps the SE encoder for ReconEval’s foundation-model reconstruction task. Requires the
statepackage and runs in thecstm_scvi_envconda env.- Args:
checkpoint_path: Path to the pre-trained model checkpoint protein_embeds_path: Path to protein embeddings emb_key: Key for cell embeddings in adata.obsm read_depth: Read depth for decoding batch_size: Batch size for inference library_size_mode: For interface compatibility (not used in this model)
Methods
__init__(checkpoint_path, protein_embeds_path)Pre-trained State Embedding (SE) foundation model [Adduri et al., 2025].
forward(x)Forward pass for compatibility
get_latent_representation(X)get_overlap_genes(genes)Get overlapping genes between adata and protein embeddings.
load(path[, map_location])Load model configuration
predict(X[, target_genes, read_depth])Predict reconstruction using pre-trained model
predict_relu(X)Predict reconstruction with ReLU activation
prepare([adata])Cache the adata reference and its gene list on the wrapper.
save(path)Save model configuration (not the actual pre-trained weights)
set_genes(genes)Set the genes for reconstruction
train([datamodule])No-op: SE is used frozen.