Question: Normalization to fit bars on GraPhlAn generated cladogram
0
gravatar for shibl_a
8 months ago by
shibl_a20
shibl_a20 wrote:

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!

ADD COMMENTlink modified 4 months ago by francesco.asnicar0 • written 8 months ago by shibl_a20
0
gravatar for francesco.asnicar
4 months ago by
francesco.asnicar0 wrote:

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 COMMENTlink written 4 months ago by francesco.asnicar0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1958 users visited in the last hour