correct_topology_ppr: Adapt a ligand-target probability matrix construced via PPR...

View source: R/construct_ligand_to_target.R

correct_topology_pprR Documentation

Adapt a ligand-target probability matrix construced via PPR by correcting for network topolgoy.

Description

correct_topology_ppr The ligand-target probability scores of a matrix constructed via personalized pagerank will be subtracted by target probability scores calculated via global pagerank; these latter scores can be considered as scores solely attributed to network topology and not by proximity to the ligand of interest. Recommended to use this function in combination with a ligand-target matrix constructed without applying a cutoff on the ligand-tf matrix.

Usage

correct_topology_ppr(ligand_target_matrix,weighted_networks,ligands_position = "cols")

Arguments

ligand_target_matrix

A matrix of ligand-target probabilty scores.

weighted_networks

A list of two elements: lr_sig: a data frame/ tibble containg weighted ligand-receptor and signaling interactions (from, to, weight); and gr: a data frame/tibble containng weighted gene regulatory interactions (from, to, weight)

ligands_position

Indicate whether the ligands in the ligand-target matrix are in the rows ("rows") or columns ("cols"). Default: "cols"

Value

A matrix containing ligand-target probability scores, after subtracting target scores solely due to network topology.

Examples

## Not run: 
## Generate the ligand-target matrix from loaded weighted_networks
weighted_networks = construct_weighted_networks(lr_network, sig_network, gr_network,source_weights_df)
ligands = list("TNF","BMP2",c("IL4","IL13"))
ligand_target_matrix = construct_ligand_target_matrix(weighted_networks, ligands, ltf_cutoff = 0, algorithm = "PPR", damping_factor = 0.5, secondary_targets = FALSE)
ligand_target_matrix = correct_topology_ppr(ligand_target_matrix,weighted_networks,ligands_position = "cols")

## End(Not run)

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