Bio::T...Result(3pm)
π NAME π
Bio::Tools::Phylo::PAML::ModelResult β okay so bestie, this is the container for an NSSite Model Result from PAML. it holds one model's whole little situation. it's giving "glorified box, but a VERY important box" β¨
π VERSION π
version 1.7.3 β that's the one, no cap. π
π¦ SYNOPSIS π¦
here's the whole flow, start to finish. you grab a PAML::Result object, then you loop through every model it's holding and pull the deets out of each one:
# get a ModelResult from a PAML::Result object
use Bio::Tools::Phylo::PAML;
my $paml = Bio::Tools::Phylo::PAML->new(-file => 'mlc');
my $result = $paml->next_result;
foreach my $model ( $result->get_NSSite_results ) {
print $model->model_num, " ", $model->model_description, "\n";
print $model->kappa, "\n";
print $model->run_time, "\n";
# if you are using PAML < 3.15 then only one place for POS sites
for my $sites ( $model->get_pos_selected_sites ) {
print join("\t",@$sites),"\n";
}
# otherwise query NEB and BEB slots
for my $sites ( $model->get_NEB_pos_selected_sites ) {
print join("\t",@$sites),"\n";
}
for my $sites ( $model->get_BEB_pos_selected_sites ) {
print join("\t",@$sites),"\n";
}
}
lowkey the important plot twist here: if you're on PAML < 3.15 there's only one place for POS sites (get_pos_selected_sites). otherwise you go query the NEB and BEB slots instead. iykyk π§
π οΈ METHODS π οΈ
new πΈ
birthing a brand-new object, the classic.
- Title:
new - Usage:
my $obj = Bio::Tools::Phylo::PAML::ModelResult->new(); - Function: Builds a new Bio::Tools::Phylo::PAML::ModelResult object π«Ά
- Returns: an instance of Bio::Tools::Phylo::PAML::ModelResult
- Args:
-model_numβ model number-model_descriptionβ model description-kappaβ value of kappa-time_usedβ amount of time-pos_sitesβ arrayref of sites under positive selection-neb_sitesβ arrayref of sites under positive selection (by NEB analysis)-beb_sitesβ arrayref of sites under positive selection (by BEB analysis)-treesβ arrayref of tree(s) data for this model-shape_paramsβ hashref of parameters, and it's legit one of these two shapes:
( 'shape' => 'alpha',
'gamma' => $g,
'r' => $r,
'f' => $f
)
OR
( 'shape' => 'beta',
'p' => $p,
'q' => $q
)
-likelihoodβ likelihood-num_site_classesβ number of site classes-dnds_site_classesβ hashref with two keys,'p'and'w', which each point to an array; each slot is for a different site class.'w'is for dN/dS and'p'is probability
model_num β
- Title:
model_num - Usage:
$obj->model_num($newval) - Function: Get/Set the Model number (0,1,2,3...)
- Returns: value of
model_num(a scalar) - Args: on set, new value (a scalar or undef, optional)
model_description π
- Title:
model_description - Usage:
$obj->model_description($newval) - Function: Get/Set the model description. this is something like
'one-ratio','neutral','selection'β¨ - Returns: value of description (a scalar)
- Args: on set, new value (a scalar or undef, optional)
time_used β°
- Title:
time_used - Usage:
$obj->time_used($newval) - Function: Get/Set the time it took to run this analysis
- Returns: value of
time_used(a scalar) - Args: on set, new value (a scalar or undef, optional)
kappa π«
- Title:
kappa - Usage:
$obj->kappa($newval) - Function: Get/Set kappa (ts/tv)
- Returns: value of
kappa(a scalar) - Args: on set, new value (a scalar or undef, optional)
num_site_classes π’
- Title:
num_site_classes - Usage:
$obj->num_site_classes($newval) - Function: Get/Set the number of site classes for this model
- Returns: value of
num_site_classes(a scalar) - Args: on set, new value (a scalar or undef, optional)
dnds_site_classes π
- Title:
dnds_site_classes - Usage:
$obj->dnds_site_classes($newval) - Function: Get/Set dN/dS site classes, a hashref with 2 keys,
'p'and'w', which point to arrays β one slot for each site class. - Returns: value of
dnds_site_classes(a hashref) - Args: on set, new value (a scalar or undef, optional)
get_pos_selected_sites π
- Title:
get_pos_selected_sites - Usage:
my @sites = $modelresult->get_pos_selected_sites(); - Function: Get the sites which PAML has identified as under positive selection (w > 1). this returns an array with each slot being a site, 4 values:
- site location (in the original alignment)
- Amino acid (I think in the first sequence)
- P (P value)
- Significance (
**indicated > 99%,*indicates >=95%)
- Returns: Array
- Args: none
add_pos_selected_site π
- Title:
add_pos_selected_site - Usage:
$result->add_pos_selected_site($site,$aa,$pvalue,$signif); - Function: Add a site to the list of positively selected sites
- Returns: count of the number of sites stored
- Args:
$siteβ site number (in the alignment)$aaβ amino acid under selection$pvalueβ float from 0->1 represent probability site is under selection according to this model$signifβ significance (coded as either empty,'*', or'**'
get_NEB_pos_selected_sites π§
- Title:
get_NEB_pos_selected_sites - Usage:
my @sites = $modelresult->get_NEB_pos_selected_sites(); - Function: Get the sites which PAML has identified as under positive selection (w > 1) using Naive Empirical Bayes. this returns an array with each slot being a site, 4 values:
- site location (in the original alignment)
- Amino acid (I think in the first sequence)
- P (P value)
- Significance (
**indicated > 99%,*indicates > 95%) - post mean for w
- Returns: Array
- Args: none
add_NEB_pos_selected_site π¦
- Title:
add_NEB_pos_selected_site - Usage:
$result->add_NEB_pos_selected_site($site,$aa,$pvalue,$signif); - Function: Add a site to the list of positively selected sites
- Returns: count of the number of sites stored
- Args:
$siteβ site number (in the alignment)$aaβ amino acid under selection$pvalueβ float from 0->1 represent probability site is under selection according to this model$signifβ significance (coded as either empty,'*', or'**'$postmeanβ post mean for w
get_BEB_pos_selected_sites π
- Title:
get_BEB_pos_selected_sites - Usage:
my @sites = $modelresult->get_BEB_pos_selected_sites(); - Function: Get the sites which PAML has identified as under positive selection (w > 1) using Bayes Empirical Bayes. this returns an array with each slot being a site, 6 values:
- site location (in the original alignment)
- Amino acid (I think in the first sequence)
- P (P value)
- Significance (
**indicated > 99%,*indicates > 95%) - post mean for w (mean)
- Standard Error for w (SE)
- Returns: Array
- Args: none
add_BEB_pos_selected_site π
- Title:
add_BEB_pos_selected_site - Usage:
$result->add_BEB_pos_selected_site($site,$aa,$pvalue,$signif); - Function: Add a site to the list of positively selected sites
- Returns: count of the number of sites stored
- Args:
$siteβ site number (in the alignment)$aaβ amino acid under selection$pvalueβ float from 0->1 represent probability site is under selection according to this model$signifβ significance (coded as either empty,'*', or'**'$postmeanβ post mean for w$SEβ Standard Error for w
next_tree π³
- Title:
next_tree - Usage:
my $tree = $factory->next_tree; - Function: Get the next tree from the factory
- Returns:
L<Bio::Tree::TreeI> - Args: none
get_trees π²
- Title:
get_trees - Usage:
my @trees = $result->get_trees; - Function: Get all the parsed trees as an array
- Returns: Array of trees
- Args: none
rewind_tree_iterator βͺ
- Title:
rewind_tree_iterator - Usage:
$result->rewind_tree_iterator() - Function: Rewinds the tree iterator so that
next_treecan be called again from the beginning - Returns: none
- Args: none
add_tree π΄
- Title:
add_tree - Usage:
$result->add_tree($tree); - Function: Adds a tree
- Returns: integer which is the number of trees stored
- Args:
L<Bio::Tree::TreeI>
shape_params π
- Title:
shape_params - Usage:
$obj->shape_params($newval) - Function: Get/Set shape params for the distribution,
'alpha','beta'which is a hashref with 1 keys,'p'and'q' - Returns: value of
shape_params(a scalar) - Args: on set, new value (a scalar or undef, optional)
likelihood π
- Title:
likelihood - Usage:
$obj->likelihood($newval) - Function: log likelihood
- Returns: value of
likelihood(a scalar) - Args: on set, new value (a scalar or undef, optional)
π FEEDBACK π
Mailing lists π¬
user feedback is an integral part of the evolution of this and other Bioperl modules, fr fr. 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/Support.html - About the mailing lists
Support π
please direct usage questions or support issues to the mailing list:
bioperl-l@bioperl.org
rather than to the module maintainer directly. many experienced and responsive 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:
https://github.com/bioperl/bio-tools-phylo-paml/issues
βοΈ AUTHOR βοΈ
Jason Stajich <jason@bioperl.org> β the icon, the moment, the main character π
Β©οΈ COPYRIGHT Β©οΈ
this software is copyright (c) by Jason Stajich <jason@bioperl.org>.
this software is available under the same terms as the perl 5 programming language system itself.
okay that's the whole page bestie, you ate π this was Bio::T...Result(3pm) from the User Contributed Perl Documentation β perl v5.34.0, dated 2022-10-14. go forth and model your sites, queen πβ¨
π¦ where this page comes from
- debian bookworm: libbio-tools-phylo-paml-perl 1.7.3-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libbio-tools-phylo-paml-perl 1.7.3-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms