[Bioperl-l] SimpleAlign is_flush
aaron.j.mackey at gsk.com
aaron.j.mackey at gsk.com
Wed Dec 5 14:56:31 UTC 2007
Well, if you use AlignIO::fasta to read in a multi-fasta file of
*unaligned* sequences, AlignIO::fasta makes the assumption that all of
your sequences are aligned, and pads the ends of shorter sequences with
gap characters (essentially, enforcing a rather silly, yet valid
alignment). The fact that is_flush() then returns 1 is secondary.
If you just want to read in an array of unaligned sequences, use
SeqIO::fasta instead. It doesn't really make much sense to use AlignIO
for sequences that are not aligned ... conversely, if you *do* have
aligned sequences in a multi-fasta file, then it does make sense to use
AlignIO, and it also makes sense for AlignIO::fasta to end-pad sequences
with gaps as necessary to get a fully valid, flush multiple sequence
alignment matrix.
-Aaron
bioperl-l-bounces at lists.open-bio.org wrote on 12/05/2007 08:53:59 AM:
> Yes; it's a convenient way to make sure all seqs have the same length
> (including gaps). Nice for checking when adding new seqs to an
> alignment or building new parsers.
>
> chris
>
> On Dec 5, 2007, at 7:10 AM, Bernd Web wrote:
>
> > Hi,
> >
> > SimpleAlign has an is_flush:
> > Function : Tells you whether the alignment is flush, i.e. all of the
> > same length
> > Returns : 1 or 0
> >
> > I noticed that a file with multiple fasta sequences with different
> > lengths has an is_flush value of 1. Printing the "alignment" shows
> > that sequences are appended with "-" so that the all are the same
> > length. Does this mean that is_flush for alignments read in via
> > AlignIO is indeed always true and thus as such a so useful ?
> >
> > (using bioperl version: 1.005002102)
> >
> >
> > Regards,
> > Bernd
> > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l at lists.open-bio.org
> > http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
> Christopher Fields
> Postdoctoral Researcher
> Lab of Dr. Robert Switzer
> Dept of Biochemistry
> University of Illinois Urbana-Champaign
>
>
>
> _______________________________________________
> 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