[Bioperl-l] Problem with Bio::SeqIO opening gzipped files

Zayed Albertyn zayed at sanbi.ac.za
Fri Nov 14 04:45:16 EST 2003


Hi

I am trying to process the genbank flatfile release by opening the file
from a gunzip pipe. The problem is that I keep on recieving this weird
error about guess_format internal methods of Bio::SeqIO when I have
specified the format type.

Can't call method "_guess_format" without a package or object reference at
/cip0/research/zayed/gmod/bioperl-live/Bio/SeqIO.pm line 363, <ORG> line
4.



Could the fact that I am trying to open it from a pipe be the problem
because I dont get this error if I use a decompressed file. Here is my
code

foreach $file (@file) {

my $seq_in = Bio::SeqIO::new(
                                        '-file'  => "/bin/gunzip $path/$file |",
                                        '-format' => 'genbank'
                                    );
}

Also, I would like to pass an array reference to Bio::SeqIO::MultiFile
(so I dont have to use the foreach loop above) but how would I do that if
wanted to open multiple gzipped files?

I have updated by bioperl-live distribution on Fri Nov 14 2003 11:15 am CAT

Finally, there is an error in the SeqIO HowTo page that might confuse
some people. In the section where you describe working with gzipped files
the following code has

my $outformat = shift or die $usage;

Shouldnt this be $outfile because $outformat is not used anywhere else in
the code as you have already specifies 'Fasta' as the $seqout output
format?

Thanks
Zayed

-----------------------------------------------
From: Zayed Albertyn
Electric Genetics PTY Ltd
Tel: +27 21 959 3645; Mobile: +2782 480 6097
www.egenetics.com


More information about the Bioperl-l mailing list