sanger-pathogens / assembly_improvement

Improve the quality of a denovo assembly by scaffolding and gap filling
Other
56 stars 21 forks source link

Use gunzip role instead of bio perl to handle zipped files #50

Closed nds closed 9 years ago

nds commented 9 years ago

Changed to using existing gunzip role instead of Bio Perl to handle zipped files.

In older versions of Bio/Root/IO.pm the following line was used to open files:

open ($fh,$file) || $self->throw("Could not open $file: $!");

In newer versions (on the farm and pcs5), the following line is used with $mode defaulting to "<" regardless of what is contained in $file.

open $fh, $mode, $file or $self->throw("Could not $action file '$file': $!");

So, for example, when we use:

$fastq_obj = Bio::SeqIO->new( -file => "gunzip -c myfile.gz |" , -format => 'Fastq');

This becomes:

open $fh, '<', 'gunzip -c myfile.gz |'

causing the following error:

Could not read file 'gunzip -c myfile.gz |': No such file or directory

I have submitted a report.