R/plot_ChIPseeker_annotation.R
plot_ChIPseeker_annotation.Rd
This function annotates peaks using ChIPseeker::annotatePeak
.
It outputs functional annotation of each peak file in a barplot.
plot_ChIPseeker_annotation(
peaklist,
txdb = NULL,
tss_distance = c(-3000, 3000),
interact = FALSE
)
A list of peak files as GRanges object.
Files must be listed and named using list()
.
e.g. list("name1"=file1, "name2"=file2)
.
If not named, default file names will be assigned.
A TxDb annotation object from Bioconductor.
A vector specifying the distance upstream and downstream
around transcription start sites (TSS).
The default value is c(-3000,3000)
; meaning peak frequency
3000bp upstream and downstream of TSS will be displayed.
Default TRUE. By default, plots are interactive. If set FALSE, all plots in the report will be static.
ggplot barplot
### Load Data ###
data("CnT_H3K27ac") # example peakfile GRanges object
data("CnR_H3K27ac") # example peakfile GRanges object
peaklist <- list("CnT"=CnT_H3K27ac, "CnR"=CnR_H3K27ac)
my_plot <- plot_ChIPseeker_annotation(peaklist = peaklist,
tss_distance = c(-50,50))
#> --- Running plot_ChIPseeker_annotation() ---
#> Warning: >> TxDb is not specified, use 'TxDb.Hsapiens.UCSC.hg19.knownGene' by default...
#> Warning: >> TxDb is not specified, use 'TxDb.Hsapiens.UCSC.hg19.knownGene' by default...
#> Done.