stereo.algorithm.regulatory_network_inference.RegulatoryNetworkInference.main#

RegulatoryNetworkInference.main(database=None, motif_anno=None, tfs=None, target_genes=None, auc_threshold=0.5, num_workers=None, res_key='regulatory_network_inference', seed=None, cache=False, cache_res_key='regulatory_network_inference', save_regulons=True, save_loom=False, fn_prefix=None, method='grnboost', ThreeD_slice=False, prune_kwargs={}, hotspot_kwargs={}, use_raw=True)[source]#

Enables researchers to infer transcription factors (TFs) and gene regulatory networks.

Parameters:
  • database (Optional[str]) – the sequence of databases.

  • motif_anno (Optional[str]) – the name of the file that contains the motif annotations to use.

  • tfs (Union[str, list, None]) – list of target transcription factors. If None or ‘all’, the list of gene_names will be used.

  • target_genes (Optional[list]) – optional list of gene names (strings). Required when a (dense or sparse) matrix is passed as ‘expression_data’ instead of a DataFrame

  • auc_threshold (float) – the fraction of the ranked genome to take into account for the calculation of the Area Under the recovery Curve.

  • num_workers (Optional[int]) – if not using a cluster, the number of workers to use for the calculation. None of all available CPUs need to be used.

  • res_key (str) – the key for storage of inference regulatory network result.

  • seed (Optional[int]) – optional random seed for the regressors. Default None.

  • cache (bool) – whether to use cache files. Need to provide adj.csv, motifs.csv and auc.csv.

  • save_regulons (bool) – whether to save regulons into a csv file.

  • save_loom (bool) – whether to save the result as a loom file.

  • fn_prefix (Optional[str]) – the prefix of file name for saving regulons or loom.

  • method (str) – the method to inference GRN, ‘grnboost’ or ‘hotspot’.

  • ThreeD_slice (bool) – whether to use 3D slice data.

  • prune_kwargs (dict) – dict, other parameters of pyscenic.prune.prune2df.

  • hotspot_kwargs (dict) – dict, other parameters for ‘hotspot’ method.

Returns:

Computation result of inference regulatory network is stored in self.result where the result key is ‘regulatory_network_inference’.