Maaslin3 transformation and normaliazion fix

Dear Will and Jacob,

I need to run a maaslin3 using robust CLR instead of CLR only. I did my transformations beforehand and wanted to input my matrix using transform = “NONE” and normalization = “NONE”. But it results in an error saying the checks for these parameters are not yet supported. This can be reproduced using maaslin3 example and adding these two parameters to its call:

# Read features table
taxa_table_name <- system.file("extdata", "HMP2_taxonomy.tsv", package =
                                 "maaslin3")
taxa_table <- read.csv(taxa_table_name, sep = '\t', row.names = 1)

# Read metadata table
metadata_name <- system.file("extdata", "HMP2_metadata.tsv", package =
                               "maaslin3")
metadata <- read.csv(metadata_name, sep = '\t', row.names = 1)

metadata$diagnosis <-
  factor(metadata$diagnosis, levels = c('nonIBD', 'UC', 'CD'))
metadata$dysbiosis_state <-
  factor(metadata$dysbiosis_state, levels = c('none', 'dysbiosis_UC',
                                              'dysbiosis_CD'))
metadata$antibiotics <-
  factor(metadata$antibiotics, levels = c('No', 'Yes'))

#Run MaAsLin3
fit_out <- maaslin3::maaslin3(input_data = taxa_table,
                              input_metadata = metadata,
                              output = 'output',
                              formula = '~ diagnosis + dysbiosis_state +
                                antibiotics + age + reads',
                              plot_summary_plot = FALSE,
                              plot_associations = FALSE,
                              transform = "NONE", 
                              normalization = "NONE")
#> 2025-11-04 16:25:23.891101 INFO::Writing function arguments to log file
#> 2025-11-04 16:25:23.900789 INFO::Verifying options selected are valid
#> Warning in maaslin_check_arguments(feature_specific_covariate,
#> feature_specific_covariate_name, : Be sure the data can be TSS normalized when
#> using warn_prevalence without normalization=TSS
#> Error in maaslin_check_arguments(feature_specific_covariate, feature_specific_covariate_name, : warn_prevalence has only been validated with transform = LOG. To bypass this check, run the maaslin steps individually, skipping `maaslin_check_arguments`.

unlink('output', recursive=TRUE)
logging::logReset()

Created on 2025-11-04 with reprex v2.1.1 

I tweaked a few functions to bypass the checks, but it feels like it would be best to fix it on your end, to ensure regressions outputs are as expected if a user wants to pre-process the data themselves. What do you think?

Best
Giacomo

Hi,

If you run it with warn_prevalence=FALSE, it should work, no?

Also, the default median comparison strategy in MaAsLin 3 with TSS normalization and LOG transformation accounts for compositionality like CLR does but in a more interpretable way. We keep the CLR option for legacy support, but our evaluations showed that TSS + LOG with the median abundance comparison is both theoretically and empirically preferable.

Will