Description Usage Arguments Value Author(s) Examples
View source: R/findConsensusPeakRegions.R
Find regions sharing the same features for a minimum number of experiments using called peaks of signal enrichment based on pooled, normalized data (mainly coming from narrowPeak files). The peaks and narrow peaks are used to identify the consensus regions. The minimum number of experiments that must have at least on peak in a region so that it is retained as a consensus region is specified by user, as well as the size of mining regions. Only the chromosomes specified by the user are treated. The function can be parallized by specifying a number of threads superior to 1.
When the padding is small, the detected regions are smaller than the one that could be obtained by doing an overlap of the narrow regions. Even more, the parameter specifying the minimum number of experiments needed to retain a region add versatility to the function.
Beware that the side of the padding can have a large effect on the detected consensus regions. It is recommanded to test more than one size and to do some manual validation of the resulting consensus regions before selecting the final padding size.
1 2 3 | findConsensusPeakRegions(narrowPeaks, peaks, chrInfo, extendingSize = 250,
expandToFitPeakRegion = FALSE, shrinkToFitPeakRegion = FALSE,
minNbrExp = 1L, nbrThreads = 1L)
|
narrowPeaks |
a |
peaks |
a |
chrInfo |
a |
extendingSize |
a |
expandToFitPeakRegion |
a |
shrinkToFitPeakRegion |
a |
minNbrExp |
a positive |
nbrThreads |
a |
an list
of class
"consensusRanges" containing :
call
the matched call.
consensusRanges
a GRanges
containing the
consensus regions.
Astrid Deschenes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | ## Loading datasets
data(A549_CTCF_MYN_NarrowPeaks_partial)
data(A549_CTCF_MYN_Peaks_partial)
data(A549_CTCF_MYJ_NarrowPeaks_partial)
data(A549_CTCF_MYJ_Peaks_partial)
## Assigning experiment name "CTCF_MYJ" to first experiment
names(A549_CTCF_MYJ_NarrowPeaks_partial) <- rep("CTCF_MYJ",
length(A549_CTCF_MYJ_NarrowPeaks_partial))
names(A549_CTCF_MYJ_Peaks_partial) <- rep("CTCF_MYJ",
length(A549_CTCF_MYJ_Peaks_partial))
## Assigning experiment name "CTCF_MYN" to second experiment
names(A549_CTCF_MYN_NarrowPeaks_partial) <- rep("CTCF_MYN",
length(A549_CTCF_MYN_NarrowPeaks_partial))
names(A549_CTCF_MYN_Peaks_partial) <- rep("CTCF_MYN",
length(A549_CTCF_MYN_Peaks_partial))
## Only choromsome 1 is going to be analysed
chrList <- Seqinfo("chr1", 249250621, NA)
## Find consensus regions with both experiments
results <- findConsensusPeakRegions(
narrowPeaks = c(A549_CTCF_MYJ_NarrowPeaks_partial,
A549_CTCF_MYN_NarrowPeaks_partial),
peaks = c(A549_CTCF_MYJ_Peaks_partial,
A549_CTCF_MYN_Peaks_partial),
chrInfo = chrList,
extendingSize = 300,
expandToFitPeakRegion = TRUE,
shrinkToFitPeakRegion = FALSE,
minNbrExp = 2,
nbrThreads = 1)
## Print 2 first consensus regions
head(results$consensusRanges, 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.