BioPerl-Run

 view release on metacpan or  search on metacpan

lib/Bio/Tools/Run/Phylo/Njtree/Best.pm  view on Meta::CPAN

#
# BioPerl module for Bio::Tools::Run::Phylo::Njtree::Best
#
# Please direct questions and support issues to <bioperl-l@bioperl.org> 
#
# Cared for by Albert Vilella <avilella-at-gmail-dot-com>
#
# Copyright Albert Vilella
#
# You may distribute this module under the same terms as perl itself

# POD documentation - main docs before the code

=head1 NAME

Bio::Tools::Run::Phylo::Njtree::Best - Wrapper around the Njtree (Njtree/phyml) best program.

=head1 SYNOPSIS

  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();

=head1 DESCRIPTION

This is a wrapper around the best program of Njtree by Li Heng.  See
http://treesoft.sourceforge.net/njtree.shtml for more information.

Wrapper for the calculation of a reconciled phylogenetic tree with
inferred duplication tags from amultiple sequence alignment and a
species tree using NJTREE.

=head2 Helping the module find your executable 

You will need to enable NJTREEDIR to find the njtree program. This can be
done in (at least) three ways:

  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

  3. 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;

=head1 FEEDBACK

=head2 Mailing Lists

User feedback is an integral part of the evolution of this and other
Bioperl modules. 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

=head2 Support 

Please direct usage questions or support issues to the mailing list:

I<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.

=head2 Reporting Bugs

Report bugs to the Bioperl bug tracking system to help us keep track
the bugs and their resolution.  Bug reports can be submitted via the web:

 http://redmine.open-bio.org/projects/bioperl/

=head1 AUTHOR -  Albert Vilella

Email avilella-at-gmail-dot-com

=head1 APPENDIX

The rest of the documentation details each of the object
methods. Internal methods are usually preceded with a _

=cut

package Bio::Tools::Run::Phylo::Njtree::Best;

use vars qw($AUTOLOAD @ISA $PROGRAMNAME $PROGRAM 
            @NJTREE_BEST_PARAMS @NJTREE_BEST_SWITCHES %OK_FIELD);

use strict;
use Bio::SimpleAlign;
use Bio::AlignIO;
use Bio::TreeIO;
use Bio::Root::Root;
use Bio::Root::IO;
use Bio::Tools::Run::WrapperBase;
@ISA = qw(Bio::Root::Root Bio::Tools::Run::WrapperBase);



( run in 1.690 second using v1.01-cache-2.11-cpan-39bf76dae61 )