Bio::T...::Best(3pm)

πŸ“¦
version 1.7.3 Β· 3 versions
, in debian bookworm, ubuntu noble

πŸ¦‹ 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:

  1. Make sure the njtree executable is in your path (i.e. which njtree returns a valid program
  2. define an environmental variable NJTREEDIR which points to a directory containing the njtree app:

In bash:

export NJTREEDIR=/home/progs/treesoft/njtree

or, In csh/tcsh:

setenv NJTREEDIR /home/progs/treesoft/njtree
  1. include a definition of an environmental variable NJTREEDIR in 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::AlignI object, Bio::Tree::TreeI object [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::TreeI object [optional]
  • Args: Bio::Align::AlignI object, Bio::Tree::TreeI object

πŸ”§ 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::AlignI object
  • Returns: Bio::Align::AlignI object
  • 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::TreeI object
  • 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_best program
  • Example:
  • Returns: parameter string to be passed to njtree_best during 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::IO object
  • 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