Pierre, thank you. This is basically what I am looking for except that I am unfamiliar with the gexf format. Is it possible to control tree shape/appearance? -- (I don't see anything like a phylogenetic tree in the Gephi documentation.)
Hi Biostars,
I would like to take the output of Galaxy's Metagenomic Analyses > Fetch Taxonomic representation and make a Taxonomic tree that contains abundance information. For display, I could then experiment with the the many excellent visualization softwares out there ( i am particualry interested in the ETE2 library) . This question is very similar to a previous question where the author was reccommended to use iTOL for a similar purpose. I am wondering, however, if it possible to generate an abundance-information-containing Newick tree directly from the Galaxy Metagenomic Analyses output - ideally to provide a flexible replacement for the current taxonomic abundance-visualization tool. The values in the Newick tree could actually come from the
The data output is a table with a few identifier collumns and then the kindom/phlyum/class.... Here are a few lines (sorry that it wraps):
contig00428 562 root Bacteria n n n Proteobacteria n n Gammaproteobacteria n n Enterobacteriales n n Enterobacteriaceae n n n Escherichia n Escherichia coli n 42469
contig00073 562 root Bacteria n n n Proteobacteria n n Gammaproteobacteria n n Enterobacteriales n n Enterobacteriaceae n n n Escherichia n Escherichia coli n 42945
contig00672 562 root Bacteria n n n Proteobacteria n n Gammaproteobacteria n n Enterobacteriales n n Enterobacteriaceae n n n Escherichia n Escherichia coli n 146126
contig00143 562 root Bacteria n n n Proteobacteria n n Gammaproteobacteria n n Enterobacteriales n n Enterobacteriaceae n n n Escherichia n Escherichia coli n 287840
contig01215 562 root Bacteria n n n Proteobacteria n n Gammaproteobacteria n n Enterobacteriales n n Enterobacteriaceae n n n Escherichia n Escherichia coli n 290448
Alternatively the 'Summarize Taxonomy tool' provides the following:
superkingdom Eukaryota 9
superkingdom Viruses 1
kingdom Fungi 2
kingdom Metazoa 5
kingdom Viridiplantae 1
subkingdom Dikarya 2
superphylum Bacteroidetes/Chlorobi group 22
superphylum Chlamydiae/Verrucomicrobia group 6
superphylum Fibrobacteres/Acidobacteria group 8
phylum Acidobacteria 8
phylum Actinobacteria 9
phylum Apicomplexa 1
any ideas would be appreciated, zach cp
1 answer
The following java code: https://gist.github.com/2787783 takes two parameters:
- a directory for the dump of NCBI taxonomy
a file containing a list of taxonomy-id
javac -Biostar45691.java java Biostar45691NCBITAXONOMY taxonsidlist.txt > result.gexf
it then produces a XML-based Graph (Gexf) .
<graphml xmlns="<a href=" http:="" graphml.graphdrawing.org="" xmlns"="" rel="nofollow">http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org /xmlns <http: graphml.graphdrawing.org="" xmlns="" 1.0="" graphml.xsd">>="" <key="" id="taxname" for="node" attr.name="Taxon.Name" attr.type="string" >="" <key="" id="count" for="node" attr.name="Count" attr.type="int" >="" <key="" id="countleaf" for="node" attr.name="CountLeaf" attr.type="int" >="" <graph="" edgedefault="directed" >="" <node="" id="28216" >="" <data="" key="taxname" >Betaproteobacteria<="" data>="" <data="" key="count" >1<="" data>="" <data="" key="countleaf" >0<="" data>="" <="" node>="" <node="" id="42256" >="" <data="" key="taxname" >Rubrobacter="" radiotolerans<="" data>="" <data="" key="count" >1<="" data>="" <data="" key="countleaf" >1<="" data>="" <="" node>="" <node="" id="2748" >="" <data="" key="taxname" >Carnobacterium="" divergens<="" data>="" <data="" key="count" >1<="" data>="" <data="" key="countleaf" >1<="" data>="" <="" node>="" <node="" id="2" >(...)<="" p="">
You can open this kind of graph using gephi and visualize the usage of each taxon.
In the example below, I've displayed a few ~100 nucleotide having "16S RNA" in their title. You can use the number of times a taxon and his parents (lower) were found or only the count of each taxon from your list (upper)

gexf is a simple XML-based format describing a graph (nodes+edges) and used by gephi. Once opened in gephi, you can customize the graph (colors, layout, etc...) http://gexf.net/format/basic.html
Log in to answer this question.
Zach, how big (# of terminal nodes) are your trees?
jhc, the tree varies depending on the experiment but a few thousand is typical. I actually came across your Taxonomy Lookup and have been playing with it. It is similar to Pierre's but outputs the newick tree which I can then use with the ETE2 library for custom layout. (which is awesome - thanks!).