[BioC] GRanges error - Error: identical(colnames(classinfo), colnames(out)) is not TRUE

Richard Birnie [guest] guest at bioconductor.org
Thu Mar 14 17:20:47 CET 2013


Dear all,

I've come up against an error I can't explain trying to extract transcript/gene IDs for a given set of genomic coordinates. I checked the coordinates against the UCSC genome browser so I know that this region does actually contain some genes. The curious thing is that this worked yesterday and doesn't work today. I did upgrade several bioconductor packages overnight and I think it may be down to a change in the version of GenomicRanges but I'm not certain. 

The code below shows a minimal case that reproduces the error message.

library(TxDb.Hsapiens.UCSC.hg19.knownGene)
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
library(GenomicRanges)

#absolute minimal GRanges object
gr <- GRanges(seqnames='chr1', ranges=IRanges(start=40221856, end=40502499), strand='*')

#attempt to get transcript IDs and gene IDs out of TxDb.Hsapiens.UCSC.hg19.knownGene
result <- transcriptsByOverlaps(txdb, gr, columns=c('tx_id', 'tx_name', 'gene_id'))

If I try to display the contents of the object 'result' then I ge t the following:

> result
GRanges with 0 ranges and 3 metadata columns:
Error: identical(colnames(classinfo), colnames(out)) is not TRUE

Output of traceback()
> traceback()
5: stop(paste0(ch, " is not ", if (length(r) > 1L) "all ", "TRUE"), 
       call. = FALSE)
4: stopifnot(identical(colnames(classinfo), colnames(out)))
3: showGenomicRanges(object, margin = "  ", with.classinfo = TRUE, 
       print.seqlengths = TRUE)
2: function (object) 
   standardGeneric("show")(<S4 object of class "GRanges">)
1: function (object) 
   standardGeneric("show")(<S4 object of class "GRanges">)

I did do some searching before posting this and found this in the archives https://stat.ethz.ch/pipermail/bioc-devel/2012-April/003344.html which seems related. I had a look into the GenomicRanges source code and the error seems to occur in the function showGenomicRanges around lines 729-731:

classinfo <- makeClassinfoRowForCompactPrinting(x, .COL2CLASS)
## A sanity check, but this should never happen!
stopifnot(identical(colnames(classinfo), colnames(out)))
out <- rbind(classinfo, out)

That's as far as I've been able to get. 

So, two related questions
1)Am I doing something wrong and if so what can I do to get around this error?
2)Is it possible to install older versions of bioconductor packages and if so how? I'd like to see if I can reprodce this with the previous version of GenomicRanges

Any help appreciated,
Richard

 -- output of sessionInfo(): 

> sessionInfo()
R version 2.15.2 (2012-10-26)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C               LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8     LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8   
 [7] LC_PAPER=C                 LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] org.Hs.eg.db_2.8.0                      RSQLite_0.11.2                          DBI_0.2-5                               TxDb.Hsapiens.UCSC.hg19.knownGene_2.8.0
 [5] GenomicFeatures_1.10.2                  AnnotationDbi_1.20.6                    Biobase_2.18.0                          biomaRt_2.14.0                         
 [9] ggbio_1.6.6                             gridExtra_0.9.1                         scales_0.2.3                            ggplot2_0.9.3.1                        
[13] GenomicRanges_1.10.7                    IRanges_1.16.6                          BiocGenerics_0.4.0                      knitr_1.1                              

loaded via a namespace (and not attached):
 [1] Biostrings_2.26.3        biovizBase_1.6.2         bitops_1.0-5             BSgenome_1.26.1          cluster_1.14.3           colorspace_1.2-1        
 [7] dichromat_2.0-0          digest_0.6.3             evaluate_0.4.3           formatR_0.7              gtable_0.1.2             Hmisc_3.10-1            
[13] labeling_0.1             lattice_0.20-13          MASS_7.3-23              munsell_0.4              parallel_2.15.2          plyr_1.8                
[19] proto_0.3-10             RColorBrewer_1.0-5       RCurl_1.95-4.1           reshape2_1.2.2           Rsamtools_1.10.2         rtracklayer_1.18.2      
[25] stats4_2.15.2            stringr_0.6.2            tools_2.15.2             VariantAnnotation_1.4.12 XML_3.95-0.2             zlibbioc_1.4.0

--
Sent via the guest posting facility at bioconductor.org.



More information about the Bioconductor mailing list