Maaslin2 correlation plot doesn't match data

I’m using maaslin2 v1.8.0 and am a bit confused with the scatterplots that are output. I am comparing 16S relative abundance data with a continuous variable, and for a particular species, if I just plot the relative abundances with the variable, there is a clear positive correlation.

However, after running maaslin2 without normalization or transformation, setting the variable as the fixed effect and no random effects, and using either the LM or CPLM methods, the scatterplot appears quite different, with a slightly negative, non-significant correlation. I have tried to upload png images of the plots, but am getting an error.

Should I assume my data is getting mixed up at some step, or is there a possible explanation for this behaviour? I’ve tried looking at the “fitted” dataframe, but I’m not sure how to relate it to my original data. Any help is appreciated.

Thanks,

Dion

Hi @dlepp,

That is an odd issue. Maaslin does a number of checks to insure that data is not mixed up when its input into the main function so I don’t think that this could be the case. If you wanted to dig into the data deeper you could set -j TRUE flag and inspect the output models for your variable of interest to see if something odd is going on. Although it’s hard to tell without seeing the graphs here.

Cheers,
Jacob Nearing

Hi Jacob,

Apologies for the very slow response - I’ve attached plots of the raw data (species abundance vs variable) and the maaslin results.

I’m not sure where to set the -j flag, can you please explain?


Thanks!

Hi @dlepp,

Those are indeed very large differences between the two plots… I’m assuming in both cases the Y axis is proportional abundance?

Sorry about the confusion on the -j flag. That is for if you are calling maaslin2 from the command line. If you are calling it within R you can save the models using save_models parameter and setting it to TRUE.

You can then load up the .RDS file it saves as described here: GitHub - biobakery/Maaslin2: MaAsLin2: Microbiome Multivariate Association with Linear Models

Once loaded look at the model associated with the taxon of interest and check out if the metadata coefficient is going in the direction you expect.

Cheers,
Jacob