whitespace and hyperlinks into PNF files

14 views
Skip to first unread message

monkey79

unread,
May 25, 2012, 4:04:05 AM5/25/12
to eteto...@googlegroups.com
Hey there,

I have got two questions:

1) if  there is any way to reduce unused whitespace at the bottom of my PNG image (see example file attached)

2) If I can create a hyperlink into my my image that would point to a genome browser, as ensambl

thanks so much,

B.
OG232.txt.fa.clustalw.phylip.root_phyml_tree.tree.png

Jaime Huerta Cepas

unread,
May 29, 2012, 4:57:44 AM5/29/12
to eteto...@googlegroups.com
1) if  there is any way to reduce unused whitespace at the bottom of my PNG image (see example file attached)
A4 paper size is produced when no dimensions are provided to the render function. Try setting the desired width (if height is not provided, it will be automatically adjusted to keep the aspect ratio). Check render options here.

tree.render("myTree.png", w="10", units="cm")
 

2) If I can create a hyperlink into my my image that would point to a genome browser, as ensambl

png images are static, so they cannot contain links. However, an image map is returned when "render" function is called. You could use such a pixel map to create interactive web images or anything else. Nevertheless, ETE has an advanced extension to set up web tree applications, which would allow you to create custom and interactive tree images as the ones in phylomedb.

Hope it helps. 
Jaime
Reply all
Reply to author
Forward
0 new messages