[Bioc-devel] TabixFileList() constructor broken in devel

Robert Castelo robert.castelo at upf.edu
Thu Dec 29 17:55:27 CET 2016

hi Lori,

thanks for the clarification. if this is an intended change then i'd say 
the documentation needs to be updated since, as i showed in my email 
below, it currently says that for functions such as 'TabixFileList()' 
the input 'file' argument should be a 'TabixFile' instance and not a 
character vector.

this change also means the input is switching from a 'TabixFile' 
instance to a 'character' vector, so pipelines or packages doing calls 
to 'TabixFileList()' that have been passing 'TabixFile' instances as 
arguments will have to update those calls to pass a character vector.

  i'd suggest that if there's no good reason to switch, it would be 
safer to add the character vector as an additional possibility in the 
input argument 'file', just as with 'countTabix()', and minimize 
possible breaks of pipelines/packages using 'TabixFileList()'. i've 
encountered this problem because my own package VariantFiltering calls 
'TabixFileList()' although is not a big deal to fix it.



On 28/12/2016 19:44, Shepherd, Lori wrote:
> Thank you for bringing this to our attention. There were some updates 
> made a few weeks ago to the behavior and input of 'TabixFileList()' . 
>  Its current implementation will work with a character vector as 
> input.  I will investigate further into why this change was made and 
> if it needs to be addressed.
> In the meantime:
> TabixFileList(tbx)
> will throw an ERROR, but you can still use the same file that was used 
> to create the TabixFile
> tbx <- open(TabixFile(fl, yieldSize=100))
> TabixFileList(fl)
> Lori Shepherd
> Bioconductor Core Team
> Roswell Park Cancer Institute
> Department of Biostatistics & Bioinformatics
> Elm & Carlton Streets
> Buffalo, New York 14263
> ------------------------------------------------------------------------
> *From:* Bioc-devel <bioc-devel-bounces at r-project.org> on behalf of 
> Robert Castelo <robert.castelo at upf.edu>
> *Sent:* Wednesday, December 28, 2016 11:50:58 AM
> *To:* bioc-devel at r-project.org
> *Subject:* [Bioc-devel] TabixFileList() constructor broken in devel
> hi,
> the 'TabixFileList()' constructor in Rsamtools seems to be broken in 
> devel:
> library(Rsamtools)
> example(TabixFileList) ## which actually does not construct any
> 'TabixFileList'
> TabixFileList(tbx)
> Error in as.vector(x, "character") :
>    cannot coerce type 'environment' to vector of type 'character'
> while in release this works fine:
> library(Rsamtools)
> example(TabixFileList) ## which actually does not construct any
> 'TabixFileList'
> TabixFileList(tbx)
> TabixFileList of length 1
> names(1): example.gtf.gz
> the man page has not changed between devel and release and the current
> description of the argument 'file' supports the use of a 'TabixFile'
> instance as input:
>      file: For TabixFile(), A character(1) vector to the tabix file
>            path; can be remote (http://, ftp://). For ‘countTabix’, a
>            character(1) or ‘TabixFile’ instance. For others, a
>            ‘TabixFile’ instance.
> please find below my session information for the devel run.
> thanks!
> robert.
> sessionInfo()
> R Under development (unstable) (2016-11-17 r71661)
> Platform: x86_64-apple-darwin16.1.0 (64-bit)
> Running under: macOS Sierra 10.12.2
> 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] stats4    parallel  stats     graphics  grDevices utils     datasets
> [8] methods   base
> other attached packages:
>   [1] Rsamtools_1.27.9      Biostrings_2.43.1 XVector_0.15.0
>   [4] GenomicRanges_1.27.17 GenomeInfoDb_1.11.6 IRanges_2.9.14
>   [7] S4Vectors_0.13.5      BiocGenerics_0.21.1 setwidth_1.0-4
> [10] colorout_1.1-0
> loaded via a namespace (and not attached):
> [1] zlibbioc_1.21.0    compiler_3.4.0 tools_3.4.0 BiocParallel_1.9.3
> [5] bitops_1.0-6
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
> This email message may contain legally privileged and/or confidential 
> information. If you are not the intended recipient(s), or the employee 
> or agent responsible for the delivery of this message to the intended 
> recipient(s), you are hereby notified that any disclosure, copying, 
> distribution, or use of this email message is prohibited. If you have 
> received this message in error, please notify the sender immediately 
> by e-mail and delete this email message from your computer. Thank you. 

	[[alternative HTML version deleted]]

More information about the Bioc-devel mailing list