Description Usage Arguments Details Value
View source: R/user_functions.R
From a target bed file, and a background bed file, this function calculates the statistical enrichment in several features (e.g. histone marks), in a given range.
1 2 3 4 5 6 7 8 9 10 | multiple.bed.enrichment(
targets,
target_labels = names(targets),
background,
feature_table,
bin = 0,
window = 0,
thread_number = 1,
DMR = F
)
|
targets |
A character vector with the file path of the bed with the regions of interest, or a data.frame/data.table with the data in a bed-like format. It can be a vector of one or more files. |
target_labels |
A character vector indicating the names of the target files, in the same order than the targets parameter. |
background |
A character vector with the file path of the bed with the background regions, or a data.frame/data.table with the data in a bed-like format |
feature_table |
A data.frame with the paths of the feature files, and their annotation. You can use |
bin |
The size of each overlap checking. If it is 0, the regions are checked as given. |
window |
The region that should be analyzed on each side (upstream and downstream) of the bed regions. If it is 0, the regions are checked as given. |
thread_number |
The number of threads that should be use in parallel. |
DMR |
A boolean indicating if the regions are not of size 1bp, such as, for example, DMRs (differentially methylated regions). |
The function is able to sequentially repeat that enrichment calculation several times in an arbitrary range and window of the target bed file, shifting all the genomic positions each time.
A list with several data.tables, each one the result of one feature, and the last with the merge of all. Each row contains the information of one bin, with the fisher.test result.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.