I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2007-10-16 18:55:25-07 by eleysanne
svg


If this is not the right place to ask this question, I apologize.

I installed the Bio::Phylo module and tried running the sample program from the Treedrawer webpage:

use Bio::Phylo::IO 'parse'; use Bio::Phylo::Treedrawer; my $string = '((A:1,B:2)n1:3,C:4)n2:0;'; my $tree = parse( -format => 'newick', -string => $string )->first; my $treedrawer = Bio::Phylo::Treedrawer->new( -width => 800, -height => 600, -shape => 'CURVY', # curvogram -mode => 'PHYLO', # cladogram -format => 'SVG' ); $treedrawer->set_scale_options( -width => '100%', -major => '10%', # major cross hatch interval -minor => '2%', # minor cross hatch interval -label => 'MYA', ); $treedrawer->set_tree($tree); print $treedrawer->draw;


It ran without any problems, but I am having a hard time figuring out how to display the tree. I saved the output in a file called "out.svg" and tried opening it using Firefox 2.0 and Safari 2.0 on a G4 PPC Mac.

Any ideas?

Thanks in advance,
eleysanne
Direct Responses: 6274 | Write a response
Posted on 2007-10-17 09:33:38-07 by rvosa in response to 6273
Re: svg

Dear eleysanne,

this is exactly the right location to ask these questions! However, I can't quite figure out what the issue is. When I run the example script, and re-direct the output to a file, I can open the result in Firefox 2.0 (osx intel) no problem. Other tools known to work are Illustrator, the adobe svg viewer browser plugin (for internet explorer, for example) and the batik svg viewer/editor. Either should show a three-tip additive tree with curved branches and a scale bar. What, specifically, is the problem you are having?

Best wishes,

Rutger Vos

Direct Responses: 6275 | Write a response
Posted on 2007-10-17 11:42:08-07 by eleysanne in response to 6274
Re: svg
Thanks for getting back to me!

I played with the file endings a little bit, and it seems as if the only way I can open is in Firefox, using .xml

When I tried opening the out.svg file in Firefox, it asked what it was supposed to do with the file (it wanted me to specify an application).

Do you know if there is a program out there that converts .svg to .jpg? SVG just doesn't seem as userfriendly yet :(

cheers,
~eleysanne
Direct Responses: 6401 | Write a response
Posted on 2007-11-06 15:57:33-08 by rvosa in response to 6275
Re: svg
Hi,

for editing and converting vector drawings (such as svg) I always use Adobe Illustrator. You can get a fully functional demo (which shuts down after a month, I think) from the Adobe website. I'm a little surprised firefox won't open svg files with a .svg extension, as far as I know it's been capable of doing that for a long while now. Is there any chance you have a very old version?

Best wishes,

Rutger
Direct Responses: Write a response