[Bioperl-l] Parsing clustalw alignments

Chris Fields cjfields at uiuc.edu
Sun Jan 29 14:44:22 EST 2006

Even though you used clustalw for aligning the sequences, the output  
format is GCG (msf) and not clustalw (aln) format, so you need to  
change the '-format' flag you have set:

> $seqio = Bio::AlignIO->new(-format => 'clustalw', -file =>
> "align$x.clustalw");


> $seqio = Bio::AlignIO->new(-format => 'msf', -file =>
> "align$x.clustalw");

See if that works.

On Jan 29, 2006, at 11:48 AM, Ryan Golhar wrote:

> I can't figure this out from the documentation.  In fact, I'm not sure
> its possible:
> I have a bunch of clustalw alignments in GCG (MSF) format.  Each
> alignment consists of three sequences.  I want to get the sequences
> including the gaps from the alignment.
> I'm trying to use Bio::AlignIO to read the alignment file, then trying
> to get each sequence from the alignment. I tried doing this:
> $seqio = Bio::AlignIO->new(-format => 'clustalw', -file =>
> "align$x.clustalw");
> my $aln = $seqio->next_aln();
> $seq1 = $aln->next_seq()->seq;
> Getting the sequence from the alignment isn't working and I'm not sure
> how to do it.  Does anyone have any ideas as to what I might try?
> --
> Ryan Golhar  -  golharam at umdnj.edu
> The Informatics Institute of UMDNJ
> _______________________________________________
> 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

More information about the Bioperl-l mailing list