gretapy.mt.random

Contents

gretapy.mt.random#

gretapy.mt.random(mdata, organism='hg38', tfs=None, g_perc=0.25, scale=1.0, tf_g_ratio=0.1, w_size=250000, min_targets=5, seed=0, verbose=False)#

Generate a random GRN for benchmarking purposes.

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

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

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

  • g_perc (float (default: 0.25)) – Percentage of genes to include. Default is 0.25.

  • scale (float (default: 1.0)) – Scale parameter for exponential distribution sampling. Default is 1.0.

  • tf_g_ratio (float (default: 0.1)) – Ratio of TFs to genes. Default is 0.10.

  • w_size (int (default: 250000)) – Window size around TSS for peak overlap. Default is 250000.

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

  • seed (int (default: 0)) – Random seed for reproducibility. Default is 42.

  • 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.