User

Benchmarking

benchmarking.compute_benchmarking_metrics(adata)

Compute all specified benchmarking metrics.

benchmarking.compute_cas(adata[, ...])

Compute the Cell Type Affinity Similarity (CAS).

benchmarking.compute_clisis(adata[, ...])

Compute the Cell Type Local Inverse Simpson's Index Similarity (CLISIS).

benchmarking.compute_gcs(adata[, batch_key, ...])

Compute the graph connectivity similarity (GCS).

benchmarking.compute_mlami(adata[, ...])

Compute the Maximum Leiden Adjusted Mutual Info (MLAMI).

benchmarking.compute_nasw(adata[, ...])

Compute the Niche Average Silhouette Width (NASW).

Data

data.load_spatial_adata_from_csv(...[, ...])

Create AnnData object from two csv files containing gene expression feature matrix and adjacency matrix respectively.

Models

models.NicheCompass(adata[, adata_atac, ...])

NicheCompass model class.

Gene Program Utilities

utils.add_gps_from_gp_dict_to_adata(gp_dict, ...)

Add gene programs defined in a gene program dictionary to an AnnData object.

utils.add_multimodal_mask_to_adata(adata, ...)

Retrieve atac target and source gene program masks from the rna gene program masks stored in ´adata´.

utils.extract_gp_dict_from_collectri_tf_network(species)

Retrieve 1072 mouse or 1186 human transcription factor (TF) target gene gene programs from CollecTRI via decoupler.

utils.extract_gp_dict_from_nichenet_lrt_interactions(species)

Retrieve the NicheNet ligand receptor network and ligand target gene regulatory potential matrix as described in Browaeys, R., Saelens, W.

utils.extract_gp_dict_from_omnipath_lr_interactions(species)

Retrieve 724 human ligand-receptor interactions from OmniPath and extract them into a gene program dictionary.

utils.filter_and_combine_gp_dict_gps(gp_dict)

Filter and combine the gene programs in a gene program dictionary based on overlapping genes.

utils.get_gene_annotations(adata[, ...])

Get genomic annotations including chromosomal bp positions of genes by joining with a GTF file from GENCODE.

utils.generate_multimodal_mapping_dict(...)

Build a mapping dict to map peaks to genes based on chromosomal bp position overlaps.

utils.get_unique_genes_from_gp_dict(gp_dict)

Return all unique genes of a gene program dictionary.

utils.generate_enriched_gp_info_plots(...[, ...])

Generate info plots of enriched gene programs.

Cell-Cell Communication Utilities

utils.compute_communication_gp_network(...)

Compute a network of category aggregated cell-pair communication strengths.

utils.visualize_communication_gp_network(...)

Visualize a communication gp network.

Other Utilities

utils.create_new_color_dict(adata, cat_key)

Create a dictionary of color hexcodes for a specified category.