[Bioperl-l] What's DrawGram.t supposed to do?

George Hartzell hartzell at kestrel.alerce.com
Tue Sep 27 13:48:31 EDT 2005

I'm updating the freebsd bioperl ports to match the 1.5.1 release

I'm working my way through the bioperl run tests.

Drawgram.t doesn't pass unless I do just the right thing when the
preview window pops up, which is troubling because the code seems to
be striving to avoid a preview window.

The arguments that Drawgram.t feeds to drawgram strike me as odd.
It sends a tree file and a font file, which makes sense.

Then it sends an "L", which says we want to change the angle of the

Then it sends an "N", while the program is looking for a number "from
90 to 0"

Now, "N" doesn't seem to kill anything, one just ends up back at the
main menu.

Then the "Y" fires off a preview, and if one tells the preview window
to "plot", then the tests work.  If one just tells it to 'quit', then
the bioperl code throws an exception and the test gets ugly.

But, I think that the _setparams method is broken.

I think that the sequence should end up being (w/out the comments) :

  P # to set the plotting device
  L # to select postscript output
  V # to select the previewing device
  N # to disable previewing
  Y # to plot the plot.

If that makes sense, the _setparams needs to be touched up, here's a

*** Bio/Tools/Run/Phylo/Phylip/DrawGram.pm.orig	Tue Sep 27 10:41:18 2005
--- Bio/Tools/Run/Phylo/Phylip/DrawGram.pm	Tue Sep 27 10:43:27 2005
*** 341,347 ****
  	$attr = uc($attr);
  	next unless (defined $value);
! 	if ($attr eq 'PLOTTER' ||
! 	    $attr eq 'SCREEN' ) {
! 	    # take first char of the input
  	    $param_string .= uc(substr($value,0,1))."\n";
--- 341,351 ----
  	$attr = uc($attr);
  	next unless (defined $value);
! 	if ($attr eq 'PLOTTER') {
! 	    $param_string .= "P\n";
! 	    $param_string .= uc(substr($value,0,1))."\n";
! 	    next;
! 	}
! 	if ($attr eq 'SCREEN' ) {
! 	    $param_string .= "V\n";
  	    $param_string .= uc(substr($value,0,1))."\n";

With this patch applied, I pass the test w/out having to respond to a

I'm using drawgram 3.63, from phylip-3.6, built from ports on FreeBSD

Is this a current release, or am I working with something that's


More information about the Bioperl-l mailing list