prepare_metabolomics_data {cosmosR} | R Documentation |
This function prepares the metabolic data to be used in the COSMOS optimization steps. It takes as input a vector with the metabolic data (e.g, limma t values) named with PUBCHEM IDs and expand it to the multi-compartment COSMOS format. It also messages the number of final inputs in the meta network.
prepare_metabolomics_data(metabolic_data, meta_network)
metabolic_data |
A named numeric vector, containing the values to be used for the metabolic layer in COSMOS. The names of the vector should be PUBCHEM IDs. |
meta_network |
Prior knowledge network
created with |
A new vector ready to be used as COSMOS input.
# generate random t-values: t_values <- rnorm(10) # assign to metabolites with pubchem names data(metabolite_to_pubchem) metabolite_to_pubchem <- metabolite_to_pubchem names(t_values) <- metabolite_to_pubchem$pubchem[1:10] data(meta_network) prepare_metabolomics_data(t_values, meta_network)