apply_hub_corrections: Apply hub corrections to the weighted integrated...

View source: R/construct_ligand_to_target.R

apply_hub_correctionsR Documentation

Apply hub corrections to the weighted integrated ligand-signaling and gene regulatory network

Description

apply_hub_corrections downweighs the importance of nodes with a lot of incoming links in the ligand-signaling and/or gene regulatory network. Hub correction method according to following equation: Wcor =W * D^-h with D the indegree matrix of the respective network and h the correction factor.

Usage

apply_hub_corrections(weighted_networks, lr_sig_hub, gr_hub)

Arguments

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)

lr_sig_hub

a number between 0 and 1. 0: no correction for hubiness; 1: maximal correction for hubiness.

gr_hub

a number between 0 and 1. 0: no correction for hubiness; 1: maximal correction for hubiness.

Value

A list containing 2 elements (lr_sig and gr): the hubiness-corrected integrated weighted ligand-signaling and gene regulatory networks in data frame / tibble format with columns: from, to, weight.

Examples

## Not run: 
weighted_networks = construct_weighted_networks(lr_network, sig_network, gr_network,source_weights_df)
wn = apply_hub_corrections(weighted_networks, lr_sig_hub= 0.5, gr_hub= 0.5)

## End(Not run)

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