ChipPeakAnno:getAnnotation using UCSC instead of ensembl
2
0
Entering edit mode
@trentfowler-7229
Last seen 6.7 years ago
United States

Hello,

For various reasons, I am obligated to analyze RNA and Chip sequencing data with a UCSC reference genome and to annotate with the program ChIPpeakanno. However, I can only get Chippeakanno to work with an ensemble reference generated by ....

mart = useMart(biomart = "ensembl", dataset = "mmusculus_gene_ensembl")

getAnnotation(mart, featureType = "TSS")

data(TSS.mouse.NCBIM37)

slotNames(TSS.mouse.NCBIM37)

 

UCSC is not available through this method and I have not been able to view this object in order to get the correct UCSC data in the proper format. Any suggestions, other than repeating three weeks of RNA and Chip-seq work with ensemble, would be welcome.

 

annotation chippeakanno • 1.4k views
ADD COMMENT
1
Entering edit mode
Ou, Jianhong ★ 1.2k
@ou-jianhong-4539
Last seen 10 weeks ago
United States

Hi,

If you want just gene level, you could have a try:

library(GenomicFeatures)

library(TxDb.Mmusculus.UCSC.mm10.knownGene)

ucsc.mm10.knownGene <- genes(TxDb.Mmusculus.UCSC.mm10.knownGene)

ucsc.mm10.knownGene.rd <- as(genes, "RangedData")

And then use this as annotation

ADD COMMENT
0
Entering edit mode
@panagiotis-moulos-6764
Last seen 6.1 years ago
Greece

Hello,

You can use the function get.annotation from the package metaseqR. The call should be

ann <- get.annotation("mm9","gene",refdb="ucsc")

for a simple data frame which looks like a bed file with locations, gene names and also the biotype categorization from Ensembl. One of the packages RMySQL or RSQLite should be present. You can convert the resulting data frame to a GRanges object (required I believe by ChIPpeakanno) with:

library(GenomicRanges)
ann.gr <- makeGRangesFromDataFrame(
    df=ann,
    keep.extra.columns=TRUE,
    seqnames.field="chromosome"
)

If you want to define a region around the TSS, let's say -1kb, + 1kb, you can create a new GRanges as follows:

ann.prom <- ann
new.start <- apply(ann.prom,1,function(x,len) {
    if (x[6]=="+") return(as.numeric(x[2])-len) else return(as.numeric(x[3])-len)
},1000)
new.end <- apply(ann.prom,1,function(x,len) {
    if (x[6]=="+") return(as.numeric(x[2])+len) else return(as.numeric(x[3])+len)
},1000)
ann.prom$start <- new.start
ann.prom$end <- new.end
ann.prom.gr <- makeGRangesFromDataFrame(
    df=ann.prom,
    keep.extra.columns=TRUE,
    seqnames.field="chromosome"
)

Hope these will help.
Cheers.

ADD COMMENT

Login before adding your answer.

Traffic: 253 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6