netmap.masking.external.get_regulators¶
- netmap.masking.external.get_regulators(crm_df, genes, window)[source]¶
Identify TF regulators of each gene by proximity to the TSS.
Searches a window of
±windowbp around each gene’s TSS in the CRM (cis-regulatory motif) BED data and returns all TF→gene pairs found.- Parameters:
crm_df (pd.DataFrame) – Preprocessed BED data from
preprocess_bed_file(), with columnschr,start,end, andTF_list_list.genes (pd.DataFrame) – Gene annotation table with columns
chr,start, andgene_name(e.g. fromget_genome_annotation_from_gtf()).window (int) – Search window in base pairs upstream and downstream of the TSS.
- Returns:
- Table with columns
gene,TFs,nTFs, edge(TF_genestring),regulator(alwaysTrue).
- Table with columns
- Return type:
pd.DataFrame