[Bioperl-l] Using IO::Filter::gzip with Bio::SeqIO

Tony Cox avc at sanger.ac.uk
Fri Feb 14 10:09:27 EST 2003


On Fri, 14 Feb 2003, Ewan Birney wrote:

+>
+>
+>On Thu, 13 Feb 2003, Michael Muratet wrote:
+>
+>> Greetings
+>>
+>> Has anyone tried/succeeded in using one of the IO filters with SeqIO to read
+>> sequences from gziped (like they come from Genbank) files?
+>
+>surely
+>
+>
+>  open(F,"gunzip -c $filename |");

Ewan,

Actually, being able to handle gzip'd files "under the hood" would be a really
neat feature (looking at the file magic number, etc, and doing the Right Thing).
I hit this quite a lot when I am processing trace scf file which are compressed
with gzip by default.

Trouble is, I know what you are going to say next...

Tony

+>
+>  $seqin = Bio::SeqIO->new( -format => $format, -fh => \*F);
+>
+>works fine...
+>
+>
+>
+>>
+>> Could I have an example? I can't get it to work.
+>>
+>> Thanks
+>>
+>> Mike
+>> _______________________________________________
+>> Bioperl-l mailing list
+>> Bioperl-l at bioperl.org
+>> http://bioperl.org/mailman/listinfo/bioperl-l
+>>
+>
+>_______________________________________________
+>Bioperl-l mailing list
+>Bioperl-l at bioperl.org
+>http://bioperl.org/mailman/listinfo/bioperl-l
+>

******************************************************
Tony Cox			Email:avc at sanger.ac.uk
Sanger Institute		WWW:www.sanger.ac.uk
Wellcome Trust Genome Campus	Webmaster
Hinxton				Tel: +44 1223 834244
Cambs. CB10 1SA			Fax: +44 1223 494919
******************************************************


More information about the Bioperl-l mailing list