.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Bio::Tools::Phylo::PAML::Result 3pm" .TH Bio::Tools::Phylo::PAML::Result 3pm "2020-11-10" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Bio::Tools::Phylo::PAML::Result \- A PAML result set object .SH "VERSION" .IX Header "VERSION" version 1.7.3 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 4 \& # see Bio::Tools::Phylo::PAML for example usage \& use Bio::Tools::Phylo::PAML; \& my $parser = Bio::Tools::Phylo::PAML\->new \& (\-file => "./results/mlc", \-dir => "./results/"); \& \& # get the first/next result; a Bio::Tools::Phylo::PAML::Result object, \& # which isa Bio::SeqAnalysisResultI object. \& my $result = $parser\->next_result(); \& \& my @seqs = $result\->get_seqs; \& my %input_params = $result\->get_input_parameters; \& my @basfreq = $result\->get_codon_pos_basefreq; \& my $MLmatrix = $result\->get_MLmatrix; # get MaxLikelihood Matrix \& my $NGmatrix = $result\->get_NGmatrix; # get Nei\-Gojoburi Matrix \& \& \& # for AAML runs \& my $AAmatrix = $result\->get_AADistMatrix; \& my $AAMLmatrix = $result\->get_AAMLDistMatrix; \& \& # if \-dir contains an rst file get list of \& # Bio::PrimarySeq ancestral state reconstructions of the sequences \& my @rsts = $result\->get_rst_seqs; \& \& \& # if you want to print the changes on the tree \& # this will print out the \& # anc_aa => ANCESTRAL AMINO ACID \& # anc_prob => ANCESTRAL AA PROBABILITY \& # derived_aa => DERIVED AA \& # derived_prob => DERIVE AA PROBABILITY (where appropriate \- NA for extant/tip taxas) \& # site => which codon site this in the alignment \& @trees = $result\->get_rst_trees; \& for my $t ( @trees ) { \& for my $node ( $t\->get_nodes ) { \& next unless $node\->ancestor; # skip root node \& my @changes = $node\->get_tag_values(\*(Aqchanges\*(Aq); \& my $chgstr = \*(Aq\*(Aq; \& for my $c ( @changes ) { \& for my $k ( sort keys %$c ) { \& $chgstr .= "$k => $c\->{$k} "; \& } \& $chgstr .= "\en\et"; \& } \& \& printf "node:%s n=%s s=%s\en\et%s\en", \& $node\->id, \& $node\->get_tag_values(\*(Aqn\*(Aq), \& $node\->get_tag_values(\*(Aqs\*(Aq), \& $chgstr; \& } \& } \& \& # Persite probabilities \& my $persite = $result\->get_rst_persite; \& # let\*(Aqs score site 1 \& $site = $persite\->[2]; \& # so site 2, node 2 (extant node, node 2) \& print $site\->[2]\->{\*(Aqcodon\*(Aq}, \*(Aq \*(Aq,$site\->[2]\->{\*(Aqaa\*(Aq},"\en"; \& # site 2, node 3 \& print $site\->[3]\->{\*(Aqcodon\*(Aq}, \*(Aq \*(Aq,$site\->[3]\->{\*(Aqaa\*(Aq}, "\en"; \& \& # ancestral node 9, codon, aa, marginal probabilities; Yang95 is listed as \& # (eqn. 4 in Yang et al. 1995 Genetics 141:1641\-1650) in PAML rst file. \& print $site\->[9]\->{\*(Aqcodon\*(Aq}, \*(Aq \*(Aq,$site\->[9]\->{\*(Aqaa\*(Aq}, \*(Aq \*(Aq, $site\->[9]\->{\*(Aqprob\*(Aq}, \*(Aq \*(Aq, \& $site\->[9]\->{\*(AqYang95_aa\*(Aq},\*(Aq \*(Aq, $site\->[9]\->{\*(AqYang95_aa_prob\*(Aq},"\en"; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This is a container object for \s-1PAML\s0 Results. .SH "METHODS" .IX Header "METHODS" .SS "new" .IX Subsection "new" .Vb 10 \& Title : new \& Usage : my $obj = Bio::Tools::Phylo::PAML::Result\->new(%data); \& Function: Builds a new Bio::Tools::Phylo::PAML::Result object \& Returns : Bio::Tools::Phylo::PAML::Result \& Args : \-trees => array reference of Bio::Tree::TreeI objects \& \-MLmatrix => ML matrix \& \-seqs => array reference of Bio::PrimarySeqI objects \& \-codonpos => array reference of codon positions \& \-codonfreq => array reference of codon frequencies \& \-version => version string \& \-model => model string \& \-patterns => hashref with the fields \*(Aq\-patterns\*(Aq, \*(Aq\-ns\*(Aq, \*(Aq\-ls\*(Aq \& \-stats => array ref of misc stats (optional) \& \-aafreq => Hashref of AA frequencies (only for AAML) \& \-aadistmat => Bio::Matrix::PhylipDist (only for AAML) \& \-aamldistmat => Bio::Matrix::PhylipDist (only for pairwise AAML) \& \-ntfreq => array ref of NT frequencies (only for BASEML) \& \-seqfile => seqfile used \& \-kappa_mat => Bio::Matrix::PhylipDist of kappa values (only for BASEML) \& \-alpha_mat => Bio::Matrix::PhylipDist of alpha values (only for BASEML) \& \-NSSitesresult => arrayref of PAML::ModelResult \& \-input_params => input params from .ctl file \& \-rst => array reference of Bio::PrimarySeqI objects \& of ancestral state reconstruction \& \-rst_persite=> arrayref of persite data, this is a complicated set of AoH \& \-rst_trees => rst trees with changes coded on the tree .Ve .PP See Also: Bio::Tree::TreeI, Bio::PrimarySeqI, Bio::Matrix::PhylipDist, Bio::Tools::Phylo::PAML .SS "next_tree" .IX Subsection "next_tree" .Vb 5 \& Title : next_tree \& Usage : my $tree = $factory\->next_tree; \& Function: Get the next tree from the factory \& Returns : L \& Args : none .Ve .SS "get_trees" .IX Subsection "get_trees" .Vb 5 \& Title : get_trees \& Usage : my @trees = $result\->get_trees; \& Function: Get all the parsed trees as an array \& Returns : Array of trees \& Args : none .Ve .SS "rewind_tree_iterator" .IX Subsection "rewind_tree_iterator" .Vb 6 \& Title : rewind_tree_iterator \& Usage : $result\->rewind_tree_iterator() \& Function: Rewinds the tree iterator so that next_tree can be \& called again from the beginning \& Returns : none \& Args : none .Ve .SS "add_tree" .IX Subsection "add_tree" .Vb 5 \& Title : add_tree \& Usage : $result\->add_tree($tree); \& Function: Adds a tree \& Returns : integer which is the number of trees stored \& Args : L .Ve .SS "set_MLmatrix" .IX Subsection "set_MLmatrix" .Vb 6 \& Title : set_MLmatrix \& Usage : $result\->set_MLmatrix($mat) \& Function: Set the ML Matrix \& Returns : none \& Args : Arrayref to MLmatrix (must be arrayref to 2D matrix whic is \& lower triangle pairwise) .Ve .SS "get_MLmatrix" .IX Subsection "get_MLmatrix" .Vb 5 \& Title : get_MLmatrix \& Usage : my $mat = $result\->get_MLmatrix() \& Function: Get the ML matrix \& Returns : 2D Array reference \& Args : none .Ve .SS "set_NGmatrix" .IX Subsection "set_NGmatrix" .Vb 6 \& Title : set_NGmatrix \& Usage : $result\->set_NGmatrix($mat) \& Function: Set the Nei & Gojobori Matrix \& Returns : none \& Args : Arrayref to NGmatrix (must be arrayref to 2D matrix whic is \& lower triangle pairwise) .Ve .SS "get_NGmatrix" .IX Subsection "get_NGmatrix" .Vb 5 \& Title : get_NGmatrix \& Usage : my $mat = $result\->get_NGmatrix() \& Function: Get the Nei & Gojobori matrix \& Returns : 2D Array reference \& Args : none .Ve .SS "add_seq" .IX Subsection "add_seq" .Vb 6 \& Title : add_seq \& Usage : $obj\->add_seq($seq) \& Function: Add a Bio::PrimarySeq to the Result \& Returns : none \& Args : Bio::PrimarySeqI \&See also : L .Ve .SS "reset_seqs" .IX Subsection "reset_seqs" .Vb 5 \& Title : reset_seqs \& Usage : $result\->reset_seqs \& Function: Reset the OTU seqs stored \& Returns : none \& Args : none .Ve .SS "get_seqs" .IX Subsection "get_seqs" .Vb 6 \& Title : get_seqs \& Usage : my @otus = $result\->get_seqs \& Function: Get the seqs Bio::PrimarySeq (OTU = Operational Taxonomic Unit) \& Returns : Array of Bio::PrimarySeq \& Args : None \&See also : L .Ve .SS "set_codon_pos_basefreq" .IX Subsection "set_codon_pos_basefreq" .Vb 6 \& Title : set_codon_pos_basefreq \& Usage : $result\->set_codon_pos_basefreq(@freqs) \& Function: Set the codon position base frequencies \& Returns : none \& Args : Array of length 3 where each slot has a hashref \& keyed on DNA base .Ve .SS "get_codon_pos_basefreq" .IX Subsection "get_codon_pos_basefreq" .Vb 9 \& Title : get_codon_pos_basefreq \& Usage : my @basepos = $result\->get_codon_pos_basefreq; \& Function: Get the codon position base frequencies \& Returns : Array of length 3 (each codon position), each \& slot is a hashref keyed on DNA bases, the values are \& the frequency of the base at that position for all sequences \& Args : none \& Note : The array starts at 0 so position \*(Aq1\*(Aq is in position \*(Aq0\*(Aq \& of the array .Ve .SS "version" .IX Subsection "version" .Vb 5 \& Title : version \& Usage : $obj\->version($newval) \& Function: Get/Set version \& Returns : value of version \& Args : newvalue (optional) .Ve .SS "seqfile" .IX Subsection "seqfile" .Vb 5 \& Title : seqfile \& Usage : $obj\->seqfile($newval) \& Function: Get/Set seqfile \& Returns : value of seqfile \& Args : newvalue (optional) .Ve .SS "model" .IX Subsection "model" .Vb 5 \& Title : model \& Usage : $obj\->model($newval) \& Function: Get/Set model \& Returns : value of model \& Args : on set, new value (a scalar or undef, optional) .Ve .SS "patterns" .IX Subsection "patterns" .Vb 10 \& Title : patterns \& Usage : $obj\->patterns($newval) \& Function: Get/Set Patterns hash \& Returns : Hashref of pattern data \& Args : [optional] Hashref of patterns \& : The hashref is typically \& : { \-patterns => \e@arrayref \& : \-ns => $ns \& : \-ls => $ls \& : } .Ve .SS "set_AAFreqs" .IX Subsection "set_AAFreqs" .Vb 6 \& Title : set_AAFreqs \& Usage : $result\->set_AAFreqs(\e%aafreqs); \& Function: Get/Set AA freqs \& Returns : none \& Args : Hashref, keys are the sequence names, each points to a hashref \& which in turn has keys which are the amino acids .Ve .SS "get_AAFreqs" .IX Subsection "get_AAFreqs" .Vb 10 \& Title : get_AAFreqs \& Usage : my %all_aa_freqs = $result\->get_AAFreqs() \& OR \& my %seq_aa_freqs = $result\->get_AAFreqs($seqname) \& Function: Get the AA freqs, either for every sequence or just \& for a specific sequence \& The average aa freqs for the entire set are also available \& for the sequence named \*(AqAverage\*(Aq \& Returns : Hashref \& Args : (optional) sequence name to retrieve aa freqs for .Ve .SS "set_NTFreqs" .IX Subsection "set_NTFreqs" .Vb 6 \& Title : set_NTFreqs \& Usage : $result\->set_NTFreqs(\e%aafreqs); \& Function: Get/Set NT freqs \& Returns : none \& Args : Hashref, keys are the sequence names, each points to a hashref \& which in turn has keys which are the amino acids .Ve .SS "get_NTFreqs" .IX Subsection "get_NTFreqs" .Vb 10 \& Title : get_NTFreqs \& Usage : my %all_nt_freqs = $result\->get_NTFreqs() \& OR \& my %seq_nt_freqs = $result\->get_NTFreqs($seqname) \& Function: Get the NT freqs, either for every sequence or just \& for a specific sequence \& The average nt freqs for the entire set are also available \& for the sequence named \*(AqAverage\*(Aq \& Returns : Hashref \& Args : (optional) sequence name to retrieve nt freqs for .Ve .SS "add_stat" .IX Subsection "add_stat" .Vb 6 \& Title : add_stat \& Usage : $result\->add_stat($stat,$value); \& Function: Add some misc stat valuess (key/value pairs) \& Returns : none \& Args : $stat stat name \& $value stat value .Ve .SS "get_stat" .IX Subsection "get_stat" .Vb 5 \& Title : get_stat \& Usage : my $value = $result\->get_stat($name); \& Function: Get the value for a stat of a given name \& Returns : scalar value \& Args : name of the stat .Ve .SS "get_stat_names" .IX Subsection "get_stat_names" .Vb 5 \& Title : get_stat_names \& Usage : my @names = $result\->get_stat_names; \& Function: Get the stat names stored for the result \& Returns : array of names \& Args : none .Ve .SS "get_AADistMatrix" .IX Subsection "get_AADistMatrix" .Vb 5 \& Title : get_AADistMatrix \& Usage : my $mat = $obj\->get_AADistMatrix() \& Function: Get AADistance Matrix \& Returns : value of AADistMatrix (Bio::Matrix::PhylipDist) \& Args : none .Ve .SS "set_AADistMatrix" .IX Subsection "set_AADistMatrix" .Vb 5 \& Title : set_AADistMatrix \& Usage : $obj\->set_AADistMatrix($mat); \& Function: Set the AADistrance Matrix (Bio::Matrix::PhylipDist) \& Returns : none \& Args : AADistrance Matrix (Bio::Matrix::PhylipDist) .Ve .SS "get_AAMLDistMatrix" .IX Subsection "get_AAMLDistMatrix" .Vb 5 \& Title : get_AAMLDistMatrix \& Usage : my $mat = $obj\->get_AAMLDistMatrix() \& Function: Get AAMLDistance Matrix \& Returns : value of AAMLDistMatrix (Bio::Matrix::PhylipDist) \& Args : none .Ve .SS "set_AAMLDistMatrix" .IX Subsection "set_AAMLDistMatrix" .Vb 5 \& Title : set_AAMLDistMatrix \& Usage : $obj\->set_AAMLDistMatrix($mat); \& Function: Set the AA ML Distrance Matrix (Bio::Matrix::PhylipDist) \& Returns : none \& Args : AAMLDistrance Matrix (Bio::Matrix::PhylipDist) .Ve .SS "add_NSSite_result" .IX Subsection "add_NSSite_result" .Vb 5 \& Title : add_NSSite_result \& Usage : $result\->add_NSSite_result($model) \& Function: Add a NSsite result (PAML::ModelResult) \& Returns : none \& Args : Bio::Tools::Phylo::PAML::ModelResult .Ve .SS "get_NSSite_results" .IX Subsection "get_NSSite_results" .Vb 5 \& Title : get_NSSite_results \& Usage : my @results = @{$self\->get_NSSite_results}; \& Function: Get the reference to the array of NSSite_results \& Returns : Array of PAML::ModelResult results \& Args : none .Ve .SS "set_CodonFreqs" .IX Subsection "set_CodonFreqs" .Vb 5 \& Title : set_CodonFreqs \& Usage : $obj\->set_CodonFreqs($newval) \& Function: Get/Set the Codon Frequence table \& Returns : value of set_CodonFreqs (a scalar) \& Args : on set, new value (a scalar or undef, optional) .Ve .SS "get_CodonFreqs" .IX Subsection "get_CodonFreqs" .Vb 5 \& Title : get_CodonFreqs \& Usage : my @codon_freqs = $result\->get_CodonFreqs() \& Function: Get the Codon freqs \& Returns : Array \& Args : none .Ve .SS "get_KappaMatrix" .IX Subsection "get_KappaMatrix" .Vb 5 \& Title : get_KappaMatrix \& Usage : my $mat = $obj\->get_KappaMatrix() \& Function: Get KappaDistance Matrix \& Returns : value of KappaMatrix (Bio::Matrix::PhylipDist) \& Args : none .Ve .SS "set_KappaMatrix" .IX Subsection "set_KappaMatrix" .Vb 5 \& Title : set_KappaMatrix \& Usage : $obj\->set_KappaMatrix($mat); \& Function: Set the KappaDistrance Matrix (Bio::Matrix::PhylipDist) \& Returns : none \& Args : KappaDistrance Matrix (Bio::Matrix::PhylipDist) .Ve .SS "get_AlphaMatrix" .IX Subsection "get_AlphaMatrix" .Vb 5 \& Title : get_AlphaMatrix \& Usage : my $mat = $obj\->get_AlphaMatrix() \& Function: Get AlphaDistance Matrix \& Returns : value of AlphaMatrix (Bio::Matrix::PhylipDist) \& Args : none .Ve .SS "set_AlphaMatrix" .IX Subsection "set_AlphaMatrix" .Vb 5 \& Title : set_AlphaMatrix \& Usage : $obj\->set_AlphaMatrix($mat); \& Function: Set the AlphaDistrance Matrix (Bio::Matrix::PhylipDist) \& Returns : none \& Args : AlphaDistrance Matrix (Bio::Matrix::PhylipDist) .Ve .SS "set_input_parameter" .IX Subsection "set_input_parameter" .Vb 5 \& Title : set_input_parameter \& Usage : $obj\->set_input_parameter($p,$vl); \& Function: Set an Input Parameter \& Returns : none \& Args : $parameter and $value .Ve .SS "get_input_parameters" .IX Subsection "get_input_parameters" .Vb 5 \& Title : get_input_parameters \& Usage : $obj\->get_input_parameters; \& Function: Get Input Parameters \& Returns : Hash of key/value pairs \& Args : none .Ve .SS "reset_input_parameters" .IX Subsection "reset_input_parameters" .Vb 5 \& Title : reset_input_parameters \& Usage : $obj\->reset_input_parameters; \& Function: Reset the Input Parameters hash \& Returns : none \& Args : none .Ve .SS "add_rst_seq" .IX Subsection "add_rst_seq" .Vb 6 \& Title : add_rst_seq \& Usage : $obj\->add_rst_seq($seq) \& Function: Add a Bio::PrimarySeq to the RST Result \& Returns : none \& Args : Bio::PrimarySeqI \&See also : L .Ve .SS "reset_rst_seqs" .IX Subsection "reset_rst_seqs" .Vb 5 \& Title : reset_rst_seqs \& Usage : $result\->reset_rst_seqs \& Function: Reset the RST seqs stored \& Returns : none \& Args : none .Ve .SS "get_rst_seqs" .IX Subsection "get_rst_seqs" .Vb 6 \& Title : get_rst_seqs \& Usage : my @otus = $result\->get_rst_seqs \& Function: Get the seqs Bio::PrimarySeq \& Returns : Array of Bio::PrimarySeqI objects \& Args : None \&See also : L .Ve .SS "add_rst_tree" .IX Subsection "add_rst_tree" .Vb 6 \& Title : add_rst_tree \& Usage : $obj\->add_rst_tree($tree) \& Function: Add a Bio::Tree::TreeI to the RST Result \& Returns : none \& Args : Bio::Tree::TreeI \&See also : L .Ve .SS "reset_rst_trees" .IX Subsection "reset_rst_trees" .Vb 5 \& Title : reset_rst_trees \& Usage : $result\->reset_rst_trees \& Function: Reset the RST trees stored \& Returns : none \& Args : none .Ve .SS "get_rst_trees" .IX Subsection "get_rst_trees" .Vb 6 \& Title : get_rst_trees \& Usage : my @otus = $result\->get_rst_trees \& Function: Get the trees Bio::Tree::TreeI \& Returns : Array of Bio::Tree::TreeI objects \& Args : None \&See also : L .Ve .SS "set_rst_persite" .IX Subsection "set_rst_persite" .Vb 5 \& Title : set_rst_persite \& Usage : $obj\->set_rst_persite($newval) \& Function: Get/Set the per\-site RST values \& Returns : value of set_rst_persite (a scalar) \& Args : on set, new value (a scalar or undef, optional) .Ve .SS "get_rst_persite" .IX Subsection "get_rst_persite" .Vb 5 \& Title : get_rst_persite \& Usage : my @rst_persite = @{$result\->get_rst_persite()} \& Function: Get the per\-site RST values \& Returns : Array \& Args : none .Ve .SH "Reconstructed Ancestral State relevant options" .IX Header "Reconstructed Ancestral State relevant options" .SH "FEEDBACK" .IX Header "FEEDBACK" .SS "Mailing lists" .IX Subsection "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. .PP .Vb 2 \& bioperl\-l@bioperl.org \- General discussion \& http://bioperl.org/Support.html \- About the mailing lists .Ve .SS "Support" .IX Subsection "Support" Please direct usage questions or support issues to the mailing list: \&\fIbioperl\-l@bioperl.org\fR .PP 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. .SS "Reporting bugs" .IX Subsection "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: .PP .Vb 1 \& https://github.com/bioperl/bio\-tools\-phylo\-paml/issues .Ve .SH "AUTHORS" .IX Header "AUTHORS" Jason Stajich .PP Aaron Mackey .PP Albert Vilella .SH "COPYRIGHT" .IX Header "COPYRIGHT" This software is copyright (c) by Jason Stajich , and by Aaron Mackey . .PP This software is available under the same terms as the perl 5 programming language system itself.