Feature transformation

After filtering species on abundance criterion, we will now transform the data using a log-transformation. We will use the same transformational function that is used in Zeller et al. (2014). The transformational function is given in Equation eq-trans.

\[ log_{10}(x + x_0) \tag{1}\]

Here

\(x\) is a relative abundance value

\(x_0\) is a small constant (1e-6)

We will apply this transformation on filtered species. The code below perform that step.

import numpy as np

# log transformation
microbiome_log = microbiome_filtered.applymap(lambda x: np.log10(x+.000001))

References

Zeller, Georg, Julien Tap, Anita Y Voigt, Shinichi Sunagawa, Jens Roat Kultima, Paul I Costea, Aurélien Amiot, et al. 2014. “Potential of Fecal Microbiota for Early-Stage Detection of Colorectal Cancer.” Molecular Systems Biology 10 (11): 766.