assess_influence_source: Assess the influence of an individual data source on...

View source: R/characterization_data_sources.R

assess_influence_sourceR Documentation

Assess the influence of an individual data source on ligand-target probability scores

Description

assess_influence_source will assess the influence of an individual data source on ligand-target probability scores (or rankings of these). Possible output: the ligand-target matrices of the complete model vs the leave-one-out model in which the data source of interest was left out; or a list indicating which target genes for every ligand of interest are affected the most by leaving out the data source of interest.

Usage

assess_influence_source(source, lr_network, sig_network, gr_network, source_weights_df, ligands, rankings = FALSE, matrix_output = FALSE,  secondary_targets = FALSE, remove_direct_links = "no", ...)

Arguments

source

Name of the data source that will be left out to assess its influence.

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)

source_weights_df

A data frame / tibble containing the weights associated to each individual data source. Sources with higher weights will contribute more to the final model performance (required columns: source, weight). Note that only interactions described by sources included here, will be retained during model construction.

ligands

List of ligands for which the model should be constructed

rankings

Indicate whether the output of the models should be the ranking of target gene probability scores (TRUE; top target gene rank = 1) or the scores themselves (FALSE). Default: FALSE.

matrix_output

Indicate whether the output should be the 2 ligand-target matrices (complete model and leave-one-out model) (TRUE) or a listing of genes of which the ligand-target scores/rankings were influenced the most (FALSE). Default: 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"

...

Argumentes for the function add_hyperparameters_parameter_settings

Value

If matrix_output == TRUE: A list of sublists; every sublist contains the elements $model_name and $model: the constructed ligand-target matrix. If matrix_output == FALSE: A list of sublist: every sublist contains; $ligand: name of the ligand tested; $targets_higher: sorted vector of ligand-target scores or rankings of target that score higher in the complete model compared to the leave-one-out model; targets_lower: sorted vector of ligand-target scores or rankings of target that score lower in the complete model compared to the leave-one-out model.

Examples

## Not run: 
ligands =  extract_ligands_from_settings(expression_settings_validation[1:4])
output = assess_influence_source("ontogenet", lr_network,sig_network, gr_network, source_weights_df, ligands,lr_sig_hub = 0.25,gr_hub = 0.5,ltf_cutoff = 0,algorithm = "PPR",damping_factor = 0.8,correct_topology = TRUE)

## End(Not run)

saeyslab/nichenetr documentation built on March 26, 2024, 9:22 a.m.