The bioBakery help forum

Maaslin2 heatmap

Hi,

I am using maaslin2 to find which pathways or genes (Humann2 output) is more present in a specific treatment (yes/no cat). I took into account potential “batch effect” (structured dataset where for example sample A2 and A3 were treated but come from sample A1 no treated).

I am using R and I don’t have any heatmap produced. I also have warnings:
warnings()
Warning messages:
1: In checkConv(attr(opt, “derivs”), opt$par, ctrl = control$checkConv, … :
Model failed to converge with max|grad| = 0.281644 (tol = 0.002, component 1)
2: In checkConv(attr(opt, “derivs”), opt$par, ctrl = control$checkConv, … :
Model is nearly unidentifiable: very large eigenvalue

  • Rescale variables?
    3: In as_lmerModLT(model, devfun) :
    Model may not have converged with 1 eigenvalue close to zero: 1.3e-10
    4: In checkConv(attr(opt, “derivs”), opt$par, ctrl = control$checkConv, … :
    Model failed to converge with max|grad| = 0.345645 (tol = 0.002, component 1)
    5: In checkConv(attr(opt, “derivs”), opt$par, ctrl = control$checkConv, … :
    Model is nearly unidentifiable: very large eigenvalue
  • Rescale variables?

The command I used is the following one:
resMAS<-Maaslin2(count_phy_path, metadata, “maaslin2_path”,
normalization = “NONE”,transform = “LOG”, fixed_effects=“Fermentor”, random_effects = “Subgroup”,
min_abundance = 0,
min_prevalence = 0,plot_heatmap = TRUE)

I probably did something wrong but would be happy to get your feedback.

Thanks!

Hi there,

The heatmap will not be generated if you only use one fixed effect while using the model. The default is set to only produce the comparative heatmap when more than one variable is available to be compared. From looking at your code, it looks like you only called one fixed effect. You can always pull the significant features feature table into R or similar software and plot the values as a heatmap.

I believe, the errors look pretty normal for features that are low abundance, and therefore it fails to converge, but I would have to look at the data to be sure.

I hope this helps!

Best, Kelsey