[Bioperl-l] Change in BioPerl module

Brian Osborne osborne1 at optonline.net
Thu Sep 7 18:18:45 UTC 2006


Filipe,

It looks like this is fixed in bioperl-live:

sub gap_line {
    my ($self,$gapchar) = @_;
    $gapchar = $gapchar || $self->gap_char;
    my %gap_hsh; # column gaps vector
    foreach my $seq ( $self->each_seq ) {
        my $i = 0;
        map {$gap_hsh{$_->[0]} = undef} grep {$_->[1] eq $gapchar}
          map {[$i++, $_]} split(//, uc ($seq->seq));
    }
    my $gap_line;
    foreach my $pos ( 0..$self->length-1 ) {
      $gap_line .= (exists $gap_hsh{$pos}) ? $gapchar:'.';
    }
    return $gap_line;
}

Although it may not seem so based on version numbers 1.4 is quite old, it
was released more than 2.5 years ago. I'd recommend using bioperl-live or
version 1.5.1.

Brian O.


On 9/6/06 1:45 PM, "Filipe Garrett" <fgarret at ub.edu> wrote:

> 
> Hi all,
> 
> I'm using Bioperl v1.4 and at the "SimpleAlign.pm" module I think that a
> minor change could be made to the "gap_line" function in order to use
> the gap character (defined in $self->gap_char) and not '-'.
> 
> change line 1228 to => my $gap= ($refchar eq $self->gap_char);
> 
> change line 1230 to => $gap= 1 if( $seq->[$pos] eq $self->gap_char);
> 
> 
> What do you think?
> Thanks,
> FG
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l





More information about the Bioperl-l mailing list