Chemical perturbation modeling in 24hours.
[!Important] This model was developed during the Nucleate Hackathon 2025, Munich and does not represent a serious scientific project.
Please refer to the documentation, in particular, the API documentation.
You need to have Python 3.11 or newer installed on your system. If you don't have Python installed, we recommend installing uv.
There are several alternative options to install novaice:
- Install the latest development version:
pip install git+https://github.com/lucas-diedrich/novaice.gitnovaice is a simple model to predict gene expression across chemical perturbation conditions. It assumes that each observation is encoded by a (drug log1p normalized RNAseq data.
We implement various methods to embed chemical compounds from the smiles strings in the .pp module.
Evaluation is based on the featurewise
from novaice.tl import ChemPertMLPModel, ChemPertVAEModel
from lightning.pytorch.loggers import TensorBoardLogger
# Setup and train model
ChemPertMLPModel.setup_anndata(adata, drug_embedding_key="drug_embedding")
model = ChemPertMLPModel(adata)
# Train
model.train(max_epochs=50)
# Predict gene expression
predictions = model.predict_gene_expression()To track training metrics with TensorBoard:
from lightning.pytorch.loggers import TensorBoardLogger
# Create TensorBoard logger
tb_logger = TensorBoardLogger("logs", name="my_experiment")
# Train with logging
model.train(max_epochs=50, logger=tb_logger, log_every_n_steps=5)Then start TensorBoard to visualize the training:
tensorboard --logdir=logsOpen your browser to http://localhost:6006 to view the training metrics.
See the changelog.
For questions and help requests, you can reach out in the scverse discourse. If you found a bug, please use the issue tracker.