get_annot_beds.RdThis function generates BED files for each topic based on the provided topic annotations. Each BED file is saved into its own folder, and a list of output folder paths is returned.
get_annot_beds(topics_res, output_dir, fuzzy = FALSE, cutoff = 0.9)A list containing the factor matrices Fmat and Lmat,
differential expression results de_res, and p-values matrix p_jk.
Fmat: A matrix containing factor loadings (peaks x topics).
Pmat: A matrix of p-values or probabilities (peaks x topics).
Rows correspond to peaks with names in the format "chr:start-end".
Columns correspond to topics.
A character string specifying the base output directory for the BED files.
Logical value indicating whether to create fuzzy annotations (default: FALSE).
Numeric value specifying the cutoff for binary annotations when fuzzy = FALSE (default: 0.9).
A list of output folder paths (bed_dir_list), one for each topic.