Entering edit mode
8.6 years ago
shirani.s
▴
10
I am using a perl script to draw a Newick format tree using Bio::Phylo::Treedrawer. Here's the related part of the code:
$newickString .= ';';
my $forest = Bio::Phylo::IO->parse(
-format => 'newick',
-string => $newickString
);
my $tree = $forest->first;
my $treedrawer = Bio::Phylo::Treedrawer->new(
-width => 3000,
-height => 1580,
-shape => 'CURVY', #curvogram
-mode => 'PHYLO', #phylogram
-format => 'svg',
-text_width => 500,
);
$treedrawer -> set_scale_options(
-width => '100%',
-major => '10%', #major cross hatch interval
-minor => '2%', #minor cross hatch interval
-label => 'MYA',
);
$treedrawer -> set_text_horiz_offset(5);
$treedrawer -> set_text_width(500);
$treedrawer -> set_tree($tree);
print SVG $treedrawer -> draw;
I would like to format the text size but no matter what number I put as -text_width
it doesn't change and I still get the same output. What is the problem? Am I using an incorrect argument?
May be text width is not the same as font size. I guess there is no font option in Bio::Phylo::Treedrawer