[Bioperl-l] feedback on small patch for bioperl-run's t/Neighbor.t
Jason Stajich
jason.stajich at duke.edu
Thu Sep 29 21:36:20 EDT 2005
sure - we're testing if we can run neighbor not rigorously testing
whether or not it gives us the right answer , etc. There should only
be 3 leaves so another way to do it is, but testing in the grep on
the 'id' is fine since that is what we're using later on.
my @nodes = sort { $a->id cmp $b->id } grep { $_->is_Leaf } $tree-
>get_nodes;
-j
On Sep 29, 2005, at 6:10 PM, George Hartzell wrote:
>
> t/Neighbor.t fails for me, the patch below fixes it.
>
> I'm running w/ -live and -run from CVS this morning, and Phylip3.6
> (and the proper env. variable set).
>
> I'm getting four nodes, one of which has an id that's ''. By touching
> up the test code so that the id field must be defined and non-empty,
> things work, and the existence of that filter suggests that it's ok
> for there to be more than the three expected nodes in the list.
>
> Does this patch make sense, or am I missing something subtle?
>
> g.
>
> Index: t/Neighbor.t
> ===================================================================
> RCS file: /home/repository/bioperl/bioperl-run/t/Neighbor.t,v
> retrieving revision 1.7
> diff -c -3 -r1.7 Neighbor.t
> *** t/Neighbor.t 18 Dec 2002 13:43:45 -0000 1.7
> --- t/Neighbor.t 29 Sep 2005 21:15:22 -0000
> ***************
> *** 77,83 ****
>
> ($tree) = $tree_factory->create_tree($inputfilename);
> my @nodes = sort { $a->id cmp $b->id }
> ! grep { defined $_->id} $tree->get_nodes();
>
> ok($nodes[2]->id, 'SINFRUP002');
> ok($nodes[1]->id, 'SINFRUP001');
> --- 77,83 ----
>
> ($tree) = $tree_factory->create_tree($inputfilename);
> my @nodes = sort { $a->id cmp $b->id }
> ! grep { defined $_->id and $_->id} $tree->get_nodes();
>
> ok($nodes[2]->id, 'SINFRUP002');
> ok($nodes[1]->id, 'SINFRUP001');
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>
--
Jason Stajich
Duke University
http://www.duke.edu/~jes12
More information about the Bioperl-l
mailing list