BioPerl-Run

 view release on metacpan or  search on metacpan

lib/Bio/Tools/Run/Phylo/Phast/PhyloFit.pm  view on Meta::CPAN

# $Id$
#
# BioPerl module for Bio::Tools::Run::Phylo::Phast::PhyloFit
#
# Please direct questions and support issues to <bioperl-l@bioperl.org> 
#
# Cared for by Sendu Bala <bix@sendu.me.uk>
#
# Copyright Sendu Bala
#
# 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::Phast::PhyloFit - Wrapper for phyloFit

=head1 SYNOPSIS

  use Bio::Tools::Run::Phylo::Phast::PhyloFit;

  # Make a PhyloFit factory
  $factory = Bio::Tools::Run::Phylo::Phast::PhastCons->new();

  # Generate an init.mod file for use by phastCons
  my $init_file = $factory->run($alignment, $tree);

=head1 DESCRIPTION

This is a wrapper for running the phyloFit application by Adam Siepel. You
can get details here: http://compgen.bscb.cornell.edu/~acs/software.html

Currently the interface is extremely simplified. Only the --tree form of usage
is allowed (not --init-model), which means a tree must be supplied with the
alignment (to run()). You can try supplying normal phyloFit arguments to new(),
or calling arg-named methods (excluding initial hyphens and converting others
to underscores, eg. $factory-E<gt>gaps_as_bases(1) to set the --gaps-as-bases arg).

WARNING: the API may change in the future to allow for greater flexability and
access to more phyloFit features.


You will need to enable this PhyloFit wrapper to find the phast programs (at
least phyloFit itself).
This can be done in (at least) three ways:

 1. Make sure the phyloFit executable is in your path.
 2. Define an environmental variable PHASTDIR which is a 
    directory which contains the phyloFit application:
    In bash:

    export PHASTDIR=/home/username/phast/bin

    In csh/tcsh:

    setenv PHASTDIR /home/username/phast/bin

 3. Include a definition of an environmental variable PHASTDIR in
    every script that will use this PhyloFit wrapper module, e.g.:

    BEGIN { $ENV{PHASTDIR} = '/home/username/phast/bin' }
    use Bio::Tools::Run::Phylo::Phast::PhyloFit;

=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
the Bioperl mailing list.  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
of the bugs and their resolution. Bug reports can be submitted via
the web:

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

=head1 AUTHOR - Sendu Bala

Email bix@sendu.me.uk

=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::Phast::PhyloFit;
use strict;

use Cwd;
use File::Spec;
use Bio::AlignIO;
use Bio::TreeIO;

use base qw(Bio::Tools::Run::Phylo::PhyloBase);

our $PROGRAM_NAME = 'phyloFit';
our $PROGRAM_DIR = $ENV{'PHASTDIR'};



( run in 0.858 second using v1.01-cache-2.11-cpan-d7f47b0818f )