[Bioperl-l] add_seq method

Heikki Lehvaslaiho heikki at ebi.ac.uk
Tue May 18 14:45:49 EDT 2004


Luisa,

For a sequence to be added into an alighment it has to have methods start(), 
end() and strand(). These methods are in bioperl defined in Bio::RangeI and 
used by sequence classes inheriting from Bio::LocatableSeq.

So to fix your script, you'll have to change 'Bio::PrimarySeq' into 
'Bio::LocatableSeq'.

Yours,

	-Heikki

On Tuesday 18 May 2004 07:56, luisa pugliese wrote:
> #!/usr/bin/perl -w
> use strict;
>
> use Bio::PrimarySeq;
> use Bio::AlignIO;
> use Bio::SimpleAlign;
>
>
> my $seq_stru=new Bio::PrimarySeq(-seq =>'AGTYHILMKPTRED',
>                                                      -id => 'seq_stru');
> my $in = Bio::AlignIO->new(-format => 'clustalw',
>                                         -file   => '1433-fam.aln');
> my $aln = $in->next_aln;
> $aln->add_seq($seq_stru);

-- 
______ _/      _/_____________________________________________________
      _/      _/                      http://www.ebi.ac.uk/mutations/
     _/  _/  _/  Heikki Lehvaslaiho    heikki_at_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
___ _/_/_/_/_/________________________________________________________



More information about the Bioperl-l mailing list