Pre-Trained and Predicted MelonnPan with paired 16S and KO (PICRUST2)

Hello,

I am trying to run MelonnPan Predict on my previous trained model, however I have encountered some problem as I intend to explain below.

  1. First , I have paired 16S RNA data (out) with KO data (from PICRUST), with this two datasets I normalized and filtered my metag and metab inputs before running MelonnPan_Train command as indicated below.

melonnpan::melonnpan.train(metab= “C:/Users/Sandra.Diaz/Desktop/MelonnPan/metag_input2.csv”, metag = “C:/Users/Sandra.Diaz/Desktop/MelonnPan/metab_input2.csv”, outputDirectory = “C:/Users/Sandra.Diaz/Desktop/MelonnPan/”)

  1. Once my data is trained, I run MelonnPan predict, by using the three inputs needed as indicated in the command below.

mp.predict ← melonnpan.predict(metag=(“C:/Users/Sandra.Diaz/Desktop/Example2/metag_inputE.coli2.csv”), weight.matrix=(“C:/Users/Sandra.Diaz/Desktop/Example2/MelonnPan_Trained_Weights.csv”), train.metag=(“C:/Users/Sandra.Diaz/Desktop/Example2/metag_input2.csv”) , criticalpoint = 0.9793, corr.method=“pearson”, output= “C:/Users/Sandra.Diaz/Desktop/Example2/”)

However I am getting this error:

Error in ztransform(formula, data, family) :
formula argument must be a formula or one of (numeric, integer, double)
Además: Warning message:
In data.table::fread(Input, header = FALSE) :
Stopped early on line 3. Expected 2040 fields but found 2063. Consider fill=TRUE and comment.char=. First discarded non-empty line: <<otu_001,0,0,0,0,0,0,0,0,-2,93E+09,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-4,

I checked all the data sets and filter them again in case that was the issue however I cannot find what is going on, I am probably missing something in the workflow, so I would appreciate any kind of advice with it.

Thanks a lot,

Sandra

Hi @sdsan - it looks like you are getting the error from the ztransform function which means you have columns in your metag table with less than two unique values. Could you please make sure you remove those features before running the prediction algorithm? Many thanks!

Hi Himel,

Thanks for your quick response. I got that same error using MelonnPan Training, so I previously filtered those features with less than two unique values, however I will re-check the input data just in case I did something wrong filtering.

Thanks again,

Regards,

Sandra

Hi Sandra - since you are not seeing this error during training, I am assuming that your training data (metag) possibly has no issues. Please make sure your test metag data is also filtered the same way.

Best,
Himel

Thanks for the quick response, finally it worked!

Thanks again,

Sandra