dynamo.ext.coexp_measure

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

Calculate co-expression measures, including mutual information (MI), pearson correlation, etc. of genes between two different layers.

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

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

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

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

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

  • skip_mi (bool) – Whether to skip the mutual information calculation step which is time-consuming.

Return type:

None

Returns:

None. The adata object will be updated with a new columns (mi, pearson) in .var contains the mutual information of input genes.