Dear all,
I would like to kindly ask you for your help. I am currently using Graphlan and I want to plot the phylum, family and genera to the tree (–annotations 2,5,6) but only shows the family and genera level.
I used the following for the annotation
export2graphlan.py -i Tk.Met.metaphlan.format.taxonomy.txt --tree Tk.Met.tree.txt --annotation Tk.Met.annot.txt --most_abundant 60 --abundance_threshold 3
–least_biomarkers 10 --annotations 2,5,6 --external_annotations 7 --min_clade_size 1 --ftop 200 --title “TK Gut Metagenome”
The annotation and tree file (.txt) and the figure are attached. Could you please help me to solve this issue?
Thanks a lot for your help!
Tk.Met.annot.txt (16.1 KB)
Tk.Met.tree.txt (15.3 KB)
Best,
Daniel DAvila
Hi Daniel,
Thanks for using GraPhlAn. Can you provide me with the Tk.Met.metaphlan.format.taxonomy.txt
file? I can try to replicate the error locally.
In the meantime, I tried the following commands on an example from the export2graphlan tutorial:
wget https://raw.githubusercontent.com/SegataLab/export2graphlan/master/examples/hmp_aerobiosis/lefse_input.txt
https://raw.githubusercontent.com/SegataLab/export2graphlan/master/examples/hmp_aerobiosis/lefse_output.txt
export2graphlan.py -i lefse_input.txt -o lefse_output.txt -t tree.txt -a annot.txt --title "HMP Aerobiosis" --annotations 2,3 --external_annotations 4,5,6 --fname_row 0 --skip_rows 1,2 --ftop 200
graphlan_annotate.py tree.txt tree_annot.txt --annot annot.txt
graphlan.py tree_annot.txt tree.png
The above produces this tree:
As you can see, phyla are labelled in the tree above.
Is it possible that there are no phyla which are differentially abundant between your groups? If this were the case, export2graphlan
might not generate a tree with phyla labels.
Thanks again,
Aaron.
Dear Aaron,
Thank you for your reply snd help. Please find attached the input file for export2graphlan.py. Meantime, I will try to recreate the Graphlan example.
Best,
Tk.Met.metaphlan.format.taxonomy.txt (1.2 MB)
Hi Daniel,
Thanks for providing me with this file. I’ve managed to add phyla labels to the tree using these commands:
export2graphlan.py -i Tk.Met.metaphlan.format.taxonomy.txt --tree Tk.Met.tree.txt --annotation Tk.Met.annot.txt --annotations 2,5,6 --external_annotations 7 --ftop 200 --title "TK Gut Metagenome" --most_abundant 100
graphlan_annotate.py Tk.Met.tree.txt Tk.Met.tree.annotated.txt --annot Tk.Met.annot.txt
graphlan.py Tk.Met.tree.annotated.txt Tk.Met.tree.png --dpi 300 --external-legends
The problem seemed to be that you used the --most_abundant 60
flag, which meant that you were only labelling the first 60 most abundant leaves on the tree.
Do you only have one sample? Or have you averaged the abundances across your samples? At the moment, the tree is just coloured by taxon. Is this what you wanted to do? Note that you can also colour the tree by group to highlight taxa that are differentially abundant between groups.
Let me know if you have any more questions.
Regards,
Aaron.