problem with export() in rtracklayer
1
0
Entering edit mode
Aaron Lun ★ 27k
@alun
Last seen 12 hours ago
The city by the bay

There's a problem with the export function in the rtracklayer package, which seems to be influenced by global definitions of con:

> require(rtracklayer)
> export(con="whee.bed", GRanges(1, IRanges(1, 1), score=10)) # works fine.
> con <- rbind(1:5)
> export(con="whee.bed", GRanges(1, IRanges(1, 1), score=10)) # no longer works.
Error in UseMethod("close") :
  no applicable method for 'close' applied to an object of class "c('matrix', 'integer', 'numeric')"

Presumably, this shouldn't be happening.

> sessionInfo()
R version 3.2.1 (2015-06-18)
Platform: i686-pc-linux-gnu (32-bit)
Running under: Ubuntu 14.04.3 LTS

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

attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets
[8] methods   base     

other attached packages:
[1] rtracklayer_1.28.8   GenomicRanges_1.20.5 GenomeInfoDb_1.4.2  
[4] IRanges_2.2.7        S4Vectors_0.6.3      BiocGenerics_0.14.0

loaded via a namespace (and not attached):
 [1] XML_3.98-1.3            Rsamtools_1.20.4        Biostrings_2.36.3      
 [4] bitops_1.0-6            GenomicAlignments_1.4.1 futile.options_1.0.0   
 [7] zlibbioc_1.14.0         XVector_0.8.0           futile.logger_1.4.1    
[10] lambda.r_1.1.7          BiocParallel_1.2.20     tools_3.2.1            
[13] RCurl_1.95-4.7        
rtracklayer export • 890 views
ADD COMMENT
2
Entering edit mode
@michael-lawrence-3846
Last seen 5 months ago
United States

Yea, this was a bug. Fixed in (upcoming) 1.28.9.

ADD COMMENT

Login before adding your answer.

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