[Bioperl-l] Bio::LocatableSeq warning

Bernd Web bernd.web at gmail.com
Wed Dec 17 17:51:07 UTC 2008


Hi,

Using bioperl (1.005002102), I have had problems with alignment
slicing, which might be of similar nature.
In my case it is caused by the difference in "gap" symbols in
LocatableSeq and SimpleAlign. I had errors on non-existing sequences
after slicing the alignment in SimpleAlign. This was caused by :

		$slice_seq =~ s/\W//g; (line 932)

in the slice subroutine of SimpleAlign, in combination with the
_ungapped_len subroutine of LocatableSeq:

    $string =~ s/[\.\-]+//g;

* is not a gap-char here. I now "solved" this issue by redefining the
_ungapped_length routine in my script after loading the modules as:

sub Bio::LocatableSeq::_ungapped_len  {
    my $self = shift;
    my $string = $self->seq || '';
    $string =~ s/[%.-]+//g; #where % represent the new gap symbol
    $self->seq ? (return $self->start + CORE::length($string) - 1 ) : undef;
}

In addition, you might have to include such a  symbol in:
$Bio::PrimarySeq::MATCHPATTERN = 'A-Za-z\-\.\*\?=%:';
for the sequence to validate.


Regards,
Bernd

On Wed, Dec 17, 2008 at 6:13 PM, Sendu Bala <bix at sendu.me.uk> wrote:
> I've just committed a test alignment file to bioperl-run t/data, and
> Bio::LocatableSeq spurts up a warning about it:
>
> perl -MBio::AlignIO -e '$ai = Bio::AlignIO->new(-file =>
> "t/data/pal2nal.aln"); $aln = $ai->next_aln;'
>
> --------------------- WARNING ---------------------
> MSG: In sequence pseudogene residue count gives end value 183.
> Overriding value [178] with value 183 for Bio::LocatableSeq::end().
> ----LNCIVNDSQKMGIIRNGDLP*PQLKNKF2-FQRMTTPSSAEGKENLVFLIRKNWFSITEKNQPLKYIINLVVSRESKEPPQRPPFLD*SLGDALKRIEQLKLANKQDVFFTVGGSSVYKESMN*-DHFKLFVTWIMQDFQSDTFFS4EGDLEKYKLLPEYPQGVVSDVEEEKGIKYKFEVYEKND
> ---------------------------------------------------
>
>
> Is there simply something wrong with the alignment file (quite possible),
> and this warning means something?
>
> Or is this just normal behaviour now for valid alignment files? What is this
> warning supposed to mean to the user? What should I do about it? Why do I
> need to see it?
> _______________________________________________
> 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