[BioC] TranscriptDb object to RangedData for ChIPpeakAnno

Ou, Jianhong Jianhong.Ou at umassmed.edu
Thu Jul 18 22:04:37 CEST 2013


Hi Alan,

I think one way is that to create object Granges first and then convert it
to RangedData use code like,

exons <- exons(TranscriptDb, columns=NULL)
    introns <- unique(unlist(intronsByTranscript(TranscriptDb)))
    fiveUTRs <- unique(unlist(fiveUTRsByTranscript(TranscriptDb)))
    threeUTRs <- unique(unlist(threeUTRsByTranscript(TranscriptDb)))
    transcripts <- transcripts(TranscriptDb, columns=NULL)


Hope this will help you.
 
Yours sincerely,

Jianhong Ou

LRB 670A
Program in Gene Function and Expression
364 Plantation Street Worcester,
MA 01605




On 7/18/13 3:39 PM, "Alan Smith" <alan.sm310 at gmail.com> wrote:

>Hello All,
>
>I apologize if this email shows up twice to the mailing list.
>
>I'm trying to use ChIPpeakAnno to identify the annotation of ChIP-Seq
>peaks
>for an organism that does not have an annotation package. I have used
>makeTranscriptDbFromGFF to create a transcriptDb object and trying to pass
>it as the annotation data for annotatePeakInBatch function. However, I
>suppose it is not the way to handle that. I tried googling quite a bit but
>no luck.
>
>Is there a way to convert TranscriptDb object to RangedData?
>
>The error I ended up with:
>
>Error in annotatePeakInBatch(t.rangedData, AnnotationData = ep,  :
>  AnnotationData needs to be RangedData object
>
>Please let me know how to approach this issue.
>Thanks for any help.
>Alan
>
>Here is my code and sessionInfo:
>
>library(ChIPpeakAnno)
>test.rangedData = BED2RangedData("ChIP-test.bed")
>test.rangedData
>txdb <- makeTranscriptDbFromGFF(file="spgen.gtf", format="gtf",
>exonRankAttributeName="exon_number", dataSource=paste("eunam",sep=""),
>species="epp")
>saveDb(txdb,file="spgenGTF.sqlite")
>ep <- loadDb("spgenGTF.sqlite",)
>annotatedPeakEP= annotatePeakInBatch(test.rangedData, AnnotationData = ep,
>output="both", maxgap=1000, multiple=TRUE)
>
>Error in annotatePeakInBatch(test.rangedData, AnnotationData = ep,  :
>  AnnotationData needs to be RangedData object
>
>sessionInfo()
>R version 3.0.1 (2013-05-16)
>Platform: x86_64-apple-darwin10.8.0 (64-bit)
>
>locale:
>[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
>
>attached base packages:
>[1] parallel  grid      stats     graphics  grDevices utils     datasets
> methods   base
>
>other attached packages:
> [1] rtracklayer_1.20.4                  ChIPpeakAnno_2.8.0
> GenomicFeatures_1.12.2              limma_3.16.6
> [5] org.Hs.eg.db_2.9.0                  GO.db_2.9.0
>  RSQLite_0.11.4                      DBI_0.2-7
> [9] AnnotationDbi_1.22.6
> BSgenome.Ecoli.NCBI.20080805_1.3.17 BSgenome_1.28.0
>GenomicRanges_1.12.4
>[13] Biostrings_2.28.0                   IRanges_1.18.2
> multtest_2.16.0                     Biobase_2.20.1
>[17] biomaRt_2.16.0                      BiocGenerics_0.6.0
> VennDiagram_1.6.0
>
>loaded via a namespace (and not attached):
> [1] bitops_1.0-5     MASS_7.3-27      RCurl_1.95-4.1   Rsamtools_1.12.3
>splines_3.0.1    stats4_3.0.1     survival_2.37-4  tools_3.0.1
> [9] XML_3.95-0.2     zlibbioc_1.6.0
>
>	[[alternative HTML version deleted]]
>
>_______________________________________________
>Bioconductor mailing list
>Bioconductor at r-project.org
>https://stat.ethz.ch/mailman/listinfo/bioconductor
>Search the archives:
>http://news.gmane.org/gmane.science.biology.informatics.conductor



More information about the Bioconductor mailing list