Skip to content

Commit

Permalink
Minor edits
Browse files Browse the repository at this point in the history
  • Loading branch information
bosborne committed Oct 10, 2011
1 parent f135c87 commit c360fe1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
7 changes: 2 additions & 5 deletions t/Njtree.t
@@ -1,7 +1,6 @@
# This is -*-Perl-*- code
## Bioperl Test Harness Script for Modules
##
# $Id$

# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.t'
Expand All @@ -25,13 +24,11 @@ SKIP: {
-tests => 1);

my $alignio = Bio::AlignIO->new(-format => 'fasta',
-file => 't/data/njtree_aln2.nucl.mfa');

-file => test_input_file('njtree_aln2.nucl.mfa'));
my $aln = $alignio->next_aln;

my $treeio = Bio::TreeIO->new(
-format => 'nhx', -file => 't/data/species_tree_njtree.nh');

-format => 'nhx', -file => test_input_file('species_tree_njtree.nh'));
my $tree = $treeio->next_tree;

$njtree_best->alignment($aln);
Expand Down
13 changes: 5 additions & 8 deletions t/ProtPars.t
@@ -1,6 +1,5 @@
# -*-Perl-*-
## Bioperl Test Harness Script for Modules
## $Id$

use vars qw($DEBUG );
$DEBUG = test_debug();
Expand Down Expand Up @@ -33,7 +32,6 @@ SKIP: {
my $new_outgroup= $tree_factory->outgroup();
is $new_outgroup, 3, "set factory parameter";


my $jumble = "7,5";
$tree_factory->jumble($jumble);

Expand Down Expand Up @@ -67,18 +65,17 @@ SKIP: {
$tree = $tree_factory->create_tree($aln);

@nodes = sort { defined $a->id && defined $b->id && $a->id cmp $b->id } $tree->get_nodes();
is (scalar(@nodes),5,
"creating tree by protpars");
is (scalar(@nodes),5, "creating tree by protpars");

# test name preservation and restoration:
@params = ('threshold'=>10,'jumble'=>'7,5',outgroup=>2,'idlength'=>10);
$tree_factory = Bio::Tools::Run::Phylo::Phylip::ProtPars->new(@params);
$tree_factory->quiet($bequiet); # Suppress protpars messages to terminal
$inputfilename = test_input_file("longnames.aln");
$aln = Bio::AlignIO->new(-file=>$inputfilename, -format=>'clustalw')->next_aln;
my ($aln_safe, $ref_name) =$aln->set_displayname_safe(3);
$tree = $tree_factory->create_tree($aln_safe);
@nodes = sort { $a->id cmp $b->id } $tree->get_nodes();
my $aln2 = Bio::AlignIO->new(-file=>$inputfilename, -format=>'clustalw')->next_aln;
my ($aln_safe, $ref_name) = $aln2->set_displayname_safe(3);
my $tree2 = $tree_factory->create_tree($aln_safe);
@nodes = sort { $a->id cmp $b->id } $tree2->get_nodes();
is (scalar(@nodes),27,
"creating tree by protpars");
is ($nodes[12]->id, 'S01',"assign serial names");
Expand Down

0 comments on commit c360fe1

Please sign in to comment.