Description Usage Arguments Details Value
View source: R/user_functions.R
This function is able to collapse several bed files of one or more given features (e.g. histone marks), creating a Consensus Peaks file, a bed file with strong and reproducible peaks between the files. This algorithm (project link) has been created mainly for data from MACS.
1 2 3 4 5 6 7 8 9 | mspc.consensus.peaks(
mspc_table,
output_dir,
fold_threshold = 2,
min_overlap = 3,
qvalue_col = 7,
pvalue_col = 8,
fold_col = 9
)
|
output_dir |
The directory where the new files will be created |
fold_threshold |
Minimal enrichment over background to be considered in the files. Every peak with less fold enrichment will be erased and not shown to the MSPC algorithm. |
min_overlap |
Minimal number of overlaping replicates. This is use as '-c' parameter in the MSPC algorithm. If the number of files in a feature is equal or less than the min_overlap, the min_overlap will be calculated as the number of files minus one. |
qvalue_col |
The index of the column containing the q_values in bed files. |
pvalue_col |
The index of the column containing the p_values in bed files. |
fold_col |
The index of the column containing the fold_enrichment in bed files. |
feature_table |
A data.frame with the paths of input bed files, and their annotation. You can use |
MSPC is an independent project, and this function is a wrapper that makes able to call the software from R without preprocessing of bed files. For the order of the columns, the program assumes the structure of the output of ChIP-seq beds from the Blueprint project (web), but you can define the columns to use the function with different input. This function checks if MSPC is installed and, if not, try to download and install the latest version in the folder ~/.mspc . This function only works nowadays in GNU/Linux.
None. The function generates a side effect (calling the MSPC algorithm and creating the final consensus peaks files).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.