# Visualization with GraPhlAn not generating appropriate plots. Missing nodes and labels

**URL:** <https://forum.biobakery.org/t/visualization-with-graphlan-not-generating-appropriate-plots-missing-nodes-and-labels/4119>\
**Category:** StrainPhlAn\
**Created:** [September 26, 2022, 1:40pm UTC](https://forum.biobakery.org/t/visualization-with-graphlan-not-generating-appropriate-plots-missing-nodes-and-labels/4119 "2022-09-26T13:40:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![arjun\_kothari](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/arjun_kothari/32/1602_2.png) [@arjun\_kothari](https://forum.biobakery.org/u/arjun_kothari)\
**Post date:** [September 26, 2022, 1:40pm UTC](https://forum.biobakery.org/t/visualization-with-graphlan-not-generating-appropriate-plots-missing-nodes-and-labels/4119/1 "2022-09-26T13:40:33Z")

</div>

I am unable to generate similar results as shown in [StrainPhlAn3 · biobakery/biobakery Wiki · GitHub](https://github.com/biobakery/biobakery/wiki/strainphlan3) Visualization with GraPhlAn. I am using all the demo files and able to generate tree image but it has only 5 nodes and also no labels on it. Also when I run it on my data (66 samples and 7 reference genome), it only display 4 nodes and no labels. Also is there a tutorial on ete2 or Jalview to produce phylogenetic tree?

---

<div class="post-metadata">

**Author:** ![aitor.blancomiguez](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/aitor.blancomiguez/32/86_2.png) [@aitor.blancomiguez](https://forum.biobakery.org/u/aitor.blancomiguez)\
**Post date:** [September 27, 2022, 7:52am UTC](https://forum.biobakery.org/t/visualization-with-graphlan-not-generating-appropriate-plots-missing-nodes-and-labels/4119/2 "2022-09-27T07:52:54Z")

</div>

Hi @arjun_kothari  
Which version of StrainPhlAn are you currently using to generate the results (you can run `strainphlan --version`)  
Unfortunately, we have no tutorials for the ete2 and Janlview tools, but they might have some in the official webpages.

---

<div class="post-metadata">

**Author:** ![arjun\_kothari](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/arjun_kothari/32/1602_2.png) [@arjun\_kothari](https://forum.biobakery.org/u/arjun_kothari)\
**Post date:** [September 27, 2022, 8:33pm UTC](https://forum.biobakery.org/t/visualization-with-graphlan-not-generating-appropriate-plots-missing-nodes-and-labels/4119/4 "2022-09-27T20:33:56Z")

</div>

strainphlan 3.0  
I am unable to execute that command. I get following output:  
[bmi-460g8-06 ~]$ strainphlan --version  
usage: strainphlan [-h] [-d DATABASE] [-m CLADE\_MARKERS]  
[-s SAMPLES [SAMPLES …]] [-r REFERENCES [REFERENCES …]]  
[-c CLADE] [-o OUTPUT\_DIR] [-n NPROCS]  
[–secondary\_samples SECONDARY\_SAMPLES [SECONDARY\_SAMPLES …]]  
[–secondary\_references SECONDARY\_REFERENCES [SECONDARY\_REFERENCES …]]  
[–trim\_sequences TRIM\_SEQUENCES]  
[–marker\_in\_n\_samples MARKER\_IN\_N\_SAMPLES]  
[–sample\_with\_n\_markers SAMPLE\_WITH\_N\_MARKERS]  
[–secondary\_sample\_with\_n\_markers SECONDARY\_SAMPLE\_WITH\_N\_MARKERS]  
[–sample\_with\_n\_markers\_after\_filt SAMPLE\_WITH\_N\_MARKERS\_AFTER\_FILT]  
[–phylophlan\_mode {accurate,fast}]  
[–phylophlan\_configuration PHYLOPHLAN\_CONFIGURATION]  
[–tmp TMP] [–mutation\_rates] [–print\_clades\_only]  
[–debug]  
strainphlan: error: unrecognized arguments: --version  
But if I just run “strainphlan”, I get :  
[bmi-460g8-06 ~]$ strainphlan

[e] -s (or --samples) must be specified  
Tue Sep 27 16:38:02 2022: Stop **StrainPhlAn 3.0** execution.

I am having MetaPhlAn version 3.0.14 (19 Jan 2022)

---

<div class="post-metadata">

**Author:** ![aitor.blancomiguez](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/aitor.blancomiguez/32/86_2.png) [@aitor.blancomiguez](https://forum.biobakery.org/u/aitor.blancomiguez)\
**Post date:** [September 30, 2022, 8:17am UTC](https://forum.biobakery.org/t/visualization-with-graphlan-not-generating-appropriate-plots-missing-nodes-and-labels/4119/5 "2022-09-30T08:17:57Z")

</div>

Hi @arjun_kothari  
The latest versions of StrainPhlAn 3 implement a more strict default parameters for filtering out samples and markers from the Phylogeny, so that could explain why you are not able to get the same samples as in the tutorial (that was built with one of the first versions of StrainPhlAn 3). However, it is really odd that you are not able to get the metadata labels in the graphlan visualization, could you share the tree and the metadata file you are using to reproduce the tutorial in the following link: [Biobakery\_forum\_problems - Google Drive](https://drive.google.com/drive/u/1/folders/1gJVSr5km0xe3FTU8hbjUfRR6rIsV85Nh)

---

<div class="post-metadata">

**Author:** ![arjun\_kothari](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/arjun_kothari/32/1602_2.png) [@arjun\_kothari](https://forum.biobakery.org/u/arjun_kothari)\
**Post date:** [December 14, 2022, 3:59pm UTC](https://forum.biobakery.org/t/visualization-with-graphlan-not-generating-appropriate-plots-missing-nodes-and-labels/4119/6 "2022-12-14T15:59:11Z")

</div>

Hi, I was able to plot all my samples by using the appropriate clade marker, but still I am not able to get annotations by using:  
plot\_tree\_graphlan.py -t output\_FINAL/RAxML\_bestTree.s\_\_Staphylococcus\_aureus.StrainPhlAn3.tre.metadata -m subjectID

---

<div class="post-metadata">

**Author:** ![arjun\_kothari](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/arjun_kothari/32/1602_2.png) [@arjun\_kothari](https://forum.biobakery.org/u/arjun_kothari)\
**Post date:** [December 19, 2022, 4:10pm UTC](https://forum.biobakery.org/t/visualization-with-graphlan-not-generating-appropriate-plots-missing-nodes-and-labels/4119/7 "2022-12-19T16:10:12Z")

</div>

I uploaded my output folder here. Please check.

---

<div class="post-metadata">

**Author:** ![aitor.blancomiguez](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/aitor.blancomiguez/32/86_2.png) [@aitor.blancomiguez](https://forum.biobakery.org/u/aitor.blancomiguez)\
**Post date:** [December 19, 2022, 5:54pm UTC](https://forum.biobakery.org/t/visualization-with-graphlan-not-generating-appropriate-plots-missing-nodes-and-labels/4119/8 "2022-12-19T17:54:09Z")

</div>

Hi @arjun_kothari  
Try to include ` --string_to_remove .fastq.gz` in the execution of add\_metadata\_tree.py
