Construct and evaluate a ligand-target model given input parameters (for application purposes).
Source:R/characterization_data_sources.R
evaluate_model_application.Rdevaluate_model_application will take as input a setting of parameters (data source weights and hyperparameters) and layer-specific networks to construct a ligand-target matrix and evaluate its performance on input application settings (only target gene prediction).
Usage
evaluate_model_application(parameters_setting, lr_network, sig_network, gr_network, settings, 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_characterizationandadd_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)
- settings
A list of lists for which each sub-list contains the following elements: .$name: name of the setting; .$from: name(s) of the ligand(s) active in the setting of interest; .$response: named logical vector indicating whether a target is a TRUE target of the possibly active ligand(s) or a FALSE.
- 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
- remove_direct_links
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"
- ...
Additional arguments to
make_discrete_ligand_target_matrix.
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)
output_characterization <- parallel::mclapply(weights_settings_loi[1:3], evaluate_model_application, lr_network, sig_network, gr_network, settings, mc.cores = 3)
} # }