Downstream Examples
This folder now contains both ready-to-run examples and legacy scripts from the original GeneMamba project.
Ready-to-run scripts
10_finetune_classification.py
Fine-tuneAutoModelForSequenceClassificationfor cell-type annotation.11_zero_shot_logreg.py
Freeze GeneMamba, extractpooled_embedding, train LogisticRegression on train split, evaluate on test split.12_batch_integration_eval.py
Batch integration proxy evaluation using silhouette score byobs['batch'].
Reference training scripts
20_continue_pretraining_reference.py21_pretrain_from_scratch_reference.py
Legacy scripts from original repo
legacy_from_gene_mamba/mamba2_classification_finetune_with_label.pylegacy_from_gene_mamba/mamba2_classification_finetune_without_label.pylegacy_from_gene_mamba/mamba2_classification_finetune_without_label_zero_shot.py
Required h5ad conventions
For downstream compatibility, standardize columns in adata.obs:
celltypefor labelbatchfor batch idpartitionin{train, test}for train/test split
This matches conventions described in the original dataset/downstream/README.md.