prepare_metabolomics_data {cosmosR}R Documentation

format COSMOS metabolic input

Description

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.

Usage

prepare_metabolomics_data(metabolic_data, meta_network)

Arguments

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 data(meta_network).

Value

A new vector ready to be used as COSMOS input.

Examples


# 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)

[Package cosmosR version 1.0.1 Index]