The Dataset Viewer has been disabled on this dataset.

๐Ÿฆ‘ Squidiff Reproducibility (Code + Processed Dataset)

English | ็ฎ€ไฝ“ไธญๆ–‡

This repository is a comprehensive, ready-to-use replication bundle for Squidiff. It contains annotated replication Jupyter notebooks alongside all the heavily processed intermediate .h5ad matrices (approx 22.8 GB in total) required to seamlessly reproduce the figures and model results without wrestling with data wrangling.

Note: This repository is cloned and extended from the official Squidiff reproducibility repo. We provide critical bug fixes (e.g., filepath alignments in Fig 2), in-depth notebook annotations, a reimplemented plot_util.py (missing from the original repo), and most importantly, the fully processed datasets bundled locally so that reviewers or researchers can achieve "plug-and-play" execution.

๐Ÿ“ Repository Structure

Notebooks are organized by figure/experiment into numbered directories:

Squidiff_reproducibility/
โ”œโ”€โ”€ 01_fig2_differentiation/       # Fig 2: iPSC โ†’ Endoderm differentiation
โ”‚   โ”œโ”€โ”€ 01.1_preprocess_fig2_data.ipynb  #   Data preprocessing + UMAP
โ”‚   โ”œโ”€โ”€ 01.2_prep_diff_data.ipynb       #   Differentiation data preparation
โ”‚   โ”œโ”€โ”€ 01.3_squidiff_on_differentiation.ipynb  #   Squidiff prediction
โ”‚   โ””โ”€โ”€ 01.4_scgen_comparison.ipynb     #   scGen baseline comparison
โ”œโ”€โ”€ 02_fig3_gene_perturbation/     # Fig 3a-c: K562 gene perturbation
โ”‚   โ”œโ”€โ”€ 02.1_prep_pertb_data.ipynb      #   Data preprocessing
โ”‚   โ”œโ”€โ”€ 02.2_squidiff_on_genepertb.ipynb#   Squidiff prediction
โ”‚   โ””โ”€โ”€ pertb_2genes/              #   Trained checkpoints
โ”œโ”€โ”€ 03_fig4_drug_response/         # Fig 3d-i & Fig 4-6: Drug & BVO
โ”‚   โ”œโ”€โ”€ 03.1_prep_drug_screen_data.ipynb#   GBM drug screen preprocessing
โ”‚   โ”œโ”€โ”€ 03.2_prep_sciplex_data.ipynb    #   sci-Plex3 preprocessing
โ”‚   โ”œโ”€โ”€ 03.3_prep_double_drug_data.ipynb#   Drug combination data preparation
โ”‚   โ”œโ”€โ”€ 03.4_squidiff_on_sciplex.ipynb  #   Unseen drug prediction
โ”‚   โ”œโ”€โ”€ 03.5_squidiff_on_combdrug.ipynb #   Drug combination prediction
โ”‚   โ””โ”€โ”€ 03.6_fig4_VO_reproducibility.ipynb  #   BVO + Irradiation + G-CSF
โ”œโ”€โ”€ 04_supplementary/              # Fig 1 & supplementary experiments
โ”‚   โ”œโ”€โ”€ 04.1_prep_simu_data.ipynb       #   Splatter synthetic data
โ”‚   โ”œโ”€โ”€ 04.2_squidiff_on_simulated_data.ipynb  #   Synthetic validation
โ”‚   โ””โ”€โ”€ 04.3_squidiff_on_gbm.ipynb     #   GBM drug response
โ”œโ”€โ”€ data/                          # Processed train/test h5ad (~24 MB)
โ”œโ”€โ”€ datasets/                      # Raw / downloaded datasets (~10 GB)
โ”œโ”€โ”€ checkpoints/                   # Trained model checkpoints
โ”œโ”€โ”€ training_logs/                 # Training logs & optimization states
โ”œโ”€โ”€ results/                       # Reproduced figures & metrics
โ”œโ”€โ”€ scripts/                       # Utility scripts
โ”‚   โ””โ”€โ”€ data_prep/                 #   Data conversion utilities
โ”‚       โ”œโ”€โ”€ check_data_status.py   #   Data availability checker
โ”‚       โ”œโ”€โ”€ convert_geo_to_h5ad.py #   Multi-platform GEO converter
โ”‚       โ”œโ”€โ”€ convert_series_matrix_to_h5ad.py  # Single-file converter
โ”‚       โ”œโ”€โ”€ convert_to_h5ad_v3.py  #   Manual regex-based parser
โ”‚       โ”œโ”€โ”€ simple_geo_to_h5ad.py  #   Simplified pandas converter
โ”‚       โ””โ”€โ”€ README.md              #   Data prep guide
โ”œโ”€โ”€ utils/                         # Shared utilities
โ”‚   โ””โ”€โ”€ plot_util.py               #   Plotting functions (reimplemented)
โ”œโ”€โ”€ assets/                        # Original paper figures for reference
โ”œโ”€โ”€ README.md                      # This file
โ”œโ”€โ”€ CLAUDE.md                      # Development workflow guide
โ””โ”€โ”€ REPRODUCTION_OVERVIEW.md       # Detailed reproduction guide (ไธญๆ–‡)

๐Ÿ“Š Dataset Overview per Figure

Figure Experiment Focus Data Location Notebooks
Fig 1 Splatter Synthetic Data Generated in notebook 04_supplementary/04.1_prep_simu_data.ipynb โ†’ 04_supplementary/04.2_squidiff_on_simulated_data.ipynb
Fig 2 iPSCโ†’Endoderm Differentiation datasets/ipsc_diff/, data/processed/ 01_fig2_differentiation/01.1_preprocess_fig2_data.ipynb โ†’ 01_fig2_differentiation/01.3_squidiff_on_differentiation.ipynb
Fig 3a-c K562 Gene Perturbations datasets/gears_*.h5ad 02_fig3_gene_perturbation/02.1_prep_pertb_data.ipynb โ†’ 02_fig3_gene_perturbation/02.2_squidiff_on_genepertb.ipynb
Fig 3d-g GBM Drug Screening Preprocessed via notebook 03_fig4_drug_response/03.1_prep_drug_screen_data.ipynb โ†’ 04_supplementary/04.3_squidiff_on_gbm.ipynb
Fig 3h-i sci-Plex Unseen Drug Preprocessed via notebook 03_fig4_drug_response/03.2_prep_sciplex_data.ipynb โ†’ 03_fig4_drug_response/03.4_squidiff_on_sciplex.ipynb
Fig 4-6 BVO Differentiation & Irradiation Complex diff trajectories 03_fig4_drug_response/03.6_fig4_VO_reproducibility.ipynb

โญ Beyond the Official Repo: Baseline Comparisons

This repository goes beyond a simple replication โ€” we independently implemented and trained baseline models that the original authors compared against but did not include code for:

Fig 2 โ€” scGen Baseline (iPSC Differentiation)

The original paper shows Squidiff vs scGen in Fig 2g, but provides no scGen training code. We:

  • Reimplemented the full scGen VAE in PyTorch (scgen_baseline.py), faithfully matching the official architecture (Lotfollahi et al., 2019)
  • Trained scGen on the same iPSC differentiation data and generated comparable scatter plots + Pearson R metrics
  • See 01_fig2_differentiation/01.4_scgen_comparison.ipynb and output in results/fig2/

Fig 3 โ€” GEARS & scGen Baselines (Gene Perturbation)

For the K562 gene perturbation task, we additionally trained:

  • GEARS (Roohani et al., 2023) on the same Norman et al. dataset โ†’ checkpoint in 02_fig3_gene_perturbation/gears/
  • scGen with latent arithmetic for double-gene perturbation prediction โ†’ checkpoint in 02_fig3_gene_perturbation/scgen_model_perturb_prediction.pt/
  • All three models (Squidiff, GEARS, scGen) are compared on the same held-out test set within 02_fig3_gene_perturbation/02.2_squidiff_on_genepertb.ipynb

๐Ÿš€ How to Use This Repository

Option 1: Full Clone for Local Execution

Ensure you have git-lfs installed, then clone via the HuggingFace CLI:

# Clone the full repository (~22.8 GB) to your local server
git clone https://huggingface.co/datasets/zyzhou110/Squidiff_reproducibility
cd Squidiff_reproducibility

Once downloaded, activate your Conda environment and run the Jupyter notebooks in each numbered directory sequentially.

Data Preparation (if starting from raw GEO data)

If you need to download and convert raw GEO data:

# Check which datasets are available
python3 scripts/data_prep/check_data_status.py

# Convert downloaded GEO series matrix to AnnData format
python3 scripts/data_prep/convert_series_matrix_to_h5ad.py

See scripts/data_prep/README.md for detailed data conversion options and troubleshooting.

Option 2: Loading Data via Hugging Face datasets

from datasets import load_dataset

dataset = load_dataset("zyzhou110/Squidiff_reproducibility")

๐Ÿ“ Acknowledgements

Original model weights and raw sequencing codes were derived from the original authors (Squidiff). If you utilize this curated layout or the dataset, please cite the parent paper and reference this extended integration. For inquiries about the core algorithms, please check out the official Figshare.

Downloads last month
272