API

CCIData Class

CCIData([cci_scores, p_values, n_spots, ...])

Class to store and manage Cell-Cell Interaction (CCI) data

Integration

it.get_lr_pairs(samples[, assay, method])

Identifies the LR pairs present in a list of samples according to the given method.

it.calc_scale_factors(samples[, method, ...])

Calculates the scale factors for normalizing matrices between different platforms.

it.lr_integration(samples[, method, sum, ...])

Integrates a list of samples into a single sample per lr pair.

it.integrate_networks(samples[, sum, ...])

Integrates a list of samples that are single networks into a single network.

Analysis

an.calculate_dissim(sample1, sample2[, ...])

Calculates a dissimilarity score between two samples for each common LR pair.

an.get_network_diff(network1, network2[, ...])

Calculates the difference between two networks.

an.cell_network_clustering(sample[, assay, ...])

Groups ligand-receptor (LR) pairs into clusters based on their interaction network similarity.

an.lr_interaction_clustering(sample[, ...])

Clustering of spatial LR interaction scores on AnnData objects processed through stLearn.

an.run_gsea([sample, assay, lrs, organism, ...])

Runs GSEA analysis on a sample.

an.pathway_subset(sample[, assay, ...])

Subsets a sample to only include interactions between genes in a set of pathways.

an.add_lr_module_score(sample, lr_list[, ...])

Adds a module score to an AnnData object run through stLearn based on the interactions in a list of ligand-receptor pairs.

Scoring

sc.dissimilarity_score(m1, m2[, lmbda, ...])

Calculates a dissimilarity score between two matrices.

sc.multiply_non_zero_values(dataframes[, strict])

Multiply non-zero values across a list of pandas DataFrames.

Plotting

pl.network_plot(network[, p_vals, ...])

Plots a network with optional edge significance highlighting and node coloring based on in-degree and out-degree difference.

pl.chord_plot(network[, min_int, ...])

Plots a chord plot of a network

pl.dissim_hist(dissimilarity_scores[, ...])

Plots a histogram of dissimilarity scores.

pl.lr_top_dissimilarity(dissimilarity_scores)

Plots a bar plot of LR pairs with highest/lowest dissimilarity scores.

pl.lr_barplot(sample[, assay, n, ...])

Plots a bar plot of LR pairs and their proportions for a sample.

pl.lrs_per_celltype(sample[, sender, ...])

Plots a bar plot of LR pairs and their proportions for a sender and receiver cell type pair along with p_values (optional).

IO

io.read_stLearn(path[, key, save_anndata])

Reads a stLearn ligand-receptor analysis output and converts it to a CCIData object.

io.convert_stLearn(adata[, key, save_anndata])

Reads a stLearn ligand-receptor analysis output and converts it to a CCIData object.

io.read_CellPhoneDB(means_path, pvals_path)

Reads a CellPhoneDB interaction scores txt file and converts it to a CCIDataobject.

io.read_Squidpy(result[, n_spots])

Reads a Squidpy ligand-receptor analysis output and converts it to a CCIData object.

io.read_CellChat(path[, n_spots])

Reads a CellChat ligand-receptor analysis output (cellchat@dr) and converts it to a CCIData object.

io.read_NATMI(path[, n_spots])

Reads a NATMI ligand-receptor analysis output (Edges_lrc2p.csv) and converts it to a CCIData object.

io.read_CCIData(path)

Loads a CCIData object from JSON or pickle file.

io.read_network(path[, metadata])

Loads a single network from a csv file.

io.from_dict(data_dict)

Create CCIData object from a dictionary.