Skip to content

Instantly share code, notes, and snippets.

View GuangchuangYu's full-sized avatar
🎯
Focusing

Guangchuang Yu GuangchuangYu

🎯
Focusing
View GitHub Profile
require(TxDb.Hsapiens.UCSC.hg19.knownGene)
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
library(ChIPseeker)
library(GenomicRanges)
# Hack chipseeker function to add annotaiton
getGenomicAnnoStat <- function(peakAnno) {
if ( class(peakAnno) == "GRanges" )
peakAnno <- as.data.frame(peakAnno)
anno <- peakAnno$annotation
## anno <- sub(" \\(.+", "", anno)