Re: [Bioc-devel] BamFile validation

2013-01-08 Thread Nicolas Delhomme
Hi Martin, On 8 Jan 2013, at 19:53, Martin Morgan wrote: > On 01/07/2013 12:32 PM, Nicolas Delhomme wrote: >> Hi Martin, Marc, >> >> I'm now implementing the use of BamFile objects in easyRNASeq and I like >> them. I think it would be very useful if when constructing a BamFile the >> existence o

Re: [Bioc-devel] BamFile validation

2013-01-08 Thread Martin Morgan
On 01/07/2013 12:32 PM, Nicolas Delhomme wrote: Hi Martin, Marc, I'm now implementing the use of BamFile objects in easyRNASeq and I like them. I think it would be very useful if when constructing a BamFile the existence of the path and index could be tested; i.e. this works: BamFile("test.bam",

Re: [Bioc-devel] BamFile validation

2013-01-07 Thread Hervé Pagès
Hi there, FWIW system.file() has the 'mustWork' arg for this. Strange name though since the man page suggests it only tests for existence, not that the file can actually be open for reading. H. On 01/07/2013 11:11 PM, Nicolas Delhomme wrote: Just to clarify. I don't mean it needs to validate t

Re: [Bioc-devel] BamFile validation

2013-01-07 Thread Nicolas Delhomme
Just to clarify. I don't mean it needs to validate the BAM file (i.e. checking that it's properly formatted), so using file.exists on the provided file paths would be sufficient. --- Nicolas Delhomme Genome Biology Computational Suppor

Re: [Bioc-devel] BamFile validation

2013-01-07 Thread Ryan Thompson
Couldn't one test for existence by trying to open the BamFile object, and possibly read one sequence (or maybe just read the header since I guess a valid bam file can contain zero sequences)? On Jan 7, 2013 1:32 PM, "Henrik Bengtsson" wrote: > On Mon, Jan 7, 2013 at 12:32 PM, Nicolas Delhomme >

Re: [Bioc-devel] BamFile validation

2013-01-07 Thread Henrik Bengtsson
On Mon, Jan 7, 2013 at 12:32 PM, Nicolas Delhomme wrote: > Hi Martin, Marc, > > I'm now implementing the use of BamFile objects in easyRNASeq and I like > them. I think it would be very useful if when constructing a BamFile the > existence of the path and index could be tested; i.e. this works:

[Bioc-devel] BamFile validation

2013-01-07 Thread Nicolas Delhomme
Hi Martin, Marc, I'm now implementing the use of BamFile objects in easyRNASeq and I like them. I think it would be very useful if when constructing a BamFile the existence of the path and index could be tested; i.e. this works: BamFile("test.bam","test.bam.bai") although these files do not exi