Function that apply on of the surrogates models to the NH-metabolomics concentrations
apply.fit_surro(mat, FIT, post =TRUE)
Arguments
mat: numeric data-frame with Nightingale-metabolomics
FIT: The betas of the logistic regressions composing the surrogates by Bizzarri et al.
post: logical to obtain posterior probabilities
Returns
numeric data.frame with the metabolomics-based surrogates by Bizzarri et al.
Details
Bizzarri et al. built multivariate models,using 56 metabolic features quantified by Nightingale, to predict the 19 binary characteristics of an individual. The binary variables are: sex, diabetes status, metabolic syndrome status, lipid medication usage, blood pressure lowering medication, current smoking, alcohol consumption, high age, middle age, low age, high hsCRP, high triglycerides, high ldl cholesterol, high total cholesterol, low hdl cholesterol, low eGFR, low white blood cells, low hemoglobin levels.
Examples
## Not run:library(MiMIR)#load the Nightignale metabolomics datasetmetabolic_measures <- read.csv("Nightingale_file_path",header =TRUE, row.names =1)# Do the pre-processing steps to the metabolic measuresmetabolic_measures<-QCprep_surrogates(as.matrix(metabolic_measures), Nmax_miss=1,Nmax_zero=1)#load the phenotypic datasetphenotypes <- read.csv("phenotypes_file_path",header =TRUE, row.names =1)#Calculating the binarized surrogatesbin_pheno<-binarize_all_pheno(phenotypes)#Apply the surrogate modelssurrogates<-foreach::foreach(i=MiMIR::phenotypes_names$out_surro, .combine="cbind")%do%{pred<-apply.fit_surro(as.matrix(metabo_measures),PARAM_surrogates$models_betas[i,])}## End(Not run)
References
This function was made to vidualize the binarized variables calculated following the rules indicated in the article: Bizzarri,D. et al. (2022) 1H-NMR metabolomics-based surrogates to impute common clinical risk factors and endpoints. EBioMedicine, 75, 103764, doi:10.1016/j.ebiom.2021.103764