Bio::AlignIO::phylip - PHYLIP format sequence input/output stream
# Do not use this module directly. Use it via the Bio::AlignIO class.
use Bio::AlignIO; use Bio::SimpleAlign; my $phylipstream = new Bio::AlignIO(-format => 'phylip', -fh => \*STDOUT); # convert data from one format to another my $gcgstream = new Bio::AlignIO(-format => 'msf', -file => 't/data/cysprot1a.msf'); while( my $aln = $gcgstream->next_aln ) { $phylipstream->write_aln($aln); } # do it again with phylip sequential format format $phylipstream->interleaved(0); # can also initialize the object like this $phylipstream = new Bio::AlignIO(-interleaved => 0, -format => 'phylip', -fh => \*STDOUT); $gcgstream = new Bio::AlignIO(-format => 'msf', -file => 't/data/cysprot1a.msf'); while( my $aln = $gcgstream->next_aln ) { $phylipstream->write_aln($aln); }
This object can transform Bio::SimpleAlign objects to and from PHYLIP interleaved format. It will not work with PHYLIP sequencial format.
This module will output PHYLIP sequential format. By specifying the flag -interleaved => 0 in the initialization the module can output data in interleaved format.
Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via email or the web:
bioperl-bugs@bio.perl.org http://bio.perl.org/bioperl-bugs/
Email: heikki@ebi.ac.uk Email: jason@bioperl.org
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
Title : next_aln Usage : $aln = $stream->next_aln() Function: returns the next alignment in the stream. Throws an exception if trying to read in PHYLIP sequential format. Returns : SimpleAlign object Args :
Title : write_aln Usage : $stream->write_aln(@aln) Function: writes the $aln object into the stream in MSF format Returns : 1 for success and 0 for error Args : Bio::SimpleAlign object
Title : interleaved Usage : my $interleaved = $obj->interleaved Function: Get/Set Interleaved status Returns : boolean Args : boolean
To install Bio::Seq, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bio::Seq
CPAN shell
perl -MCPAN -e shell install Bio::Seq
For more information on module installation, please visit the detailed CPAN module installation guide.