formats the network with readable names

format_COSMOS_res(
cosmos_res,
metab_mapping,
gene_mapping = "org.Hs.eg.db",
measured_nodes,
omnipath_ptm
)

Arguments

cosmos_res results of CARNIVAL run a named vector with pubchem cid as names and desired metabolite names as values. by default, use the 'org.Hs.eg.db' to map gene names. Can also be a named vector with entrez gene id as names and desired gene names as values. vector of nodes that are measured or inputs ptms database from OmnipathR

Value

list with network and attribute tables.

Examples

CARNIVAL_options <- cosmosR::default_CARNIVAL_options()
CARNIVAL_options\$solver <- "lpSolve"
data(toy_network)
data(toy_signaling_input)
data(toy_metabolic_input)
data(toy_RNA)
test_for <- preprocess_COSMOS_signaling_to_metabolism(meta_network = toy_network,
signaling_data = toy_signaling_input,
metabolic_data = toy_metabolic_input,
diff_expression_data = toy_RNA,
maximum_network_depth = 15,
remove_unexpressed_nodes = TRUE,
CARNIVAL_options = CARNIVAL_options
)
#> 'select()' returned 1:1 mapping between keys and columns#> 'select()' returned 1:many mapping between keys and columns#> [1] "COSMOS: all 2 signaling nodes from data were found in the meta PKN"
#> [1] "COSMOS: all 3 metabolic nodes from data were found in the meta PKN"
#> [1] "COSMOS: 4653 of the 15919 genes in expression data were found as transcription factor target"
#> [1] "COSMOS: 4653 of the 5303 transcription factor targets were found in expression data"
#> [1] "COSMOS: removing unexpressed nodes from PKN..."
#> [1] "COSMOS: 0 interactions removed"
#> [1] "COSMOS: removing nodes that are not reachable from inputs within 15 steps"
#> [1] "COSMOS: 10 from  19 interactions are removed from the PKN"
#> [1] "COSMOS: 1 input/measured nodes are not in PKN any more: XMetab__190___c____ and 0 more."
#> [1] "COSMOS: removing nodes that are not observable by measurements within 15 steps"
#> [1] "COSMOS: 0 from  9 interactions are removed from the PKN"
#> [1] "COSMOS:  1 interactions are removed from the PKN based on consistency check between TF activity and gene expression"
#> [1] "lpSolve does not scale well with large PKNs. This solver is mainly for testing purposes. To run COSMSO, we recommend using cplex, or cbc solvers."
#> [1] "lpSolve does not scale well with large PKNs. This solver is mainly for testing purposes. To run COSMSO, we recommend using cplex, or cbc solvers."#> Writing constraints...#> Solving LP problem...#>
#> ── Column specification ────────────────────────────────────────────────────────
#> cols(
#>   enter Problem = col_character()
#> )#> [1] "COSMOS:  0 interactions are removed from the PKN based on consistency check between TF activity and gene expression"#> COSMOS: The following signaling nodes are not found in the PKN and will be removed from input: X3725 and 0 more.#> [1] "COSMOS: all 2 metabolic nodes from data were found in the meta PKN"
#> [1] "COSMOS: 4653 of the 15919 genes in expression data were found as transcription factor target"
#> [1] "COSMOS: 4653 of the 5303 transcription factor targets were found in expression data"test_result_for <- run_COSMOS_signaling_to_metabolism(data = test_for,
CARNIVAL_options = CARNIVAL_options)
#> [1] "lpSolve does not scale well with large PKNs. This solver is mainly for testing purposes. To run COSMSO, we recommend using cplex, or cbc solvers."#> Input nodes should have values from {-1, 0, 1}. We discretize your input with sign().#> [1] "lpSolve does not scale well with large PKNs. This solver is mainly for testing purposes. To run COSMSO, we recommend using cplex, or cbc solvers."#> Writing constraints...#> Solving LP problem...#>
#> ── Column specification ────────────────────────────────────────────────────────
#> cols(
#>   enter Problem = col_character()
#> )data(metabolite_to_pubchem)
data(omnipath_ptm)
test_result_for <- format_COSMOS_res(test_result_for,
metab_mapping = metabolite_to_pubchem,
measured_nodes = unique(c(names(toy_metabolic_input),
names(toy_signaling_input))),
omnipath_ptm = omnipath_ptm)
#> 'select()' returned 1:1 mapping between keys and columns