GRanges findOverlaps error
2
0
Entering edit mode
Kathi Zarnack ▴ 110
@kathi-zarnack-4596
Last seen 9.6 years ago
Hi, I am using findOverlaps() to compare two GRanges objects (shown below). ensembl.genes was created with rtracklayer import.gff(...,genome="hg19"), so it contains additional information about the genome. exons was created manually from a list of positions etc. It seems that I can no longer compare the two objects which previously worked fine (I am not sure whether I already used this script on R-devel, but it definitely worked on R-2.13). I would be happy for any suggestions how to overcome this problem. Thanks for your help, Kathi > findOverlaps(ensembl.genes,exons) Error in genome(y) : no slot of name "genome" for this object of class "Seqinfo" > head(exons) GRanges with 6 ranges and 7 elementMetadata values: seqnames ranges strand | phase section.id <rle> <iranges> <rle> | <numeric> <character> [1] chr1 [ 704549, 704591] - | 1 CUFF.1135:003 [2] chr1 [ 764383, 764484] + | 0 CUFF.825:003 [3] chr1 [1654546, 1654661] - | 2 CUFF.6345:097 [4] chr1 [2303220, 2303344] - | 2 CUFF.5141:008 [5] chr1 [3776984, 3777005] + | 1 CUFF.2849:006 [6] chr1 [6297305, 6297405] + | 2 CUFF.3421:002 exon.position splice.3 splice.5 ensembl.overlap ensg <character> <logical> <logical> <character> <logical> [1] terminal TRUE FALSE novel <na> [2] internal TRUE TRUE any_overlap <na> [3] terminal FALSE TRUE novel <na> [4] internal TRUE FALSE any_overlap <na> [5] terminal TRUE FALSE any_overlap <na> [6] internal TRUE TRUE any_overlap <na> --- seqlengths: chr1 chr10 chr11 chr12 chr13 chr14 ... chr6 chr7 chr8 chr9 chrX chrY NA NA NA NA NA NA ... NA NA NA NA NA NA > head(ensembl.genes) GRanges with 6 ranges and 1 elementMetadata value: seqnames ranges strand | ensg <rle> <iranges> <rle> | <character> [1] chrX [ 99883667, 99894988] - | ENSG00000000003 [2] chrX [ 99839799, 99854882] + | ENSG00000000005 [3] chr20 [ 49551404, 49575092] - | ENSG00000000419 [4] chr1 [169821804, 169863408] - | ENSG00000000457 [5] chr1 [169631245, 169823221] + | ENSG00000000460 [6] chr1 [ 27938575, 27961788] - | ENSG00000000938 --- seqlengths: chr1 chr10 ... chrY NA NA ... NA > sessionInfo() R Under development (unstable) (2011-08-14 r56741) Platform: x86_64-unknown-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8 [5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8 [7] LC_PAPER=C LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] DEXSeq_0.1.29 Biobase_2.13.10 biomaRt_2.9.3 [4] xtable_1.5-6 GenomicRanges_1.5.49 IRanges_1.11.30 [7] R.utils_1.8.2 R.oo_1.8.2 R.methodsS3_1.2.1 [10] rtracklayer_1.13.17 RCurl_1.6-10 bitops_1.0-4.1 loaded via a namespace (and not attached): [1] Biostrings_2.21.11 BSgenome_1.21.6 hwriter_1.3 MASS_7.3-14 [5] plyr_1.6 stringr_0.5 tools_2.14.0 XML_3.4-3 [9] zlibbioc_0.1.8 > -- Dr. Kathi Zarnack Luscombe Group European Bioinformatics Institute Wellcome Trust Genome Campus Hinxton, Cambridge CB10 1SD, UK tel +44 1223 494 526
• 1.1k views
ADD COMMENT
0
Entering edit mode
@michael-lawrence-3846
Last seen 2.4 years ago
United States
ensembl.genes <- IRanges::updateObject(ensembl.genes) exons <- IRanges::updateObject(exons) And save those. Btw, you should really get the ensembl.gene information using GenomicFeatures, using makeTranscriptDbFromUCSC and going for the ensGene table. On Fri, Oct 21, 2011 at 4:50 AM, Kathi Zarnack <zarnack@ebi.ac.uk> wrote: > Hi, > > I am using findOverlaps() to compare two GRanges objects (shown below). > ensembl.genes was created with rtracklayer import.gff(...,genome="hg19"), so > it contains additional information about the genome. exons was created > manually from a list of positions etc. It seems that I can no longer compare > the two objects which previously worked fine (I am not sure whether I > already used this script on R-devel, but it definitely worked on R-2.13). I > would be happy for any suggestions how to overcome this problem. > > Thanks for your help, > Kathi > > > findOverlaps(ensembl.genes,**exons) > Error in genome(y) : > no slot of name "genome" for this object of class "Seqinfo" > > > head(exons) > GRanges with 6 ranges and 7 elementMetadata values: > seqnames ranges strand | phase section.id > <rle> <iranges> <rle> | <numeric> <character> > [1] chr1 [ 704549, 704591] - | 1 CUFF.1135:003 > [2] chr1 [ 764383, 764484] + | 0 CUFF.825:003 > [3] chr1 [1654546, 1654661] - | 2 CUFF.6345:097 > [4] chr1 [2303220, 2303344] - | 2 CUFF.5141:008 > [5] chr1 [3776984, 3777005] + | 1 CUFF.2849:006 > [6] chr1 [6297305, 6297405] + | 2 CUFF.3421:002 > exon.position splice.3 splice.5 ensembl.overlap ensg > <character> <logical> <logical> <character> <logical> > [1] terminal TRUE FALSE novel <na> > [2] internal TRUE TRUE any_overlap <na> > [3] terminal FALSE TRUE novel <na> > [4] internal TRUE FALSE any_overlap <na> > [5] terminal TRUE FALSE any_overlap <na> > [6] internal TRUE TRUE any_overlap <na> > --- > seqlengths: > chr1 chr10 chr11 chr12 chr13 chr14 ... chr6 chr7 chr8 chr9 chrX > chrY > NA NA NA NA NA NA ... NA NA NA NA NA > NA > > > head(ensembl.genes) > GRanges with 6 ranges and 1 elementMetadata value: > seqnames ranges strand | ensg > <rle> <iranges> <rle> | <character> > [1] chrX [ 99883667, 99894988] - | ENSG00000000003 > [2] chrX [ 99839799, 99854882] + | ENSG00000000005 > [3] chr20 [ 49551404, 49575092] - | ENSG00000000419 > [4] chr1 [169821804, 169863408] - | ENSG00000000457 > [5] chr1 [169631245, 169823221] + | ENSG00000000460 > [6] chr1 [ 27938575, 27961788] - | ENSG00000000938 > --- > seqlengths: > chr1 chr10 ... chrY > NA NA ... NA > > > sessionInfo() > R Under development (unstable) (2011-08-14 r56741) > Platform: x86_64-unknown-linux-gnu (64-bit) > > locale: > [1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C > [3] LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8 > [5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8 > [7] LC_PAPER=C LC_NAME=C > [9] LC_ADDRESS=C LC_TELEPHONE=C > [11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] DEXSeq_0.1.29 Biobase_2.13.10 biomaRt_2.9.3 > [4] xtable_1.5-6 GenomicRanges_1.5.49 IRanges_1.11.30 > [7] R.utils_1.8.2 R.oo_1.8.2 R.methodsS3_1.2.1 > [10] rtracklayer_1.13.17 RCurl_1.6-10 bitops_1.0-4.1 > > loaded via a namespace (and not attached): > [1] Biostrings_2.21.11 BSgenome_1.21.6 hwriter_1.3 MASS_7.3-14 > [5] plyr_1.6 stringr_0.5 tools_2.14.0 XML_3.4-3 > [9] zlibbioc_0.1.8 > > > > -- > Dr. Kathi Zarnack > Luscombe Group > European Bioinformatics Institute > Wellcome Trust Genome Campus > Hinxton, Cambridge > CB10 1SD, UK > tel +44 1223 494 526 > > ______________________________**_________________ > Bioconductor mailing list > Bioconductor@r-project.org > https://stat.ethz.ch/mailman/**listinfo/bioconductor<https: stat.et="" hz.ch="" mailman="" listinfo="" bioconductor=""> > Search the archives: http://news.gmane.org/gmane.** > science.biology.informatics.**conductor<http: news.gmane.org="" gmane.="" science.biology.informatics.conductor=""> > [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
@vincent-j-carey-jr-4
Last seen 6 weeks ago
United States
ensure that you have current package versions and then try updateObject() on the constituents of your call. if that doesn't work let us know. On Fri, Oct 21, 2011 at 7:50 AM, Kathi Zarnack <zarnack at="" ebi.ac.uk=""> wrote: > Hi, > > I am using findOverlaps() to compare two GRanges objects (shown below). > ensembl.genes was created with rtracklayer import.gff(...,genome="hg19"), so > it contains additional information about the genome. exons was created > manually from a list of positions etc. It seems that I can no longer compare > the two objects which previously worked fine (I am not sure whether I > already used this script on R-devel, but it definitely worked on R-2.13). I > would be happy for any suggestions how to overcome this problem. > > Thanks for your help, > Kathi > >> findOverlaps(ensembl.genes,exons) > Error in genome(y) : > ?no slot of name "genome" for this object of class "Seqinfo" > >> head(exons) > GRanges with 6 ranges and 7 elementMetadata values: > ? ? ?seqnames ? ? ? ? ? ? ranges strand | ? ? phase ? ?section.id > <rle> <iranges> <rle> | <numeric> <character> > ?[1] ? ? chr1 [ 704549, ?704591] ? ? ?- | ? ? ? ? 1 CUFF.1135:003 > ?[2] ? ? chr1 [ 764383, ?764484] ? ? ?+ | ? ? ? ? 0 ?CUFF.825:003 > ?[3] ? ? chr1 [1654546, 1654661] ? ? ?- | ? ? ? ? 2 CUFF.6345:097 > ?[4] ? ? chr1 [2303220, 2303344] ? ? ?- | ? ? ? ? 2 CUFF.5141:008 > ?[5] ? ? chr1 [3776984, 3777005] ? ? ?+ | ? ? ? ? 1 CUFF.2849:006 > ?[6] ? ? chr1 [6297305, 6297405] ? ? ?+ | ? ? ? ? 2 CUFF.3421:002 > ? ? ?exon.position ?splice.3 ?splice.5 ensembl.overlap ? ? ?ensg > <character> <logical> <logical> <character> <logical> > ?[1] ? ? ?terminal ? ? ?TRUE ? ? FALSE ? ? ? ? ? novel <na> > ?[2] ? ? ?internal ? ? ?TRUE ? ? ?TRUE ? ? any_overlap <na> > ?[3] ? ? ?terminal ? ? FALSE ? ? ?TRUE ? ? ? ? ? novel <na> > ?[4] ? ? ?internal ? ? ?TRUE ? ? FALSE ? ? any_overlap <na> > ?[5] ? ? ?terminal ? ? ?TRUE ? ? FALSE ? ? any_overlap <na> > ?[6] ? ? ?internal ? ? ?TRUE ? ? ?TRUE ? ? any_overlap <na> > ?--- > ?seqlengths: > ? ?chr1 chr10 chr11 chr12 chr13 chr14 ... ?chr6 ?chr7 ?chr8 ?chr9 ?chrX > ?chrY > ? ? ?NA ? ?NA ? ?NA ? ?NA ? ?NA ? ?NA ... ? ?NA ? ?NA ? ?NA ? ?NA ? ?NA > ?NA > >> head(ensembl.genes) > GRanges with 6 ranges and 1 elementMetadata value: > ? ? ?seqnames ? ? ? ? ? ? ? ? ranges strand | ? ? ? ? ? ?ensg > <rle> <iranges> <rle> | <character> > ?[1] ? ? chrX [ 99883667, ?99894988] ? ? ?- | ENSG00000000003 > ?[2] ? ? chrX [ 99839799, ?99854882] ? ? ?+ | ENSG00000000005 > ?[3] ? ?chr20 [ 49551404, ?49575092] ? ? ?- | ENSG00000000419 > ?[4] ? ? chr1 [169821804, 169863408] ? ? ?- | ENSG00000000457 > ?[5] ? ? chr1 [169631245, 169823221] ? ? ?+ | ENSG00000000460 > ?[6] ? ? chr1 [ 27938575, ?27961788] ? ? ?- | ENSG00000000938 > ?--- > ?seqlengths: > ? ? ? ? ? ? ? ? chr1 ? ? ? ? ? ? ?chr10 ... ? ? ? ? ? ? ? chrY > ? ? ? ? ? ? ? ? ? NA ? ? ? ? ? ? ? ? NA ... ? ? ? ? ? ? ? ? NA > >> sessionInfo() > R Under development (unstable) (2011-08-14 r56741) > Platform: x86_64-unknown-linux-gnu (64-bit) > > locale: > ?[1] LC_CTYPE=en_GB.UTF-8 ? ? ? LC_NUMERIC=C > ?[3] LC_TIME=en_GB.UTF-8 ? ? ? ?LC_COLLATE=en_GB.UTF-8 > ?[5] LC_MONETARY=en_GB.UTF-8 ? ?LC_MESSAGES=en_GB.UTF-8 > ?[7] LC_PAPER=C ? ? ? ? ? ? ? ? LC_NAME=C > ?[9] LC_ADDRESS=C ? ? ? ? ? ? ? LC_TELEPHONE=C > [11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C > > attached base packages: > [1] stats ? ? graphics ?grDevices utils ? ? datasets ?methods ? base > > other attached packages: > ?[1] DEXSeq_0.1.29 ? ? ? ?Biobase_2.13.10 ? ? ?biomaRt_2.9.3 > ?[4] xtable_1.5-6 ? ? ? ? GenomicRanges_1.5.49 IRanges_1.11.30 > ?[7] R.utils_1.8.2 ? ? ? ?R.oo_1.8.2 ? ? ? ? ? R.methodsS3_1.2.1 > [10] rtracklayer_1.13.17 ?RCurl_1.6-10 ? ? ? ? bitops_1.0-4.1 > > loaded via a namespace (and not attached): > [1] Biostrings_2.21.11 BSgenome_1.21.6 ? ?hwriter_1.3 ? ? ? ?MASS_7.3-14 > [5] plyr_1.6 ? ? ? ? ? stringr_0.5 ? ? ? ?tools_2.14.0 ? ? ? XML_3.4-3 > [9] zlibbioc_0.1.8 >> > > -- > Dr. Kathi Zarnack > Luscombe Group > European Bioinformatics Institute > Wellcome Trust Genome Campus > Hinxton, Cambridge > CB10 1SD, UK > tel +44 1223 494 526 > > _______________________________________________ > 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 >
ADD COMMENT

Login before adding your answer.

Traffic: 738 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