Error message in Maaslin3

I encountered this error message when running MaAsLin3:

Error in if (“linear” == model_name) { : argument is of length zero

This is based on humann output : cazyme gene families. I wanted to look at upregulated genes with a specific treatment, adjusted for batch, age, sex and BMI.

My strategy was to use CLR as my dataset had a lot of zero values in it.

Below is my code (some names modified):
fit_out ← maaslin3(input_data = cazy_gene_filt_t,
input_metadata = meta,
output = ‘cazy_min_abun_prev_0’,
fixed_effects = c(“treatment”, “group”, “age”, “sex_female”, “BMI”),
random_effects = c(“patient_ID”),
normalization = ‘CLR’,
reference = c(“treatment_arm,Placebo_arm”),
transform = ‘NONE’,
augment = TRUE,
standardize = TRUE,
max_significance = 0.1,
min_prevalence= 0.0,
min_abundance=0.0,
median_comparison_abundance = TRUE,
median_comparison_prevalence = FALSE,
warn_prevalence=FALSE,
max_pngs = 0,
cores = 1,
save_models = TRUE)

After running the code, I still get the outputs to my destination folder, and I also get the figures too. However I am not sure what the error is signalling?

Is there a way to fix this? Appreciate any comments as I am new to this! Thank you :slight_smile:

Hi Phoebe,

If you look at your significant results or all results files, do they have a model column?

Also, I know this wasn’t the main point, but I’d recommend using the standard linear + logistic models with log transform and TSS normalization rather than CLR, especially if your data has a lot of zeros. The logistic regression is specifically designed to model zeros vs non-zeros whereas the CLR just forces them all to an arbitrary value (potentially disrupting the rest of the modeling).

Will

1 Like

Hi Will,

Yes there is a model column, mostly showing prevalenceor abundance.

I will try running on log transform and TSS normalisation, thank you for the tip. :slight_smile: