Re: issue writing to pipe with bio sequoia
Mark A Jensen <[email protected]> Tue, 31 May 2016 11:07:45 -0400
| Newsgroups | gmane.comp.lang.perl.bio.general |
|---|---|
| Message-ID | <[email protected]> |
Stephane, Roy Can we open issue at github, bioperl-live ? Mark On Tue, May 31, 2016 at 10:53 AM, Roy Chaudhuri < [email protected] [[email protected]] > wrote: Hi Stephane, According to the SeqIO docs your way should work, so this is probably a bug. However, Bio::SeqIO can accept a filehandle instead using the -fh option, so as a workaround you could try something like this: open my $fh, '|$bgzip -c > $outfile.gz' or die $!; $seq_out=Bio::SeqIO->newFh(-format=>'fasta', -fh=>$fh); Cheers, Roy. On 31/05/2016 15:06, Stephane Plaisance | VIB | wrote: > Dear, > I try to bgzip my fasta outpmut fbut have an issue > > > my $seq_out; > if ( defined($zipit) ) { > my $bgzip = `which bgzip`; > chomp($bgzip); > die "No bgzip command available\n" unless ( $bgzip ); > $seq_out = Bio::SeqIO -> newFh( -format => 'Fasta', -file => " | $bgzip -c > $outfile\.gz"); > } else { > $seq_out = Bio::SeqIO -> newFh( -format => 'Fasta', -file => ">$outfile" ); > } > > the code fails although bgzip is in my path and the $bgzip variable sets it right > Any help is very welcome > > Stephane > _______________________________________________ > Bioperl-l mailing list > [email protected] > http://mailman.open-bio.org/mailman/listinfo/bioperl-l > _______________________________________________ Bioperl-l mailing list [email protected] http://mailman.open-bio.org/mailman/listinfo/bioperl-l _______________________________________________ Bioperl-l mailing list [email protected] http://mailman.open-bio.org/mailman/listinfo/bioperl-l