API References¶
Import CAME:
import came
Example data¶
Load example data, for a quick start with CAME.  | 
Pipeline came.pipeline.*¶
  | 
Run the main process of CAME (model training), for integrating 2 datasets of aligned features.  | 
  | 
Run the main process of CAME (model training), for integrating 2 datasets of unaligned features.  | 
  | 
Packed function for process adatas with aligned features (i.e., one-to-one correspondence).  | 
  | 
Packed function for process adatas with un-aligned features.  | 
  | 
Packed function for pipeline as follows:  | 
Preprocessing came.pp.*¶
  | 
Align the vaiables of two   | 
  | 
Normalizing datasets with default settings (total-counts normalization followed by log(x+1) transform).  | 
  | 
Quick preprocess of the raw data.  | 
  | 
Go through the default pipeline and have a overall visualization of the data.  | 
  | 
compute the group averaged features  | 
  | 
Compute averaged feature-values for each group  | 
  | 
Wrapper function for centering and scaling data matrix X in sc.AnnData, extended for within-batch processing.  | 
  | 
Make a bipartite adjacent (sparse) matrix from a   | 
  | 
Take the one-to-one matches of the given two columns of a   | 
  | 
Take a subset of token matches (e.g., gene homologies)  | 
  | 
Get the homologous gene of input ones based on the homology-mappings  | 
  | 
Take given groups from an AnnData object  | 
  | 
Remove given groups from an AnnData object  | 
  | 
Merge the given groups into one single group which is named as   | 
  | 
Split an   | 
DataPair and AlignedDataPair¶
  | 
Decide and make a pair of aligned feature matrices for CAME input.  | 
  | 
Build   | 
  | 
Build   | 
  | 
Paired datasets with the aligned features (e.g.  | 
  | 
Paired datasets with the un-aligned features (e.g., cross-speceis)  | 
Graph Neural Network Model¶
  | 
Cell-Gene-Gene-Cell graph neural network.  | 
  | 
Cell-Gene-Cell graph neural network (used when features are 1-to-1 aligned)  | 
I/O Functions¶
  | 
Load the output results of CAME.  | 
  | 
Load hidden states from .h5 file the data structure should be like [ 'layer0/cell', 'layer0/gene', 'layer1/cell', 'layer1/gene', 'layer2/cell', 'layer2/gene' ]  | 
  | 
Save hidden states into .h5 file  | 
  | 
save the object into a .pickle file  | 
  | 
load the object from a .pickle file  | 
Analysis came.ana.*¶
  | 
Computes the similarity of each linked (homologous) pair of variables.  | 
  | 
Compute the weights between homologies by their average expressions across (cell) groups.  | 
  | 
Compute and make the abstracted graph from expression matrices and the linkage weights between homologous genes  | 
  | 
Compute common and private genes (cross-species) in each gene module.  | 
  | 
compute common and private genes based on a given gene mapping  | 
Plotting Functions came.pl.*¶
  | 
helper function for visualizing the group compositions (e.g., in each stage or condition).  | 
  | 
Heatmap of the prediction probabilities  | 
  | 
sort columns and rows, plot heatmap of cell-type scores  | 
  | 
function for plotting the contingency matrix by default, the values will be normalized by row (true classes)  | 
  | 
function for plotting the contingency matrix  | 
  | 
Visualize the given x-y coordinates, colored by the given (dict of) values  | 
  | 
This function can also be used to visualize the average expressions of some cell types on gene embedding, in which case, each observation in adata represents a genes.  | 
  | 
Plot the UMAP embeddings and annotate the names of the given points  | 
  | 
display the abstracted multipartite graph (cellType - geneModules - geneModules - cellTypes)  |