netmap.masking.external.preprocess_bed_file¶
- netmap.masking.external.preprocess_bed_file(bed_file)[source]¶
Read a BED file and parse the TF motif list column.
Loads a tab-separated BED file describing cis-regulatory modules (CRMs) and splits the comma-separated TF list into a Python list for downstream use by
get_regulators().- Parameters:
bed_file (str) – Path to the BED file. Expected columns (0-indexed) are chr, start, end, TF_list, TF_number, strand, number1, number2, large_number.
- Returns:
DataFrame with the original BED columns plus an additional
TF_list_listcolumn containing each TF name as a Python list element.- Return type:
pd.DataFrame