Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Minimal documentation

  • Loading branch information...
commit a68cb0a6eb815982608b40a057d5ae9e5ea133da 1 parent f23c96b
bosborne bosborne authored

Showing 2 changed files with 14 additions and 21 deletions. Show diff stats Hide diff stats

  1. +12 20 lib/Bio/Tools/Run/Phylo/FastTree.pm
  2. +2 1  t/FastTree.t
32 lib/Bio/Tools/Run/Phylo/FastTree.pm
@@ -16,10 +16,21 @@ Bio::Tools::Run::Phylo::FastTree
16 16 =head1 SYNOPSIS
17 17
18 18 # Build a FastTree factory
19   - $factory = Bio::Tools::Run::Phylo::FastTree->new();
  19 + $factory = Bio::Tools::Run::Phylo::FastTree->new(-quiet => 1,
  20 + -fastest => 1);
  21 +
  22 + # Get an alignment
  23 + my $alignio = Bio::AlignIO->new(
  24 + -format => 'fasta',
  25 + -file => '219877.cdna.fasta');
  26 + my $alnobj = $alignio->next_aln;
  27 +
  28 + # Analzye the aligment and get a Tree
  29 + my $tree = $factory->run($alnobj);
20 30
21 31 =head1 DESCRIPTION
22 32
  33 +Get a Bio::Tree object given a protein or DNA alignment.
23 34
24 35 =head1 FEEDBACK
25 36
@@ -72,7 +83,6 @@ use Bio::Root::IO;
72 83
73 84 use base qw(Bio::Root::Root Bio::Tools::Run::WrapperBase);
74 85
75   -our %DEFAULTS = ( 'AFORMAT' => 'phylip' );
76 86 our @FastTree_PARAMS = qw(log cat n intree intree1 constraints sprlength topm close
77 87 refresh constraintWeight);
78 88 our @FastTree_SWITCHES = qw(quiet nopr nt fastest slow nosupport pseudo gtr wag quote noml
@@ -95,8 +105,6 @@ sub new {
95 105 my ( $class, @args ) = @_;
96 106 my $self = $class->SUPER::new(@args);
97 107
98   - $self->aformat( $DEFAULTS{'AFORMAT'} );
99   -
100 108 $self->_set_from_args(
101 109 \@args,
102 110 -methods => [ @FastTree_PARAMS, @FastTree_SWITCHES ],
@@ -277,22 +285,6 @@ sub _write_alignfile {
277 285 $tempfile;
278 286 }
279 287
280   -=head2 aformat
281   -
282   - Title : aformat
283   - Usage : my $treeformat = $self->aformat();
284   - Function: Get/Set tree format
285   - Returns : string
286   - Args : string
287   -
288   -=cut
289   -
290   -sub aformat {
291   - my $self = shift;
292   - $self->{'_aformat'} = shift if @_;
293   - $self->{'_aformat'};
294   -}
295   -
296 288 =head2 _alphabet
297 289
298 290 Title : _alphabet
3  t/FastTree.t
@@ -37,7 +37,8 @@ SKIP: {
37 37
38 38 # The input could be an alignment file (fasta or phylip interleaved)
39 39 my $alignfile = test_input_file("sample_dataset_1_aligned.fa");
40   - $tree = $ft->run($alignfile);
  40 + my $fastft = Bio::Tools::Run::Phylo::FastTree->new( -quiet => 1, -fastest => 1 );
  41 + $tree = $fastft->run($alignfile);
41 42 ok defined($tree);
42 43
43 44 # Input is protein sequence alignment

0 comments on commit a68cb0a

Please sign in to comment.
Something went wrong with that request. Please try again.