[Bioperl-l] Newbie: Problems with Bio::SeqIO and TrEMBL

Heikki Lehvaslaiho heikki@ebi.ac.uk
Tue, 12 Mar 2002 14:53:44 +0000


Harry,

The error message does make sense, but it trires to tell you that the format
is wrong. TrEMBL files are protein files translated from EMBL and they are
in SWISS-PROT format. Try:

my $in  = Bio::SeqIO->new('-file' => "E:\\hum.dat",
                          '-format' => 'swiss');



Yours,
	-Heikki


"Dr. Harry Wild" wrote:
> 
> Hello all,
> 
> I'm trying to read in a TrEMBL file using Bio::SeqIO,
> but it doesn't work. Perl tells me:
> 
> Can't call method "isa" on an undefined value at
> E:/Perl/site/lib/Bio/Annotation.pm line 401, <GEN0> line 22.
> 
> Reading in EMBL files works fine, why doesn't it work with TrEMBL?
> I thought the formats of EMBL and TrEMBL should be the same.
> 
> I use the following code:
> my $in  = Bio::SeqIO->new('-file' => "E:\\hum.dat",
>                          '-format' => 'EMBL');
> my $out = Bio::SeqIO->new('-file' => ">E:\\hum.fasta",
>                          '-format' => 'fasta');
> while ( my $seq = $in->next_seq() ) {$out->write_seq($seq); }
> 
> Thanks for help,
> Harry Wild
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l

-- 
______ _/      _/_____________________________________________________
      _/      _/                      http://www.ebi.ac.uk/mutations/
     _/  _/  _/  Heikki Lehvaslaiho          heikki@ebi.ac.uk
    _/_/_/_/_/  EMBL Outstation, European Bioinformatics Institute
   _/  _/  _/  Wellcome Trust Genome Campus, Hinxton
  _/  _/  _/  Cambs. CB10 1SD, United Kingdom
     _/      Phone: +44 (0)1223 494 644   FAX: +44 (0)1223 494 468
___ _/_/_/_/_/________________________________________________________