Graphlan - Names overlapped

Graphlan - Names overlapped

Hi everyone,

I have been trying to separate the names on the figure to better visualization, but I couldn’t find a proper command to do it.

Used commands:

tail -n +2 merged_abundance_table.txt | cut -f1,3- > merged_abundance_table_reformatted.txt

*export2graphlan.py --skip_rows 1 -i merged_abundance_table_reformatted.txt --tree merged_abundance.tree.txt --annotation merged_abundance.annot.txt --most_abundant 100 --abundance_threshold 1 --least_biomarkers 10 --annotations 5,6 --external_annotations 7 --min_clade_size 1 --def_clade_size 5 --def_font_size 8 --annotation_legend_font_size 8 *

graphlan_annotate.py --annot merged_abundance.annot.txt merged_abundance.tree.txt merged_abundance.xml

graphlan.py --pad 1 --dpi 300 merged_abundance.xml merged_abundance.png --external_legends

Does anyone know the best way to fix it? If yes, could you please help me with it?

I appreciate any help with it.

Have a great weekend.

Kind regards,
Valter

Hi Valter,

Thanks for using GraPhlAn. One solution to this problem might be to use shortened versions of the taxa names. You could change Lactobacillus to Lactob, Lactococcus to Lactoc, Faecalibacterium to Faecali, etc. You would do this by writing the annotation in your .annot.txt as follows:

# # #
Lactobacillus annotation Lactob:Lactobacillus
Lactococccus annotation Lactoc:Lactococcus
Faecalibacterium annotation Faecali:Faecalibacterium

Here, the first column is the name of your node, the second column says that you are annotating this node, and the third column is the label. As you can see, in the third column I’ve written the shorthand before the colon. For example, Lactob occurs before :Lactobacillus, which tells GraPhlAn that you want to use a shorthand annotation for the Lactobacillus node. Importantly, GraPhlAn will also produce a legend that explains what the abbreviations stand for.

I’d recommend doing this wherever there’s an overlap. It will involve some manual inspection of the tree but it should tidy up the labels.

Hope this helps! Let me know if you have any additional questions.

Regards,
Aaron.

1 Like

Hi Aaron,

Thank you so much for your help and attention. Now I can shorten the taxa names, and, as a result, I have a much better GraPhlAn output.

I’d appreciate it if you could also let me know if it is possible to include all the taxon names in the output files. For instance, Treponema berlinense doesn’t show up on my output files. I have tried to change the settings of --abundance_threshold and --most_abundant without success.

Thank you, Aaron. I am delighted with my new GraPhlAn figures!

Kind regards,
Valter