YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
scLAMBDA β hESC Perturbation Model (PARK7 example)
This repository hosts a filtered training dataset and model files for running scLAMBDA on hESC (human embryonic stem cells), based on Perturb-seq dataset GSE217460.
The goal is to enable zero-shot or fine-tuned prediction of gene perturbations (e.g., PARK7 overexpress) on hESC transcriptomes.
π Contents
GSE217460_GPT.h5ad
Single-cell RNA-seq dataset after filtering, retaining only genes covered by GenePT text embeddings (text-embedding-3-large).
This ensures full compatibility with scLAMBDA training and inference.scLAMBDA_hESC_GPT.ipynb
Full training and inference pipeline (environment setup β model initialization β training β perturbation prediction β visualization).embedding_coverage_report.csv
Report showing which genes in the hESC dataset are covered by GenePT embeddings, and the overall coverage rate.ckpt.pth
Checkpoint files from fine-tuning scLAMBDA on the hESC dataset.
If included, they can be directly loaded for downstream prediction.GenePT_gene_protein_embedding_model_3_text.pickle
Pretrained gene/protein embeddings generated by GenePT (dimension = 3072). Used as input embeddings for perturbation modeling and prediction.Fast_prediction.ipynb
Simple prediction script without training.
𧬠Dataset details
- Source: GSE217460 (Perturb-seq, hESC)
- Cells: ~200k hESC cells (CTRL + ~1700 perturbations)
- Genes: ~20k original β filtered to ~20k genes with valid embeddings
- Format:
.h5ad(AnnData, Scanpy-compatible)
βοΈ Training workflow (summary)
Steps to reproduce the model training (see scLAMBDA):
Environment
- GPU: RTX4090 (24GB)
- PyTorch 2.1.2 (CUDA 11.8)
- Python 3.10
Filter dataset
adata = sc.read_h5ad("raw_data.h5ad") covered = [g for g in adata.var_names if g in gene_embeddings] adata = adata[:, covered].copy() adata.write_h5ad("adata_filtered_for_embedding_covered_genes.h5ad")Train scLAMBDA
model = sclambda.model.Model( adata, gene_embeddings, training_epochs=500, batch_size=800, latent_dim=50, hidden_dim=1024, lambda_MI=500, multi_gene=False ) model.train()Predict perturbations (example: PARK7)
res = model.predict(["PARK7"], return_type="cells")
π References
- scLAMBDA: https://github.com/gefeiwang/scLAMBDA
- Perturb-seq dataset (GSE217460): NCBI GEO
- GenePT embeddings: Zenodo resource
π Citation
If you use this resource, please cite:
Wang et al. scLAMBDA: Language Models for Predicting Gene Perturbation Effects in Single Cells (GitHub: gefeiwang/scLAMBDA)
Gefei Wang, Tianyu Liu, Jia Zhao, Youshu Cheng, Hongyu Zhao. Modeling and predicting single-cell multi-gene perturbation responses with scLAMBDA. bioRxiv 2024; doi: https://doi.org/10.1101/2024.12.04.626878.