[Bioperl-l] SVG treefile problem

Amanda O'Reilly ajo11 at mole.bio.cam.ac.uk
Thu Jan 19 12:02:47 UTC 2006


I am trying to draw SVG format phylogenetic trees - the output tree is 
distorted.

Using checked code & tree from here (code reproduced below also):
http://portal.open-bio.org/pipermail/bioperl-l/2004-April/015581.html
This gives a distorted tree if I leave out 'warn $tree'.
If I leave 'warn $tree' in the code, I get the following error.
Bio::Tree::Tree=HASH(0x606b68) at tree_play.pl line 17, <GEN0> line 1.

Have tried running with UNIX (BioPerl 1.5) & Linux installations & tried 
viewing tree with different applications- output tree always looks wrong.

Thanks,
Amanda.

#!/usr/local/bin/perl -w
use strict;

use lib '.';
use Bio::TreeIO;
use Data::Dumper;
use SVG::Graph;

my $infile = "/scratch/ajo11/exp/aln/000ms/11.ph";
my $outfile = ">/scratch/ajo11/exp/aln/000ms/11.svg";
my $in = new Bio::TreeIO(-file => $infile,
                           -format => 'newick');
my $out = new Bio::TreeIO(-file => $outfile,
                            -format => 'svggraph');

while( my $tree = $in->next_tree ) {
      #warn $tree;
      my $svg_xml = $out->write_tree($tree);
}




More information about the Bioperl-l mailing list