Hey there,
I have been working with the Humann2 pipeline and using this output together with the Phyloseq package to create a visualization of my data.
I’ve noticed some differences in the relative abundance table from the Humann2 pipeline compared to the relative abundance table I have made with Microbiome (converted the absolute counts OTU table from Humann2 with Microbiome (R-package) into relative abundance OTU table).
Down below you can see some plots I made with the 2 different relative abundance files.
I am curious how these differences are generated, I don’t have experience in Phyton so I was hoping you guys could help me out. This is how the relative abundance is generated with Microbiome:
if (transform == "compositional") {
# Minor constant 1e-32 is compared to zero to avoid zero
# division. Essentially zero counts will then remain zero
# and otherwise this wont have any effect.
xt <- apply(x, 2, function(x) {
x/max(sum(x), 1e-32)
})
From: microbiome/transform.R at master · microbiome/microbiome · GitHub
Basically the function to get the relative abundance is dividing every OTU count with the sum of all the OTU’s together . Does this differ in any way compared to the method of MetaPhlAn?