[Bioperl-l] Bio::SimpleAlign::order

Heikki Lehvaslaiho heikki@ebi.ac.uk
Tue, 12 Jun 2001 14:19:55 +0100


See my other mail about method get_seq_by_pos().

See also my bug report in guts. Possible the warnings you get come
from Bio::Locatable::end and are indicative of the ClustalW error?

We better cvs update every five minutes until the situation calms
down.

	-heikki


Jason Stajich wrote:
> 
> Any problems with the following change over in Bio::SimpleAlign?
> I'm currently getting unrelated errors from the in-progress changes to
> LocateableSeq.
> 
> My comments are preceeded by a '#'
> 
> RCS file: /home/repository/bioperl/bioperl-live/Bio/SimpleAlign.pm,v
> retrieving revision 1.25
> diff -r1.25 SimpleAlign.pm
> 
> # change the invokation of from $self->{'_order'}->{$val}
> # to $self->order($val)
> 
> # if you want to get the hash back just call $self->order with no args
> 
> # setting should only be done by the creating object IMHO so the
> # SimpleAlign object will be read-only from the seq 'order' perspective
> # okay?
> 
> 408,410c408,410
> <     foreach $order ( sort { $a <=> $b } keys %{$self->{'_order'}} ) {
> <       if( exists $self->{'_seq'}->{$self->{'_order'}->{$order}} ) {
> <           push(@arr,$self->{'_seq'}->{$self->{'_order'}->{$order}});
> ---
> >     foreach $order ( sort { $a <=> $b } keys %{$self->order} ) {
> >       if( exists $self->{'_seq'}->{$self->order->{$order}} ) {
> >           push(@arr,$self->{'_seq'}->{$self->order->{$order}});
> 
> 1169c1169
> <     my $nse = $self->{'_order'}->{--$pos};
> ---
> >     my $nse = $self->order->{--$pos};
> 
> # add the order method
> 1210a1211,1229
> >
> > =head2 order
> >
> >  Title   : order
> >  Usage   : $obj->order($newval)
> >  Function: returns the complete sequence order or a specific element
> >  Returns : value of order either complete hash or a specific element
> >  Args    : key to lookup
> >
> > =cut
> >
> > sub order{
> >    my ($obj,$value) = @_;
> >    if( defined $value) {
> >        return $obj->{'_order'}->{$value};
> >    } else {
> >        return $obj->{'_order'};
> >    }
> >}
> 
> Jason Stajich
> jason@chg.mc.duke.edu
> Center for Human Genetics
> Duke University Medical Center
> http://www.chg.duke.edu/
> 
> _______________________________________________
> 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
___ _/_/_/_/_/________________________________________________________