Normalization to fit bars on GraPhlAn generated cladogram
1
0
Entering edit mode
5.3 years ago
shibl_a ▴ 20

Hello,

I recently generated a cladogram on GraPhlAn from my Metaphlan2 output and wanted to add a ring displaying the relative abundances of each clade. I created a text file with this information according to the example (https://bitbucket.org/nsegata/graphlan/src/default/examples/guide/annot_3.txt). The issue is that my dataset (the 20 most abundant clades) is mainly dominated by one clade (83%, and the next most abundant is at 11% then 3% all the way down to 0.00173%) and therefore the image looks ridiculous (one giant bar from one place and the rest are basically invisible). My question is; what's the best way I can normalize these numbers so I get a reasonable range that would display the true abundances of the clades on the figure? any ideas?

THANKS!

metaphlan2 graphlan normalization cladogram • 1.3k views
ADD COMMENT
0
Entering edit mode
5.0 years ago

Hi, one way is to use the log1p from numpy (https://docs.scipy.org/doc/numpy/reference/generated/numpy.log1p.html) of the relative abundances, in your case:

>>> np.log1p(83)
4.430816798843313
>>> np.log1p(11)
2.4849066497880004
>>> np.log1p(3)
1.3862943611198906
>>> np.log1p(0.00173)
0.001728505273669399
ADD COMMENT

Login before adding your answer.

Traffic: 2537 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6