Bio::T...::Best(3pm)
π¦ Bio::T...::Best π¦
okay so bestie, welcome to Bio::Tools::Run::Phylo::Njtree::Best(3pm) β it's a User Contributed Perl Documentation page and honestly? it's giving "small wrapper, big energy" π
. Everything below is the whole page, nothing skipped, no cap.
β¨ NAME β¨
Bio::Tools::Run::Phylo::Njtree::Best β it's a wrapper around the Njtree (Njtree/phyml) best program. that's the whole name section, short and slay π
β¨ SYNOPSIS β¨
here's the whole vibe in code form, copy it exactly bestie:
use Bio::Tools::Run::Phylo::Njtree::Best;
use Bio::AlignIO;
use Bio::TreeIO;
my $alignio = Bio::AlignIO->new(-format => 'fasta',
-file => 't/data/njtree_aln2.nucl.mfa');
my $aln = $alignio->next_aln;
my $treeio = Bio::TreeIO->new(
-format => 'nhx', -file => 't/data/species_tree_njtree.nh');
my $tree = $treeio->next_tree;
my $njtree_best = Bio::Tools::Run::Phylo::Njtree::Best->new();
$njtree_best->alignment($aln);
$njtree_best->tree($tree);
my $nhx_tree = $njtree_best->run();
β¨ DESCRIPTION β¨
so this is a wrapper around the best program of Njtree by Li Heng π§. if you want more info, go peek at http://treesoft.sourceforge.net/njtree.shtml.
and what does it actually do? it's a wrapper for the calculation of a reconciled phylogenetic tree with inferred duplication tags, built from a multiple sequence alignment plus a species tree, using NJTREE. literally the whole point. π
πΈ Helping the module find your executable πΈ
bestie you gotta let the module find the njtree program, and for that you need to enable NJTREEDIR. there's (at least) three ways to do this:
- Make sure the
njtreeexecutable is in your path (i.e.which njtreereturns a valid program - define an environmental variable
NJTREEDIRwhich points to a directory containing thenjtreeapp:
In bash:
export NJTREEDIR=/home/progs/treesoft/njtree
or, In csh/tcsh:
setenv NJTREEDIR /home/progs/treesoft/njtree
- include a definition of an environmental variable
NJTREEDIRin every script that will:
BEGIN {$ENV{NJTREEDIR} = '/home/progs/treesoft/njtree'; }
use Bio::Tools::Run::Phylo::Njtree::Best;
π FEEDBACK π
π¬ Mailing Lists
user feedback is an integral part of the evolution of this and other Bioperl modules β like, genuinely, it's the main character of the whole ecosystem. send your comments and suggestions preferably to one of the Bioperl mailing lists. your participation is much appreciated π«Ά.
bioperl-l@bioperl.org - General discussion
http://bioperl.org/wiki/Mailing_lists - 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. that's the move, no cap. lots of experienced and reponsive experts will be able to look at the problem and quickly address it. and 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 so we can keep track of the bugs and their resolution (yes, both). bug reports can be submitted via the web:
http://redmine.open-bio.org/projects/bioperl/
π AUTHOR - Albert Vilella π
Email avilella-at-gmail-dot-com β that's the icon who wrote this π
π APPENDIX π
the rest of the documentation details each of the object methods. internal methods are usually preceded with a _ (iykyk, that underscore is the "don't touch, it's private" signal β).
π§ program_name
- Title:
program_name - Usage:
$factory->program_name() - Function: holds the program name
- Returns: string
- Args: None
π§ program_dir
- Title:
program_dir - Usage:
$factory->program_dir(@params) - Function: returns the program directory, obtained from ENV variable.
- Returns: string
- Args:
π§ new
- Title:
new - Usage:
my $njtree_best = Bio::Tools::Run::Phylo::Njtree::Best->new(); - Function: Builds a new
Bio::Tools::Run::Phylo::Njtree::Best - Returns:
Bio::Tools::Run::Phylo::Njtree::Best - Args:
-alignment => the Bio::Align::AlignI object
-tree => the Bio::Tree::TreeI object
-save_tempfiles => boolean to save the generated tempfiles and
NOT cleanup after onesself (default FALSE)
-executable => where the njtree executable resides
See also: Bio::Tree::TreeI, Bio::Align::AlignI
π§ prepare
- Title:
prepare - Usage:
my $rundir = $njtree_best->prepare(); - Function: prepare the njtree_best analysis using the default or updated parameters β the alignment parameter and species tree must have been set
- Returns: value of
rundir - Args:
Bio::Align::AlignIobject,Bio::Tree::TreeIobject [optional]
π§ run
- Title:
run - Usage:
my $nhx_tree = $njtree_best->run(); - Function: run the njtree_best analysis using the default or updated parameters β the alignment parameter must have been set
- Returns:
Bio::Tree::TreeIobject [optional] - Args:
Bio::Align::AlignIobject,Bio::Tree::TreeIobject
π§ error_string
- Title:
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)
π§ version
- Title:
version - Usage:
exit if $prog->version() < 1.8 - Function: Determine the version number of the program
- Example:
- Returns: float or undef
- Args: none
π§ alignment
- Title:
alignment - Usage:
$njtree_best->align($aln); - Function: Get/Set the
Bio::Align::AlignIobject - Returns:
Bio::Align::AlignIobject - Args: [optional]
Bio::Align::AlignI - Comment: We could potentially add support for running directly on a file but we shall keep it simple
- See also:
Bio::SimpleAlign
π§ tree
- Title:
tree - Usage:
$njtree_best->tree($tree, %params); - Function: Get/Set the
Bio::Tree::TreeIobject - Returns:
Bio::Tree::TreeI - Args: [optional]
$tree=>Bio::Tree::TreeI, [optional]%parameters=> hash of tree-specific parameters - Comment: We could potentially add support for running directly on a file but we shall keep it simple
- See also:
Bio::Tree::Tree
π§ check_names
- Title:
check_names - Usage:
- Function:
- Example:
- Returns:
- Args:
(yes bestie, every single field is blank. it's giving mystery, it's giving "figure it out yourself" π)
π§ _setparams
- Title:
_setparams - Usage: Internal function, not to be called directly
- Function: Create parameter inputs for
njtree_bestprogram - Example:
- Returns: parameter string to be passed to
njtree_bestduring align or profile_align - Args: name of calling object
π Bio::Tools::Run::BaseWrapper methods π
π§ save_tempfiles
- Title:
save_tempfiles - Usage:
$obj->save_tempfiles($newval) - Function:
- Returns: value of
save_tempfiles - Args: newvalue (optional)
π§ outfile_name
- Title:
outfile_name - Usage:
my $outfile = $njtree_best->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
π§ tempdir
- Title:
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
π§ cleanup
- Title:
cleanup - Usage:
$njtree_best->cleanup(); - Function: Will cleanup the tempdir directory
- Returns: none
- Args: none
π§ io
- Title:
io - Usage:
$obj->io($newval) - Function: Gets a
Bio::Root::IOobject - Returns:
Bio::Root::IO - Args: none
that's the whole page bestie, you ate it π β¨ and btw, this lil masterpiece is perl v5.36.0, dated 2023-01-22 β mwah, go run some trees π¦π³π
π¦ where this page comes from
- debian bookworm: libbio-perl-run-perl 1.7.3-9 Β· Perl
- ubuntu noble: libbio-perl-run-perl 1.7.3-9 Β· Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms