gretapy.mt.correlation

Contents

gretapy.mt.correlation#

gretapy.mt.correlation(mdata, tfs=None, organism='hg38', method='pearson', thr_r=0.1, min_targets=5, verbose=False)#

Infer a GRN based on TF-gene expression correlation.

Parameters:
  • mdata (MuData) – MuData object with “rna” and “atac” modalities.

  • tfs (ndarray | list | None (default: None)) – Array or list of transcription factor names. If None it uses Lambert TFs.

  • organism (str (default: 'hg38')) – Which organism to use. Default is “hg38”.

  • method (str (default: 'pearson')) – Correlation method: “pearson” or “spearman”. Default is “pearson”.

  • thr_r (float (default: 0.1)) – Minimum absolute correlation threshold. Default is 0.1.

  • min_targets (int (default: 5)) – Minimum number of targets required for a TF to be included. Default is 5.

  • verbose (bool (default: False)) – Whether to print progress messages. Default is False.

Return type:

DataFrame

Returns:

pd.DataFrame GRN DataFrame with columns: source, cre, target, score.