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

Zayed Albertyn zayed at sanbi.ac.za
Fri Nov 14 09:25:54 EST 2003


I am using bioperl-live checked out this morning from bioperl.org cvs. My
OS is Redhat 7.3. I tried it on a Rh9 machine with stable bioperl 1.2.3
and I get the same error message:

zayedi at jive4:26pm~/research/GBEST_tmp% perl bin/plant_org.pl
plant_org.list
Working on /cip0/db/GENBANK/RELEASE137/gbest13.seq.gz   1/269
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.

Here is my minimilast code:

$files is an array reference to a list of files in $path directory

foreach $file (@{$files}) {
        if (-e "$path/$file") {
                $c++;
            	my $seq_in = Bio::SeqIO::new(
                                        '-file'  => "/bin/gunzip -c $path/$file|",
                                        '-format' => 'genbank'
                                    );
            while ( my $seqobj = $seq_in->next_seq ) {
                next unless $ORG->{$species};
                print OUT $file, "\n";
            }
        }
            else {

            print "$file not in existence\n";
        }

}



>On Fri, 14 Nov 2003, Andreas Kahari wrote:

> On Fri, Nov 14, 2003 at 12:52:25PM +0200, Zayed Albertyn wrote:
> > The file does exist as
> >
> > -rwxrwxrwx    1 dbases   sanbi    21510739 Sep 27 23:27 /cip0/db/GENBANK/RELEASE137/gbest13.seq.gz
> >
> > I always supplied a gzipped file and printed it's name to check what files
> > are being worked on.
> >
> > I even added an  "if (-e "$path/$file") " to the loop and it still went in
> > to try and open the file.
> >
> >
> > But I cannot write to the directory it is in. So without the -c switch I
> > wont be able to decompress it anyway unless I make a copy in my own
> > directory. I have tried that with and without the -c switch. gunzip does
> > the job but I cant get around that internal method error.
> [cut]
>
> I think this is where you let us know what version of bioperl
> you're using and what system you're on.
>
> Using fresh bioperl 1.2.3 installation on OpenBSD, I have no
> problem reading genbank data off a gunzip pipe.
>
> It would be useful to see a minimal, yet complete, program that
> exhibits the behaviour you're mentioning.
>
>
> Andreas
>
> --
> |[--]|      Andreas Kähäri                                |-}{-|
> |-][-|      EMBL, European Bioinformatics Institute       |{--}|
> |[--]|      Wellcome Trust Genome Campus, Hinxton         |-}{-|
> |-][-|      Cambridge, CB10 1SD                           |{--}|
> |[--]|      United Kingdom                                |-}{-|
>

-----------------------------------------------
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