View source: R/overlap_stat_plot.R
overlap_stat_plot | R Documentation |
This function calculates the statistical significance of overlapping/ non-overlapping peaks against a reference peak file. If the reference peak file has the BED6+4 format (peak called by MACS2), the function generates a series of box plots showing the distribution of q-values for sample peaks that are overlapping and non-overlapping with the reference. If the reference peak file does not have the BED6+4 format, the function uses enrichPeakOverlap from ChIPseeker package to calculate the statistical significance of overlapping peaks only. In this case, please provide an annotation file as a TxDb object.
overlap_stat_plot(
reference,
peaklist,
txdb = NULL,
interact = FALSE,
nShuffle = 50,
digits = 4,
workers = check_workers()
)
reference |
A reference peak file as GRanges object. |
peaklist |
A list of peak files as GRanges object.
Files must be listed and named using |
txdb |
A TxDb annotation object from Bioconductor. This is required only if the reference file does not have BED6+4 format. |
interact |
Default TRUE. By default, plots are interactive. If set FALSE, all plots in the report will be static. |
nShuffle |
shuffle numbers |
digits |
integer indicating the number of decimal places
( |
workers |
Number of threads to parallelize across. |
A named list.
"plot"boxplot/barplot showing the statistical significance of overlapping/non-overlapping peaks.
"data"Plot data.
### Load Data ###
data("encode_H3K27ac") # example peakfile GRanges object
data("CnT_H3K27ac") # example peakfile GRanges object
data("CnR_H3K27ac") # example peakfile GRanges object
### Create Named Peaklist & Reference ###
peaklist <- list('CnT'=CnT_H3K27ac, "CnR"=CnR_H3K27ac)
reference <- list("ENCODE"=encode_H3K27ac)
out <- overlap_stat_plot(reference = reference,
peaklist = peaklist,
workers = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.