Recreating maaslin2-generated graphs starting with raw data

Hi!

I need to edit the graphs generated in the maaslin2 output, so I am looking to recreate them myself, starting with my raw data. The processing parameters that I entered when I ran maaslin2 included TSS normalization and log transformation. I can find and copy the log transformation performed by maaslin2, but am running into issues finding a function to perform TSS normalization. Is there a function that you would recommend to perform TSS normalization given a count OTU table?

Thank you for your input!

Best,
Fran

You can find the source code for the TSS normalization method here. You can see it’s calling vegan::decostand() under the hood if you want to try using that directly.

Thank you for your reply!

Quick follow up to this question. I want to use the decostand function from the vegan package to normalize my 16S data using the TSS method. I followed the link @andrewGhazi provided.

The function is written as such: decostand(features_norm, method = “total”, MARGIN = 1, na.rm = TRUE)

I wanted to confirm that the format of my data (rows = Samples, columns = ASV’s) is correct for the above setting “MARGIN = 1”.

I read the description of the function, but I wasn’t 100% sure after reading it.

I know this isn’t a problem for MassLin2, as it checks the format of your data prior to running it.

Many thanks in advance.

Hi Mak,

I cannot remember the the expected format for this function, however the quickest way would be to check whether the columns or rows sum to 1 after calling the function.

Cheers,
Jacob

When I performed rowSums for my file, which has the format of rows = Samples, columns= ASV’s, the rowSums for each sample = 1. The colSums varied.

Hi @Mak0130,

After reading the documentation of the function found here: decostand: Standardization Methods for Community Ecology in vegan: Community Ecology Package

It looks like margin=1 does indeed normalize by rows and as such samples should be along rows in this case.

Cheers,
Jacob Nearing

Perfect! Thank you for confirming.