[Bioperl-l] How to draw Phylogeny Tree using Bioperl ?

rvos at interchange.ubc.ca rvos at interchange.ubc.ca
Tue Oct 2 13:00:36 EDT 2007


An alternative is to explore the Bio::Phylo treedrawer:

http://search.cpan.org/~rvosa/Bio-Phylo-0.17_RC6/lib/Bio/Phylo/Treedrawer.pm

This is a separate install (in the interest of full disclosure: I'm the author).

Rutger

----- Original Message -----
From: Jason Stajich <jason at bioperl.org>
Date: Monday, October 1, 2007 12:32 pm
Subject: Re: [Bioperl-l] How to draw Phylogeny Tree using Bioperl ?

> I'd definitely recommend  Bio::Tree::Draw::Cladogram over svggraph  
> for prettier trees - you get postscript out but you can render this 
> 
> to png or jpg with unix tools.  If there is a better stand alone 
> tree  
> drawing engine we're happy to try and integrate it into bioperl - 
> the  
> modules here are native Perl only and you can use the bioperl-run  
> modules that wrap DrawTree and DrawGram from EMBOSS to get other PS 
> 
> rendering output.
> 
> Mesquite, TreeView or other tools are usually much better but not  
> always an option if you want to auto-render these images for a  
> website, etc.
> 
> -jason
> 
> 
> On Oct 1, 2007, at 11:48 AM, Lucia Peixoto wrote:
> 
> > Yes,
> > that's the issue about those commands, trees are not pretty at all
> > that's why for a one tree only kind of thing I rather use ITOL
> > other thing to try is the tree drawer of the Mesquite package
> > glad I could help
> >
> > Lucia
> >
> > Quoting Shameer Khadar <shameer at ncbs.res.in>:
> >
> >> Dear Lucia,
> >>
> >> Thanks for the mail. Now I got it. I didnt used this TreeIO /  
> >> Tree::Draw
> >> methods. Some how missed this excellent HOWTO :
> >> http://www.bioperl.org/wiki/HOWTO:Trees. Thanks for that code as 
> 
> >> well. I
> >> tried that and it worked very nicely. I have to work around to  
> >> beautify
> >> the tree and I am just going to do that.
> >>
> >> Thanks & Cheers,
> >> Shameer
> >>
> >>> OK
> >>>
> >>> you can use the implementations in Bio::TreeIO
> >>>
> >>> you can basically read the tree in newick format and out as an  
> >>> svg graph
> >>> something like this:
> >>>
> >>> my $in = new Bio::TreeIO(-file => 'input',
> >>>                          -format => 'newick');
> >>> my $out = new Bio::TreeIO(-file => '>mytree.svg',
> >>>                           -format => 'svggraph');
> >>> while( my $tree = $in->next_tree ) {
> >>>     $out->write_tree($tree);
> >>> }
> >>>
> >>> you can also use Bio::Tree::Draw
> >>>
> >>> hope that helps
> >>>
> >>> Lucia
> >>>
> >>>
> >>> Quoting Shameer Khadar <shameer at ncbs.res.in>:
> >>>
> >>>> Hi,
> >>>>
> >>>> Thanks for your mail. I have to create these trees as a part 
> of a
> >>>> webserver. i need to generate them dynamically using users input
> >>>> sequence.
> >>>> I think ITOL is not the stuff best suited for my purpose.
> >>>>
> >>>>> I think you'll have better luck using some of already available
> >>>> programs
> >>>>> to do
> >>>>> that, you'll get better looking trees. If you just have one  
> >>>>> tree to
> >>>> draw I
> >>>>> recommend you use:
> >>>>> http://itol.embl.de/
> >>>>>
> >>>>> Lucia
> >>>>>
> >>>>>
> >>>>> Quoting Shameer Khadar <shameer at ncbs.res.in>:
> >>>>>
> >>>>>> Dear All,
> >>>>>>
> >>>>>> Is it possible to draw a phylogeny tree file in PNG format 
> using>>>> Bioperl
> >>>>>> ?
> >>>>>>  My input file are in phylip  treefile format. Any Modules / 
> 
> >>>>>> codes in
> >>>>>> Bio::Graphics / Phylogeny sections ?
> >>>>>>
> >>>>>> Input file :
> >>>>>>
> >>>>>
> >>>>
> >>>
> >>
> > ((((((_L_537_539:3.70000,_H_535_536:3.70000):4.97461, 
> > (((((((_E_499_500:2.75000,_E_250_251:2.75000): 
> > 0.55805,_L_252_254:3.30805):1.38576,_H_494_497:4.69381): 
> > 1.51514,_H_255_263:6.20895):0.83877, 
> > (_L_246_249:4.30000,_H_244_245:4.30000):2.74772): 
> > 0.92645,_H_520_534:7.97418):0.15279, 
> > (_H_502_512:6.95000,_H_273_282:6.95000):1.17697):0.54765): 
> > 1.10967,_L_264_272:9.78428):0.53441,_L_283_291:10.31869):3.59264, 
> > ((((_H_479_493:8.25300,((_H_448_462:7.25000,_L_409_411:7.25000): 
> > 0.50000,_L_445_447:7.75000):0.50300):1.08808, 
> > (((((_E_381_382:2.65000,_E_377_378:2.65000): 
> > 0.26434,_L_379_380:2.91434):1.77630,_L_373_376:4.69063): 
> > 1.70029,_L_436_444:6.39093):0.93320,_L_383_391:7.32413):2.01696): 
> > 0.94916,(((((_L_465_469:3.90000,_L_366_368:3.90000): 
> > 1.52226,_H_463_464:5.42226):0.94093, 
> > (_E_427_435:5.15000,_E_369_372:5.15000):1.21319): 
> > 1.64489,_L_336_343:8.00808):0.88402, 
> > (((_H_355_365:6.20000,_L_349_354:6.20000):0.91541, 
> > (_L_327_328:3.40000,_L_318_326:3.40000):3.71541):0.59082, 
> > (((((_E_470_474:3.85000,_E_344_348:
> >>>>  3.
> >>>>>>
> >>>>>
> >>>>
> >>>
> >>
> > 85000):0.89054,_L_475_478:4.74054):1.20107, 
> > (_E_329_335:3.85000,_E_315_317:3.85000):2.09161): 
> > 0.71112,_L_513_519:6.65273):0.67204, 
> > ((_L_296_304:5.00000,_H_292_295:5.00000): 
> > 0.71200,_L_305_314:5.71200):1.61276):0.38147):1.18587):1.39814): 
> > 0.37326,((((_L_397_398:3.55000,_E_394_396:3.55000): 
> > 1.36938,_L_392_393:4.91938):1.43993,_L_422_426:6.35931):1.00790, 
> > 
> (_E_412_421:5.95000,_E_399_408:5.95000):1.41721):3.29629):3.24784): 
> > 4.31679,((((((_L_206_210:3.80000,_H_203_205:3.80000): 
> > 1.75687,_L__49__50:5.55687):1.29579,_H_188_202:6.85266): 
> > 1.08193,_H_229_243:7.93459):0.18730, 
> > (_L_222_228:5.55000,_H_211_221:5.55000):2.57189):3.16298, 
> > ((((_H_159_171:7.00000,_L_156_158:7.00000): 
> > 0.07448,_L_120_122:7.07448):1.59389, 
> > ((((_L__90__91:2.65000,_E__88__89:2.65000): 
> > 0.18425,_E__92__93:2.83425):1.94636,_L__84__87:4.78061): 
> > 1.74719,_L_147_155:6.52780):2.14057):2.44189, 
> > ((((((((_E_179_182:3.50000,_E__80__83:3.50000):2.15544, 
> > (_L_172_178:3.95000,_L__77__79:3.95000):1.70544): 
> > 0.42200,_E_138_146:6.07744):0.46209,_E__51__
> >>>>  5
> >>>>>>
> >>>>>
> >>>>
> >>>
> >>
> > 8:6.53954):0.74619,_L_183_187:7.28573):0.73805, 
> > (_E_123_131:5.70000,_E_110_119:5.70000):2.32378):0.58197, 
> > ((((_L_108_109:4.30000,_E_104_107:4.30000): 
> > 1.34305,_H__66__76:5.64305):0.81535,_L_132_137:6.45840):1.22044, 
> > 
> (_L__94_103:6.55000,_L__59__65:6.55000):1.12884):0.92691):1.25371, 
> > ((_L__38__39:3.40000,_L__29__37:3.40000):3.64775, 
> > (((((_H___3___6:3.30000,_L___1___2:3.30000): 
> > 0.79885,_L__21__25:4.09885):0.80972,_E__26__28:4.90856): 
> > 0.88488,_E__40__48:5.79344):0.60814, 
> > 
> (_L__12__20:5.25000,_H___8__11:5.25000):1.15158):0.64616):2.81172): 
> > 1.25080):0.17461):6.94325);
> >>>>>>
> >>>>
> >>>> --
> >>>> Shameer Khadar
> >>>> Prof. R. Sowdhamini's Lab (# 25) The Computational Biology Group
> >>>> National Centre for Biological Sciences (TIFR)
> >>>> GKVK Campus, Bellary Road, Bangalore - 65, Karnataka - India
> >>>> T - 91-080-23666001 EXT - 6251
> >>>> W - http://www.ncbs.res.in
> >>>>
> >>>
> >>>
> >>> Lucia Peixoto
> >>> Department of Biology,SAS
> >>> University of Pennsylvania
> >>>
> >>
> >>
> >> --
> >> Shameer Khadar
> >> Prof. R. Sowdhamini's Lab (# 25) The Computational Biology Group
> >> National Centre for Biological Sciences (TIFR)
> >> GKVK Campus, Bellary Road, Bangalore - 65, Karnataka - India
> >> T - 91-080-23666001 EXT - 6251
> >> W - http://www.ncbs.res.in
> >>
> >
> >
> > Lucia Peixoto
> > Department of Biology,SAS
> > University of Pennsylvania
> > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l at lists.open-bio.org
> > http://lists.open-bio.org/mailman/listinfo/bioperl-l
> 
> --
> Jason Stajich
> jason at bioperl.org
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
> 



More information about the Bioperl-l mailing list