Table of Contents
The Bio::AlignIO class is designed the same as the SeqIO class. Therefore format conversions can be done as following:
Example 3.1. Format conversions with AlignIO
(data)
#! /local/bin/perl -w use strict; use Bio::AlignIO; my $inform = shift @ARGV || 'clustalw'; my $outform = shift @ARGV || 'fasta'; my $in = Bio::AlignIO->newFh ( -fh => \*STDIN, -format => $inform ); my $out = Bio::AlignIO->newFh ( -fh => \*STDOUT, -format => $outform ); print $out $_ while <$in>;
AlignIO class structure. Warning: some alignment formats are available only as input formats.