Entering edit mode
Hello,
I found one issue with rtracklayer's export.bed function. It seems that it cannot export an empty GRanges object. For example,
> export(GRanges(), con = "test.bed") Error in `$<-.data.frame`(`*tmp*`, "score", value = 0) : replacement has 1 row, data has 0 > sessionInfo() R version 3.4.1 (2017-06-30) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS Sierra 10.12.6 Matrix products: default BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib 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 stats4 stats graphics grDevices utils datasets [8] methods base other attached packages: [1] rtracklayer_1.38.3 GenomicRanges_1.30.3 GenomeInfoDb_1.14.0 [4] IRanges_2.12.0 S4Vectors_0.16.0 BiocGenerics_0.24.0 loaded via a namespace (and not attached): [1] lattice_0.20-35 matrixStats_0.54.0 [3] XML_3.99-0 Rsamtools_1.30.0 [5] Biostrings_2.46.0 GenomicAlignments_1.14.1 [7] bitops_1.0-6 grid_3.4.1 [9] zlibbioc_1.24.0 XVector_0.18.0 [11] Matrix_1.2-14 BiocParallel_1.12.0 [13] tools_3.4.1 Biobase_2.38.0 [15] RCurl_1.96-0 DelayedArray_0.4.1 [17] compiler_3.4.1 SummarizedExperiment_1.8.1 [19] GenomeInfoDbData_0.99.1
Actually, this problem seems to be related to Why export of empty GRanges to GFF fails?, where it was reported that export.gff raised an error upon an empty object.
Can anybody give a look?
Thanks
Thanks for prompt reply. The current release version is 1.42.0 and devel version 1.43.0. Does it mean I need to install from the devel channel?
Please wait a day or so for 1.42.1 to hit the repository.
Just tried out v1.43.0 from bioc v3.9 (devel, which depends on R 3.6). Unfortunately it didn't work...
It's 1.43.1 in devel. If you want to get the fix right now, you'll need to get it out of git.
OK, got you, thanks.