[Bioperl-l] Handling hierarchical phylogeny based data in bio-/perl

Luis-Miguel Rodríguez Rojas lmrodriguezr at gmail.com
Thu May 5 12:47:57 UTC 2011


I am not sure of getting your problem, but seems to me like you could use
Bio::Taxon [1] for this.

[1] http://search.cpan.org/~cjfields/BioPerl-1.6.900/Bio/Taxon.pm,
http://bioperl.org/wiki/Module:Bio::Taxon

--
Luis M. Rodriguez-R
[ http://thebio.me/lrr ]
---------------------------------
UMR Résistance des Plantes aux Bioagresseurs - Group effecteur/cible
Institut de Recherche pour le Développement, Montpellier, France
[ http://bioinfo-prod.mpl.ird.fr/xantho | Luismiguel.Rodriguez at ird.fr ]
+33 (0) 6.29.74.55.93

Unidad de Bioinformática del Laboratorio de Micología y Fitopatología
Universidad de Los Andes, Bogotá, Colombia
[ http://lamfu.uniandes.edu.co | luisrodr at uniandes.edu.co ]
+57 (1) 3.39.49.49 ext 2777



On Wed, Apr 27, 2011 at 8:32 PM, Abhishek Pratap <abhishek.vit at gmail.com>wrote:

> Hi Guys
>
> I have lineage for many contigs blasted to nt dbase. The goal is to
> arrange them in a hierarchical data structure something like hash of
> hash and also store some other ancillary data like contig names for
> each bin and coverage etc.
>
> For example
>
> if my input is from a tsv file with lineage as one column and others
> like contig name, coverage etc
>
> Eukaryota Viridiplantae Streptophyta Embryophyta Tracheophyta
> Spermatophyta Magnoliophyta eudicotyledons core_eudicotyledons
> Eukaryota Viridiplantae Streptophyta Streptophytina Charophyceae
> Charales Characeae Chara
> Eukaryota Viridiplantae Streptophyta Streptophytina Embryophyta
>
> then I would like to store data as follows
>
> Eukaryota -> count = 3
> Eukaryota -> coverage = 6.3
> Eukaryota->Viridplantae->count=3
> Eukaryota->Viridplantae->coverage=4.3
> Eukaryota->Viridplantae->Streptophyta->count=3
> Eukaryota->Viridplantae->Streptophyta->coverage2=2.3
> -------etc
>
> I could create such hash explicitly but it is a tiring process as num
> of words on each line(lineage) increases I have to keep on increasing
> my data structure manually. Also all lines(lineage) wont have same
> number of words.
>
> Also I would like to print such a tree with count/coverage information
> associated for each bin.
>
> Wondering if I can use some Tree based built in capability of
> perl/bio-perl to do this. I did have a look at
> http://bioperl.org/wiki/HOWTO:Trees but I dont think I could find
> example to read from tsv file and create a data structure where I am
> also storing count/coverage for each bin.
>
> Any pointers will help.
>
> Best,
> -Abhi
> _______________________________________________
> 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