[Bioperl-l] Bio::AlignIO::Mase

Chris Fields cjfields at illinois.edu
Wed Jun 8 13:21:41 UTC 2011


Tristan,

This very well may be a bug.  Have you run the test suite for this module?  It should be something like t/AlignIO/mase.t.

chris

On Jun 8, 2011, at 7:45 AM, Tristan Lefebure wrote:

> Hi there,
> 
> I have some weird alignments with some numerical code stored 
> within the sequence strings (eg. frameshift genewise code). 
> Most AlignIO module I have tried eat them without any 
> trouble except for Bio::AlignIO::Mase.
> 
> The following patch seems to do the trick:
> 
> diff -u mase.pm mase_mod.pm
> --- mase.pm     2011-06-08 14:08:58.558033996 +0200
> +++ mase_mod.pm 2011-06-08 14:09:20.388066014 +0200
> @@ -109,7 +109,7 @@
> 
>        while( $entry = $self->_readline) {
>            $entry =~ /^;/ && last;
> -           $entry =~ s/[^A-Za-z\.\-]//g;
> +           $entry =~ s/[^A-Za-z0-9\.\-]//g;
>            $seq .= $entry;
>        }
>        if( $end == -1) {
> 
> But I am left with the feeling that I don't really 
> understand why this works (which I don't quite like before 
> pushing a patch...)
> 
> Why doing a s///g instead of a simple m//, and why doing 
> '/[^' and not '/^['... Is that linked to that fact that $/ 
> was modified to read chunks of files? BTW where is $/ set? I 
> searched in Bio::Root::IO but didn't find it... 
> 
> Oh so many questions...
> 
> Thanks!
> 
> --
> Tristan
> 
> 
> 
> _______________________________________________
> 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