NAME
Bio::Tools::Run::Phylo::Hyphy::BatchFile - Wrapper for custom execution of Hyphy batch files
SYNOPSIS
my $aln = Bio::Align::AlignI->new(); my $treeio = Bio::TreeIO->new(-format => "nexus", -file => "$tree_file"); my $tree = $treeio->next_tree(); my $bf_exec = Bio::Tools::Run::Phylo::Hyphy::BatchFile->new(-params => {'bf' => "hyphybatchfile.bf", 'order' => ["Universal", "Custom", $aln, "001001", $tree]}); $bf_exec->set_parameter('3', "012012"); my ($rc,$parser) = $bf_exec->run();
DESCRIPTION
This module creates a generic interface to processing of HBL files in HyPhy ([Hy]pothesis Testing Using [Phy]logenies), a package by Sergei Kosakowsky Pond, Spencer V. Muse, Simon D.W. Frost and Art Poon. See http://www.hyphy.org for more information.
Instances of this module require only a link to the batch file and an ordered list of parameters, as described in the HyPhy documentation "SelectionAnalyses.pdf."
FEEDBACK
Mailing Lists
User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the Bioperl mailing list. Your participation is much appreciated.
[email protected] - General discussionhttp://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support
Please direct usage questions or support issues to the mailing list:
rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.
Reporting Bugs
Report bugs to the Bioperl bug tracking system to help us keep track of the bugs and their resolution. Bug reports can be submitted via the web:
http://redmine.open-bio.org/projects/bioperl/
AUTHOR - Daisie Huang
Email [email protected]
CONTRIBUTORS
Additional contributors names and emails here
valid_values
Title : valid_valuesUsage : $factory->valid_values()Function: returns the possible parametersReturns: an array holding all possible parameters. The defaultvalues are always the first one listed. These descriptions areessentially lifted from the python wrapper or provided by the author.Args : None
new
Title : newUsage : my $obj = Bio::Tools::Run::Phylo::Hyphy::BatchFile->new();Function: Builds a new Bio::Tools::Run::Phylo::Hyphy::BatchFile objectReturns : Bio::Tools::Run::Phylo::Hyphy::BatchFileArgs : -alignment => the Bio::Align::AlignI object-save_tempfiles => boolean to save the generated tempfiles andNOT cleanup after onesself (default FALSE)-tree => the Bio::Tree::TreeI object-params => a hashref of parameters (all passed to set_parameter)this hashref should include 'bf' => custombatchfile.bf'order' => [array of ordered parameters]-executable => where the hyphy executable resides
See also: Bio::Tree::TreeI, Bio::Align::AlignI
update_ordered_parameters
Title : update_ordered_parametersUsage : $BatchFile->update_ordered_parameters();Function: updates all of the parameters needed for the ordered input redirect in HBL.Returns : nothingArgs : none
run
Title : runUsage : my ($rc,$results) = $BatchFile->run();Function: run the Hyphy analysis using the specified batchfile and its ordered parametersReturns : Return code, HashArgs : none
create_wrapper
Title : create_wrapperUsage : $self->create_wrapperFunction: Creates the wrapper file for the batchfile specified in the hash, saves it to the hash as '_wrapper'.Returns : nothingArgs : none
set_parameter
Title : set_parameter Usage : $hyphy->set_parameter($param,$val); Function: Sets the named parameter $param to $val if it is a non-numeric parameter
If $param is a number, sets the corresponding value of the ordered redirect array (starts from 1). Returns : boolean if set was successful Args : $param => name of the parameter
$value => value to set the parameter to
batchfile
Title : batchfile Usage : $hyphy->batchfile($bf_name); Function: Gets/sets the batchfile that is run by $hyphy. Returns : The batchfile path. Args : $bf_name => path of new batchfile
make_batchfile_with_contents
Title : make_batchfile_with_contents Usage : $hyphy->make_batchfile_with_contents($bf_string); Function: Creates a temporary file with the specified string of contents for the batchfile. Returns : The batchfile path. Args : $bf_string => contents for the batchfile
set_default_parameters
Title : set_default_parametersUsage : $BatchFile->set_default_parameters(0);Function: (Re)set the default parameters from the defaults(the first value in each array in thevalid_values)Returns : noneArgs : boolean: keep existing parameter values