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

Re: [Bioc-devel] Combining Ordinary List of GRanges Optimisation

2013-01-07 Thread Michael Lawrence
The merging of the sequence information is essentially a Reduce(). The rest of the components are merged N-way. Michael On Mon, Jan 7, 2013 at 9:18 AM, Ryan C. Thompson wrote: > With such a huge difference, I would wonder if the "c" method for GRanges > objects is doing N-1 pairwise merges inste

Re: [Bioc-devel] Combining Ordinary List of GRanges Optimisation

2013-01-07 Thread Ryan C. Thompson
With such a huge difference, I would wonder if the "c" method for GRanges objects is doing N-1 pairwise merges instead of a single N-way merge. On Mon 07 Jan 2013 09:08:28 AM PST, Michael Lawrence wrote: Would be interesting to do some profiling. Could be the merging of the sequence info, or t

Re: [Bioc-devel] Combining Ordinary List of GRanges Optimisation

2013-01-07 Thread Michael Lawrence
Would be interesting to do some profiling. Could be the merging of the sequence info, or the rbind on the meta DataFrames (even with one column, could be some overhead here). Michael On Mon, Jan 7, 2013 at 12:31 AM, Hahne, Florian wrote: > Hi Dario, > the most efficient way to transform between

Re: [Bioc-devel] Combining Ordinary List of GRanges Optimisation

2013-01-07 Thread Hahne, Florian
Hi Dario, the most efficient way to transform between list-like structures of GRanges objects and single GRanges is to use the GRangesList class in the first place. Not sure how you came up with your initial list, but assuming that blockRanges is already a GRangesList object, unlist(blockRanges) wi