dynamo.ext.mutual_inform

dynamo.ext.mutual_inform(adata, genes, layer_x, layer_y, cores=1)[source]

Calculate mutual information (as well as pearson correlation) of genes between two different layers.

Parameters
  • adata (AnnData.) – adata object that will be used for mutual information calculation.

  • genes (List (default: None)) – Gene names from the adata object that will be used for mutual information calculation.

  • layer_x – The first key of the layer from the adata object that will be used for mutual information calculation.

  • layer_y – The second key of the layer from the adata object that will be used for mutual information calculation.

  • cores (int (default: 1)) – Number of cores to run the MI calculation. If cores is set to be > 1, multiprocessing will be used to parallel the calculation.

Returns

  • An updated adata object that updated with a new columns (mi, pearson) in .var contains the mutual information

  • of input genes.