No associations/results from large dataset; multiple warnings produced

Hi there, I have successfully run MaAsLin on a dataset of 408 human microbiome samples using the attached metadata file and feature table. Currently I’m looking at just 1 variable in the metadata file (“source”) and I have set a reference for this variable. As you can see below, the code works but then I receive a message that there are no associations to plot. I find this hard to believe, and wonder if the problem stems from the warnings that I receive (see below).

Any advice? I’m not sure if there is something going on with my dataset, or perhaps a different parameter to tweak in the code?

Many thanks,
Melissa

taxa = read.delim(“maaslin_feature_table2_trimzero_a.txt”, sep = “\t”, row.names = 1)
taxa = data.frame(t(taxa), check.names = F)

meta = read.delim(“maaslin_metadata_merged_T2a_source.txt”, sep = “\t”, row.names = 1)
meta = data.frame(t(meta), check.names = F)

fit_data = Maaslin2(taxa, meta, “my_output”, transform = “AST”,
fixed_effects = c(‘source’),
reference = c(‘source,infant’),
normalization = “NONE”,
standardize = F,
min_prevalence = 0.1,
min_abundance = 0.001)

#It seems to run alright, but then I receive the message:

[1] “There are no associations to plot!”
There were 50 or more warnings (use warnings() to see the first 50)

#If I check on the warnings, I see this:

warnings()
Warning messages:
1: In asin(sqrt(abs(x))) : NaNs produced
2: In asin(sqrt(abs(x))) : NaNs produced
3: In asin(sqrt(abs(x))) : NaNs produced
4: In asin(sqrt(abs(x))) : NaNs produced
5: In asin(sqrt(abs(x))) : NaNs produced
6: In asin(sqrt(abs(x))) : NaNs produced
7: In asin(sqrt(abs(x))) : NaNs produced
8: In asin(sqrt(abs(x))) : NaNs produced
9: In asin(sqrt(abs(x))) : NaNs produced
10: In asin(sqrt(abs(x))) : NaNs produced
11: In asin(sqrt(abs(x))) : NaNs produced
12: In asin(sqrt(abs(x))) : NaNs produced
13: In asin(sqrt(abs(x))) : NaNs produced
14: In asin(sqrt(abs(x))) : NaNs produced
15: In asin(sqrt(abs(x))) : NaNs produced
16: In asin(sqrt(abs(x))) : NaNs produced
17: In asin(sqrt(abs(x))) : NaNs produced
18: In asin(sqrt(abs(x))) : NaNs produced
19: In asin(sqrt(abs(x))) : NaNs produced
20: In asin(sqrt(abs(x))) : NaNs produced
21: In asin(sqrt(abs(x))) : NaNs produced
22: In asin(sqrt(abs(x))) : NaNs produced
23: In asin(sqrt(abs(x))) : NaNs produced
24: In asin(sqrt(abs(x))) : NaNs produced
25: In asin(sqrt(abs(x))) : NaNs produced
26: In asin(sqrt(abs(x))) : NaNs produced
27: In asin(sqrt(abs(x))) : NaNs produced
28: In asin(sqrt(abs(x))) : NaNs produced
29: In asin(sqrt(abs(x))) : NaNs produced
30: In asin(sqrt(abs(x))) : NaNs produced
31: In asin(sqrt(abs(x))) : NaNs produced
32: In asin(sqrt(abs(x))) : NaNs produced
33: In asin(sqrt(abs(x))) : NaNs produced
34: In asin(sqrt(abs(x))) : NaNs produced
35: In asin(sqrt(abs(x))) : NaNs produced
36: In asin(sqrt(abs(x))) : NaNs produced
37: In asin(sqrt(abs(x))) : NaNs produced
38: In asin(sqrt(abs(x))) : NaNs produced
39: In asin(sqrt(abs(x))) : NaNs produced
40: In asin(sqrt(abs(x))) : NaNs produced
41: In asin(sqrt(abs(x))) : NaNs produced
42: In asin(sqrt(abs(x))) : NaNs produced
43: In asin(sqrt(abs(x))) : NaNs produced
44: In asin(sqrt(abs(x))) : NaNs produced
45: In asin(sqrt(abs(x))) : NaNs produced
46: In asin(sqrt(abs(x))) : NaNs produced
47: In asin(sqrt(abs(x))) : NaNs produced
48: In asin(sqrt(abs(x))) : NaNs produced
49: In asin(sqrt(abs(x))) : NaNs produced
50: In asin(sqrt(abs(x))) : NaNs produced
maaslin_metadata_merged_T2a_source.txt (6.7 KB)
maaslin_feature_table2_trimzero_a.txt (55.1 KB)

Hi @mmanus,

Thanks for the question. I believe what is happening here is that for the function asin(sqrt(abs(x))) the underlying data needs to be between 0 and 1 (well really -1 and 1) but proportional data is required for this to work. It looks like your current feature table is count based data. To get this to run without the warning and to get significant results you can simply get rid of the normalization = "NONE" flag. Alternatively, you could choose a transformation method that works with count data see the tutorial for more information.

I hope this helps!
Best,
Kelsey

Thank you, @Kelsey_Thompson this is very helpful! I’ve tried running it again with different combinations of transformation and normalization methods. It seems to work, except I’m not sure if the resulting plots should show transformed data on the y-axis. I had assumed so, but maybe I’m wrong about that if the input is still count data?

For example, this code yields box plots with a y-axis that still seems like count data (ranging from 0 - 10,000 on some plots):

fit_data = Maaslin2(taxa, meta, “my_output_infants2”, analysis_method = “LM”, transform = “AST”,
fixed_effects = c(‘bodysite’),
reference = c(‘bodysite,AP’),
standardize = F,
normalization = “TSS”,
min_prevalence = 0.1,
min_abundance = 0.001)

Thanks!

Hi @mmanus,

MaAsLin plots the raw data, not the transformed data. For the next iterations of MaAsLin, we have been discussing ways to improve this functionality. However, for now, it is the raw count data you supplied. It should be relatively easy to replicate the plots in ggplot2 after normalizing using something like phyloseq or pulling the codes out of MaAsLin’s code to transform/normalize the data.

I hope this helps!
Best,
Kelsey