Skip to content

Commit

Permalink
Minimal documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
bosborne committed Dec 4, 2011
1 parent f23c96b commit a68cb0a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 21 deletions.
32 changes: 12 additions & 20 deletions lib/Bio/Tools/Run/Phylo/FastTree.pm
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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 ],
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion t/FastTree.t
Expand Up @@ -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
Expand Down

0 comments on commit a68cb0a

Please sign in to comment.