API

High-level functions for processing data, training and evaluating models and plotting results.

Data

data.create_dataset(params)

Create a NNDataset.

data.load_example_data([data_dir])

Download example data to data_dir.

data.load_example_experiment([experiment_dir])

Download example experiment to experiment_dir.

Tools

tl.run_experiments(exps[, mode])

Execute experiments.

tl.create_cluster_data(experiment_dir[, ...])

Create (subsampled) data for clustering.

tl.prepare_full_dataset(experiment_dir[, ...])

Prepare all data for clustering by predicting cluster-rep.

tl.project_cluster_data(experiment_dir, ...)

Project existing clustering to new data.

tl.load_full_data_dict(exp[, keys, ...])

Load mpp_datas used in experiment in a dict.

tl.get_clustered_cells(mpp_datas, cl, ...[, ...])

Get num_objs example cells for each mpp_data.

tl.project_cluster_data(experiment_dir, ...)

Project existing clustering to new data.

tl.add_clustering_to_adata(data_dir, ...[, ...])

Add clustering to adata.

tl.extract_features(params)

Extract features from clustered dataset using FeaturesExtractor.

tl.thresholded_count(df[, threshold])

Count largest CSL objects per cell.

tl.thresholded_median(df[, threshold])

Calculate median area of large CSL objects per cell.

Plotting

pl.plot_mean_intensity(adata[, groupby, ...])

Show per cluster intensity of each channel.

pl.get_intensity_change(adata, groupby[, ...])

Get data for plotting intensity comparison with plot_intensity_change().

pl.plot_intensity_change(adata, ...[, ...])

Plot mean intensity differences between perturbations or clusters.

pl.plot_mean_size(adata[, groupby_row, ...])

Plot mean cluster sizes per cell, grouped by different columns in obs.

pl.plot_size_change(adata[, groupby_row, ...])

Plot mean intensity differences between perturbations and clusters.

pl.plot_object_stats(adata, group_key[, ...])

Barplot of object statistics.

pl.plot_co_occurrence(adata, cluster1, ...)

Plot co-occurrence for one cluster-cluster pairs.

pl.plot_co_occurrence_grid(adata, condition)

Plot co-occurrence for all cluster-cluster pairs in a grid.

pl.annotate_img(img[, annotation, from_col, ...])

Annotate cluster image.

Other

constants.campa_config

Configuration for CAMPA.

utils.load_config(config_file)

Load configuration file and return configuration object.

utils.merged_config(config1, config2)

Update config1 with config2.

utils.init_logging([level])

Set up logging for CAMPA.