Permalink
Browse files

Minimal documentation

  • Loading branch information...
1 parent f23c96b commit a68cb0a6eb815982608b40a057d5ae9e5ea133da @bosborne bosborne committed Dec 4, 2011
Showing with 14 additions and 21 deletions.
  1. +12 −20 lib/Bio/Tools/Run/Phylo/FastTree.pm
  2. +2 −1 t/FastTree.t
@@ -16,10 +16,21 @@ Bio::Tools::Run::Phylo::FastTree
=head1 SYNOPSIS
# Build a FastTree factory
- $factory = Bio::Tools::Run::Phylo::FastTree->new();
+ $factory = Bio::Tools::Run::Phylo::FastTree->new(-quiet => 1,
+ -fastest => 1);
+
+ # Get an alignment
+ my $alignio = Bio::AlignIO->new(
+ -format => 'fasta',
+ -file => '219877.cdna.fasta');
+ my $alnobj = $alignio->next_aln;
+
+ # Analzye the aligment and get a Tree
+ my $tree = $factory->run($alnobj);
=head1 DESCRIPTION
+Get a Bio::Tree object given a protein or DNA alignment.
=head1 FEEDBACK
@@ -72,7 +83,6 @@ use Bio::Root::IO;
use base qw(Bio::Root::Root Bio::Tools::Run::WrapperBase);
-our %DEFAULTS = ( 'AFORMAT' => 'phylip' );
our @FastTree_PARAMS = qw(log cat n intree intree1 constraints sprlength topm close
refresh constraintWeight);
our @FastTree_SWITCHES = qw(quiet nopr nt fastest slow nosupport pseudo gtr wag quote noml
@@ -95,8 +105,6 @@ sub new {
my ( $class, @args ) = @_;
my $self = $class->SUPER::new(@args);
- $self->aformat( $DEFAULTS{'AFORMAT'} );
-
$self->_set_from_args(
\@args,
-methods => [ @FastTree_PARAMS, @FastTree_SWITCHES ],
@@ -277,22 +285,6 @@ sub _write_alignfile {
$tempfile;
}
-=head2 aformat
-
- Title : aformat
- Usage : my $treeformat = $self->aformat();
- Function: Get/Set tree format
- Returns : string
- Args : string
-
-=cut
-
-sub aformat {
- my $self = shift;
- $self->{'_aformat'} = shift if @_;
- $self->{'_aformat'};
-}
-
=head2 _alphabet
Title : _alphabet
View
@@ -37,7 +37,8 @@ SKIP: {
# The input could be an alignment file (fasta or phylip interleaved)
my $alignfile = test_input_file("sample_dataset_1_aligned.fa");
- $tree = $ft->run($alignfile);
+ my $fastft = Bio::Tools::Run::Phylo::FastTree->new( -quiet => 1, -fastest => 1 );
+ $tree = $fastft->run($alignfile);
ok defined($tree);
# Input is protein sequence alignment

0 comments on commit a68cb0a

Please sign in to comment.