Skip to content
Prev 4860 / 21307 Next

[Bioc-devel] odd param behavior with scanBam from Rsamtools 1.14.1

Ok, that makes more sense. Thanks!

Jason

-----Original Message-----
From: Martin Morgan [mailto:mtmorgan at fhcrc.org] 
Sent: Thursday, October 31, 2013 2:03 PM
To: Jason Byars; bioc-devel at r-project.org
Subject: Re: [Bioc-devel] odd param behavior with scanBam from Rsamtools 1.14.1
On 10/31/2013 12:54 PM, Jason Byars wrote:
countBam, filterBam, etc. But, when I use a ScanBamParam object without anything specified for "what" with scanBam, I get a length 0 list back. If all I add is what=ScanBamWhat(), the call appears to work fine. I have tried this on both Windows and Linux, and with a clean install of R and Bioconductor 2.13. Is this behavior correct? Example script follows:

yes, its the way it was designed, however poorly -- you don't ask for any fields, so you don't get any fields. countBam and filterBam are about visiting records, and records exist even when none of their fields are consulted. It's like

 > data.frame(x=1:10)[,FALSE, drop=FALSE] data frame with 0 columns and 10 rows

where there are 10 rows (records), but no columns (fields).

Martin
--
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793