MMINP.predict {MMINP} | R Documentation |
Predict metabolites from new microbiome samples using MMINP model.
Description
This function aims to predict potentially metabolites in new microbial community using trained MMINP model. If genes in model are not appear in newdata, then this procedure will fill them up with 0. Note that this function does not center or scale the new microbiome matrixs, you would better do preprocessing on newdata in advance.
Usage
MMINP.predict(model, newdata, minGeneSize = 0.5)
Arguments
model |
List of class |
newdata |
New matrix of microbial genes, each column represents a gene. |
minGeneSize |
A numeric between 0-1, minimal size of genes in model contained in newdata. |
Details
The model must be class 'mminp' or 'o2m'. The column of newdata must be microbial genes.
Value
Predicted Data
Examples
data(MMINP_trained_model)
data(test_metag)
test_metag_preprocessed <- MMINP.preprocess(test_metag, normalized = FALSE)
pred_metab <- MMINP.predict(model = MMINP_trained_model$model,
newdata = test_metag_preprocessed)
[Package MMINP version 0.1.0 Index]