[Bioperl-l] concatenating aln splices

Joshua Udall jaudall at gmail.com
Mon Aug 20 04:39:18 UTC 2007


Based on several criteria, I've extracted several splices from a
single alignment and I'm trying to concatenate my selected sequences
together.  Unfortunately, one of the sequences in the original
alignment only has gap characters for one or more of the splices.  I'd
like to keep the gap splices because other downstream aligned bases
depend on them.  I get these two warning messages splicing my
alignments together:

-------------------- WARNING ---------------------
MSG: Got a sequence with no letters in it cannot guess alphabet []
---------------------------------------------------

-------------------- WARNING ---------------------
MSG: Slice [232-233] of sequence [X2A/1-202] contains no residues.
Sequence excluded from the new alignment.
---------------------------------------------------

and now because of missing gaps, I get this error when trying to
concatenate them:

-------------------- WARNING ---------------------
MSG: expecting 236 not 203 from X2A
---------------------------------------------------

------------- EXCEPTION  -------------
MSG: All sequences in the alignment must be the same length
STACK Bio::AlignIO::phylip::write_aln
/sw/lib/perl5/5.8.6/Bio/AlignIO/phylip.pm:292

I don't mind the warnings, in fact I like them, but is there a way to
stop the splice function from removing the 'gap' sequence from the
alignment?  Perhaps catching the warning and inserting the gaps
afterwards might work, but I'm wondering if there's is a simpler
modification of SimpleAlign.pm that might work.  Any thoughts?

Josh



More information about the Bioperl-l mailing list