[Bioperl-l] Building Many trees with Bioperl

Brian Osborne bosborne11 at verizon.net
Fri May 24 21:25:38 UTC 2013


Ben,

What happens when you take the Phyml command itself and run it from the command line?

Also, a minor point: the message "MSG: Replacing one sequence [FXCNDTJ02P/1-366]" is not an error, it is a warning. An error accompanies an exit, warnings are just informative.

Brian O.


On May 24, 2013, at 3:14 PM, Ben Ward (TSL) <Ben.Ward at sainsbury-laboratory.ac.uk> wrote:

> Hi,
> 
> I'm new to Bioperl and plan to make a script to automate making trees with many alignment files (themselves generated by automating the process of multiple alignment for many datasets by using clustalw in a bioperl script).
> But I need to get it right for one pice of test data before I can do it for all:
> 
> What I have produced so far is the below. It's supposed to load in the alignment file as as SimpleAlign. Then use that alignment in phyml. I looked at the documentation and tried to follow examples.
> 
> However it gives me many errors like:
> --------------------- WARNING ---------------------
> MSG: Replacing one sequence [FXCNDTJ02P/1-366]
> 
> And then gives me:
> Phyml command = /Users/wardb/clustalw2/phyml /var/folders/kp/clkqvqn9739ffw2755zjwy74_skf_z/T/MTFzfN4jED/aln8058.phylip  0 i 1 0 HKY e e 1 e BIONJ y y
> 
> ------------- EXCEPTION: Bio::Root::Exception -------------
> MSG: Phyml call (/Users/wardb/clustalw2/phyml /var/folders/kp/clkqvqn9739ffw2755zjwy74_skf_z/T/MTFzfN4jED/aln8058.phylip  0 i 1 0 HKY e e 1 e BIONJ y y) did not give an output [/var/folders/kp/clkqvqn9739ffw2755zjwy74_skf_z/T/MTFzfN4jED/aln8058.phylip_phyml_stat.txt]: 11
> STACK: Error::throw
> STACK: Bio::Root::Root::throw /Library/Perl/5.12/Bio/Root/Root.pm:472
> STACK: Bio::Tools::Run::Phylo::Phyml::_run /Library/Perl/5.12/Bio/Tools/Run/Phylo/Phyml.pm:851
> STACK: /Library/Perl/5.12/Bio/Tools/Run/Phylo/Phyml.pm:338
> -----------------------------------------------------------
> 
> Can someone let me know if I'm going about this correctly and what I need to do to get it to work. I've also tried to run phyml by giving the filename in the run() method like:
> my $inputfilename = 'outputalignmentfile';
> my $tree = $factory->run("$inputfilename");
> 
> But I get the same EXCEPTION: Bio::Root::Exception message.
> 
> Thanks,
> Ben W.
> 
> SCRIPT ---
> 
> #!/usr/bin/perl
> use warnings;
> use strict;
> BEGIN { $ENV{PHYMLDIR} = '/Users/wardb/clustalw2' }
> use Bio::TreeIO;
> use Bio::AlignIO;
> use Bio::Tools::Run::Phylo::Phyml;
> 
> my $alnin = Bio::AlignIO->new(-file => "<outputalignmentfile",
> -format => 'phylip');
> 
> my $aln = $alnin->next_aln();
> 
> 
> # Make a Phyml factory.
> my $factory = Bio::Tools::Run::Phylo::Phyml->new(-verbose => 2,
> -data_type => 'dna');
> 
> # Pass the factory an alignment and run:
> # my $inputfilename = 'outputalignmentfile';
> 
> my $tree = $factory->run($aln); # $tree is a Bio::Tree::Tree object.
> 
> 
> # Setup tree output stream...
> my $treeio = Bio::TreeIO->new(-format => 'newick',
> -file => 'tree.newick');
> 
> $treeio->write_tree($tree);
> 
> exit 0;
> 
> _______________________________________________
> 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