[BioC] GRanges findOverlaps error

Kathi Zarnack zarnack at ebi.ac.uk
Fri Oct 21 13:50:32 CEST 2011


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



More information about the Bioconductor mailing list