Skip to contents

construct_model will take as input a setting of parameters (data source weights and hyperparameters) and layer-specific networks to construct a ligand-target matrix.

Usage

construct_model(parameters_setting, lr_network, sig_network, gr_network, ligands, secondary_targets = FALSE, remove_direct_links = "no")

Arguments

parameters_setting

A list containing following elements: $model_name, $source_weights, $lr_sig_hub, $gr_hub, $ltf_cutoff, $algorithm, $damping_factor, $correct_topology. See prepare_settings_leave_one_in_characterization and add_hyperparameters_parameter_settings.

lr_network

A data frame / tibble containing ligand-receptor interactions (required columns: from, to, source)

sig_network

A data frame / tibble containing signaling interactions (required columns: from, to, source)

gr_network

A data frame / tibble containing gene regulatory interactions (required columns: from, to, source)

ligands

List of ligands for which the model should be constructed

secondary_targets

Indicate whether a ligand-target matrix should be returned that explicitly includes putative secondary targets of a ligand (by means of an additional matrix multiplication step considering primary targets as possible regulators). Default: FALSE

Indicate whether direct ligand-target and receptor-target links in the gene regulatory network should be kept or not. "no": keep links; "ligand": remove direct ligand-target links; "ligand-receptor": remove both direct ligand-target and receptor-target links. Default: "no"

Value

A list containing following elements: $model_name and $model.

Examples

if (FALSE) { # \dontrun{
library(dplyr)
settings <- lapply(expression_settings_validation[1:4], convert_expression_settings_evaluation)
weights_settings_loi <- prepare_settings_leave_one_in_characterization(lr_network, sig_network, gr_network, source_weights_df)
weights_settings_loi <- lapply(weights_settings_loi, add_hyperparameters_parameter_settings, lr_sig_hub = 0.25, gr_hub = 0.5, ltf_cutoff = 0, algorithm = "PPR", damping_factor = 0.8, correct_topology = TRUE)
doMC::registerDoMC(cores = 8)
ligands <- extract_ligands_from_settings(settings)
models_characterization <- parallel::mclapply(weights_settings_loi[1:3], construct_model, lr_network, sig_network, gr_network, ligands, mc.cores = 3)
} # }