DILImap - Predicting DILI risk using Toxicogenomics

API Docs

Import DILImap as:

import dilimap as dmap

After reading the data from local, quilt (dmap.quilt.read) or loading an in-built dataset (dmap.datasets.*), the workflow includes preprocessing (dmap.pp.*), model predictions (dmap.models.*), plotting (dmap.pl.*) and several utility functions (dmap.utils.*).

Read/write from S3

s3.login()

Load AWS credentials from .env file or prompt interactively if missing.

s3.read(filename[, package_name, registry])

Read a file from an S3 registry.

s3.write(obj, filename[, package_name, registry])

Write an object to an S3 registry.

Preprocessing (pp)

QC

pp.qc_metrics(adata)

Compute quality control (QC) metrics for gene expression data.

pp.qc_cross_rep_correlation(adata[, ...])

Computes cross-replicate correlation quality control (QC) for each compound.

Preprocessing

pp.deseq2(adata, pert_name_col[, ...])

Runs DESeq2 for differential expression signatures across perturbations.

pp.pathway_signatures(df[, pval_thresh, ...])

Perform pathway enrichment analysis on DEGs for each compound.

Models

models.ToxPredictor([version, model, ...])

ToxPredictor pre-trained v1 or initialize new model for re-training.

Plotting (pl)

pl.roc_curve(y_true, y_pred[, ...])

Plots a ROC curve with optional threshold annotations.

pl.boxplot_with_swarm(data, x, y[, ...])

Creates a box plot overlaid with a swarm plot for a given dataset.

Datasets

datasets.compound_Cmax_values()

Plasma Cmax annotations data for compounds in DILImap (csv file)

datasets.compound_DILI_labels()

DILI annotations from DILIrank and LiverTox databases (csv file)

datasets.compound_cell_viability([level])

Cell viability assay results for all compounds in DILImap (csv file)

datasets.demo_data([level])

Example gene expression data (anndata file)

datasets.DILImap_training_data([level])

DILImap gene expression training data (anndata file)

datasets.DILImap_validation_data([level])

DILImap gene expression validation data (anndata file)

datasets.DILImap_data([level])

DILImap gene expression data (anndata file)

Clients

clients.chembl([molecule_name, smiles])

Fetch compound information from ChEMBL.

clients.drug_warnings(chembl_id[, aggregate])

Fetch drug warnings from ChEMBL for given compound(s).

Utils

utils.platemap(data, value_key[, batch])

Generates a plate map for visualization.

utils.groupby(data, key[, aggfunc])

Groups a dataset by a specified key, preserving one-to-one categorical mappings.

utils.crosstab(data, keys[, aggfunc])

Creates a crosstab for the specified keys, applying an optional aggregation function.

utils.map_dili_labels_and_cmax(data[, ...])

Annotate an AnnData or pandas.DataFrame with selected DILI labels and Cmax values.