[Bioperl-l] How does '-alphabet' help? Is there any function which could remove "wrong" characters?

Vasily Aushev vaushev at gmail.com
Sat Oct 12 22:48:12 EDT 2013


in my very simple script, I am reading the sequence from the file by
my $text = <INFILE>;
and then making a new sequence object:
my $seq1 = Bio::Seq->new(-seq => $text, -alphabet => 'dna' );
After spending some time, I found that the 'carriage return' character
(0x0D) which occurs at the end of my string (it's a Windows file) causes
problems (exceptions) on further processing. I thought that defining the
-alphabet for the sequence object should remove this "wrong" character, but
it's not the case. So, my question - is there any function for removing all
characters which are not part of defined alphabet?

Thanks in advance!



More information about the Bioperl-l mailing list