samrogers1233/scLDM: scLDM v1.0.0
scLDM is a generative framework for predicting single-cell transcriptomic responses to chemical and genetic perturbations. The framework combines a variational autoencoder with a conditional latent diffusion model, mapping pre- and post-perturbation gene-expression profiles into a shared low-dimensional latent space. Optimal transport is used to align unpaired control and perturbed cells, while pre-perturbation cellular states, cell-type information, and perturbation embeddings guide the iterative denoising process. For genetic perturbations, scLDM incorporates Gene2Vec representations to support unified modelling of both single-gene and combinatorial perturbations, including previously unseen gene combinations. The framework was systematically evaluated across diverse biological settings, including drug stimulation, viral and bacterial infection, single-gene and combinatorial gene perturbations, and cross-species perturbation prediction. Experimental results demonstrate that scLDM accurately reconstructs perturbation-induced gene-expression changes, preserves cell-to-cell heterogeneity and biologically relevant expression distributions, and achieves strong generalization across perturbation types, cellular contexts, and species. This archive provides the source code required to train the variational autoencoder and latent diffusion model and to generate predicted post-perturbation transcriptomic profiles.