Question: ChipPeakAnno:getAnnotation using UCSC instead of ensembl
0
gravatar for trent.fowler
4.5 years ago by
United States
trent.fowler0 wrote:

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.2k views
ADD COMMENTlink modified 4.5 years ago by Ou, Jianhong1.1k • written 4.5 years ago by trent.fowler0
Answer: ChipPeakAnno:getAnnotation using UCSC instead of ensembl
1
gravatar for Ou, Jianhong
4.5 years ago by
Ou, Jianhong1.1k
United States
Ou, Jianhong1.1k wrote:

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 COMMENTlink written 4.5 years ago by Ou, Jianhong1.1k
Answer: ChipPeakAnno:getAnnotation using UCSC instead of ensembl
0
gravatar for Panagiotis Moulos
4.5 years ago by
Greece
Panagiotis Moulos30 wrote:

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 COMMENTlink written 4.5 years ago by Panagiotis Moulos30
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 532 users visited in the last hour