|
NAMEBio::Tools::Run::Phylo::SLR - Wrapper around the SLR program SYNOPSIS use Bio::Tools::Run::Phylo::SLR;
use Bio::AlignIO;
use Bio::TreeIO;
use Bio::SimpleAlign;
my $alignio = Bio::AlignIO->new
(-format => 'fasta',
-file => 't/data/219877.cdna.fasta');
my $aln = $alignio->next_aln;
my $treeio = Bio::TreeIO->new
(-format => 'newick', -file => 't/data/219877.tree');
my $tree = $treeio->next_tree;
my $slr = Bio::Tools::Run::Phylo::SLR->new();
$slr->alignment($aln);
$slr->tree($tree);
# $rc = 1 for success, 0 for errors
my ($rc,$results) = $slr->run();
my $positive_sites = $results->{'positive'};
print "# Site\tNeutral\tOptimal\tOmega\t",
"lower\tupper\tLRT_Stat\tPval\tAdj.Pval\tResult\tNote\n";
foreach my $positive_site (@$positive_sites) {
print
$positive_site->[0], "\t",
$positive_site->[1], "\t",
$positive_site->[2], "\t",
$positive_site->[3], "\t",
$positive_site->[4], "\t",
$positive_site->[5], "\t",
$positive_site->[6], "\t",
$positive_site->[7], "\t",
$positive_site->[8], "\t",
"positive\n";
}
DESCRIPTIONThis is a wrapper around the SLR program. See http://www.ebi.ac.uk/goldman/SLR/ for more information. This module is more about generating the proper ctl file and will run the program in a separate temporary directory to avoid creating temp files all over the place. FEEDBACKMailing ListsUser 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. bioperl-l@bioperl.org - General discussion http://bioperl.org/wiki/Mailing_lists - About the mailing lists SupportPlease direct usage questions or support issues to the mailing list: bioperl-l@bioperl.org 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 BugsReport 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 - Albert VilellaEmail avilella-at-gmail-dot-com CONTRIBUTORSAdditional contributors names and emails here APPENDIXThe rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ Default ValuesINCOMPLETE DOCUMENTATION OF ALL METHODS seqfile [incodon]
treefile [intree]
outfile [slr.res]
reoptimise [1]
kappa [2.0]
omega [0.1]
codonf [0]
freqtype [0]
Kosakovsky-Pond has repeatedly stated that he finds incorporating codon frequencies in the manner of option 2 to be superior to option 0. We find that option 1 tends to perform better than either of these options. positive_only [0]
gencode [universal]
nucleof [0]
aminof [0]
nucfile [nuc.dat]
aminofile [amino.dat]
timemem [0]
ldiff [3.841459]
paramin []
paramout []
skipsitewise [0]
seed [0]
saveseed [1]
Results FormatResults file (default: slr.res) ------------ Results are presented in nine columns Site
Neutral
Optimal
Omega
LRT_Stat
Pval
Adj. Pval
Result
Occasionally the result may also contain an exclamation mark. This indicates that the observation at a site is not significantly different from random (equivalent to infinitely strong positive selection). This may indicate that the alignment at that site is bad Note The following events are flagged:
Synonymous All codons at a site code for the same amino
acid.
Single character Only one sequence at the site is ungapped,
the result of a recent insertion for example.
All gaps All sequences at a site contain a gap
character.
Sites marked "Single character" or "All gaps" are not counted
towards the number of sites for the purposes of correcting for
multiple comparisons since it is not possible to detect selection
from none or one observation under the assumptions made by the
sitewise likelihood ratio test.
program_nameTitle : program_name Usage : $factory->program_name() Function: holds the program name Returns: string Args : None program_dirTitle : program_dir Usage : ->program_dir() Function: returns the program directory, obtained from ENV variable. Returns: string Args : new Title : new
Usage : my $obj = Bio::Tools::Run::Phylo::SLR->new();
Function: Builds a new Bio::Tools::Run::Phylo::SLR object
Returns : Bio::Tools::Run::Phylo::SLR
Args : -alignment => the Bio::Align::AlignI object
-save_tempfiles => boolean to save the generated tempfiles and
NOT cleanup after onesself (default FALSE)
-tree => the Bio::Tree::TreeI object
-params => a hashref of SLR parameters (all passed to set_parameter)
-executable => where the SLR executable resides
See also: Bio::Tree::TreeI, Bio::Align::AlignI prepare Title : prepare
Usage : my $rundir = $slr->prepare($aln);
Function: prepare the SLR analysis using the default or updated parameters
the alignment parameter must have been set
Returns : value of rundir
Args : L<Bio::Align::AlignI> object,
L<Bio::Tree::TreeI> object
run Title : run
Usage : my ($rc,$parser) = $slr->run($aln,$tree);
Function: run the SLR analysis using the default or updated parameters
the alignment parameter must have been set
Returns : Return code, L<Bio::Tools::Phylo::SLR>
Args : L<Bio::Align::AlignI> object,
L<Bio::Tree::TreeI> object
error_stringTitle : error_string Usage : $obj->error_string($newval) Function: Where the output from the last analysus run is stored. Returns : value of error_string Args : newvalue (optional) alignment Title : alignment
Usage : $slr->align($aln);
Function: Get/Set the L<Bio::Align::AlignI> object
Returns : L<Bio::Align::AlignI> object
Args : [optional] L<Bio::Align::AlignI>
Comment : We could potentially add support for running directly on a file
but we shall keep it simple
See also: L<Bio::SimpleAlign>
tree Title : tree
Usage : $slr->tree($tree, %params);
Function: Get/Set the L<Bio::Tree::TreeI> object
Returns : L<Bio::Tree::TreeI>
Args : [optional] $tree => L<Bio::Tree::TreeI>,
Comment : We could potentially add support for running directly on a file
but we shall keep it simple
See also: L<Bio::Tree::Tree>
get_parametersTitle : get_parameters Usage : my %params = $self->get_parameters(); Function: returns the list of parameters as a hash Returns : associative array keyed on parameter names Args : none set_parameter Title : set_parameter
Usage : $slr->set_parameter($param,$val);
Function: Sets a SLR parameter, will be validated against
the valid values as set in the %VALIDVALUES class variable.
The checks can be ignored if one turns off param checks like this:
$slr->no_param_checks(1)
Returns : boolean if set was success, if verbose is set to -1
then no warning will be reported
Args : $param => name of the parameter
$value => value to set the parameter to
See also: L<no_param_checks()>
set_default_parameters Title : set_default_parameters
Usage : $slr->set_default_parameters(0);
Function: (Re)set the default parameters from the defaults
(the first value in each array in the
%VALIDVALUES class variable)
Returns : none
Args : boolean: keep existing parameter values
Bio::Tools::Run::WrapperBase methodsno_param_checks Title : no_param_checks
Usage : $obj->no_param_checks($newval)
Function: Boolean flag as to whether or not we should
trust the sanity checks for parameter values
Returns : value of no_param_checks
Args : newvalue (optional)
save_tempfilesTitle : save_tempfiles Usage : $obj->save_tempfiles($newval) Function: Returns : value of save_tempfiles Args : newvalue (optional) outfile_name Title : outfile_name
Usage : my $outfile = $slr->outfile_name();
Function: Get/Set the name of the output file for this run
(if you wanted to do something special)
Returns : string
Args : [optional] string to set value to
tempdirTitle : tempdir Usage : my $tmpdir = $self->tempdir(); Function: Retrieve a temporary directory name (which is created) Returns : string which is the name of the temporary directory Args : none cleanupTitle : cleanup Usage : $slr->cleanup(); Function: Will cleanup the tempdir directory after an SLR run Returns : none Args : none ioTitle : io Usage : $obj->io($newval) Function: Gets a L<Bio::Root::IO> object Returns : L<Bio::Root::IO> Args : none
|