The bioBakery help forum

Explanation and graphical representation of melonnpan.train output

Hi @himel.mallick, I have run melonnpan.train() for my data. I think I got some intriguing results running your melonnpan package melonnpan.train() function. Thank you very much. However, I need some help to present these data.

(1) For melonnpanMelonnPan_Trained_Weights.txt: This output file has intercept and bacterial sequence names in first column and metabolite names in the rest of the columns. I think the values of each cell indicate the Spearman coefficient of each compound with the sequence name of that row Am I correct?

(2) Could you please suggest or refer me to a tutorial on how to graphically represent this correlation? In one graph, I would like to show a scatter plot where the x-axis with sequence name (column name ID) and the y-axis with the metabolite names (rest of the columns). In another graph, I would like to show the correlation of my metabolite of interest (column name A) with the sequence names (column name ID).

(3) melonnpanMelonnPan_Training_Summary.txt: what does “model.size” values mean?

Thank you!

hi @saif - the weight matrix (as the name suggests) contains the model coefficients from the trained Melonnpan model and the model size indicates how many features actually contributed to the prediction (i.e. had non-zero weights).

Regarding (2), the usual way to visualize the results would be to plot the measured and predicted metabolite abundances in a scatter plot. We have a utility function in the package to do that ( which you can modify for your own use.

Hi @himel.mallick, Thanks for your nice explanation. Just to clear some of my confusion- I am interested in finding the correlation between my 16S amplicon sequencing and untargeted metabolomic data which were measured from the identical fecal samples. I would like to know which amplicon sequences are strongly correlated with a metabolite of my interest. I think some top model coefficient values of the weight matrix can be presented as a table to indicate a positive or negative correlation of the metabolite with the respective amplicon sequences. Am I correctly interpreting the weight matrix result?

Hi @saif - thanks for clarifying. We do not have a functionality to visualize the weight matrix (your interpretation is correct) yet but you can use existing R/Bioconductor packages like ComplexHeatmap or pheatmap to present it as a heatmap (among other options). Thanks!