This wrapper function takes the peak files generated by MACS2 as a input. Together with TxDb and Organism packages, it calls ChIPseeker::annotatePeak() to get peaks annotated.
1 2 3 4 | getMACSPeaksAnno(peakFile, genome = "mm",
txdb = NULL, annoDb = NULL,
rmsk = NULL, skip = 26,
annotate.repeat = TRUE)
|
peakFile |
A character string indicating the peak file genereated by MACS. |
genome |
I should get rid of this argument... |
txdb |
A TxDb object. |
annoDb |
A character string indicating the genome annotation package, such as org.hg.eg.db. |
rmsk |
A GRange instance of repeat masker (RMSK). |
skip |
An integer specifying the head lines in the peak files subject to be skipped. Default to 26. Make sure to open the .xls peak file to confirm. If the skip lines is wrong, them the function would reture errors. |
annotate.repeat |
A logical indicating whether to include repeats annoation. |
A GRanges instance with annotation.
Chao-Jen Wong
## Not run: library(TxDb.Hsapiens.UCSC.hg19.knownGene) mainDir <- "/fh/fast/tapscott_s/CompBio/ATAC-Seq/hg19.MB135.duxiB" macsDir <- file.path(mainDir,"macs2") peak_file <- list.files(macsDir, pattern=".xls$", full.names=TRUE)[1] df <- getMACSPeaksAnno(peak_file genome="hg", skip=21, txdb=TxDb.Hsapiens.UCSC.hg19.knownGene, annoDb="org.Hs.eg.db", annotate.repeat=FALSE) df ## End(Not run)~kwd1 ~kwd2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.