View source: R/construct_ligand_to_target.R
add_new_datasource | R Documentation |
add_new_datasource
adds a new data source to one of the ligand-receptor, signaling and gene regulatory data sources.
add_new_datasource(new_source, network, new_weight,source_weights_df)
new_source |
A data frame / tibble containing novel interactions of the ligand-receptor, signaling or gene regulatory layer (required columns: from, to, source) |
network |
NULL or a data frame / tibble containing the base network to which you want to add the new data source (required columns: from, to, source) |
new_weight |
a weight value between 0 and 1 to assign to your new data source |
source_weights_df |
A data frame / tibble containing the weights associated to each already included individual data source (required columns: source, weight). |
A list containing 2 elements (network and source_weights_df): the updated network containing your data source and the updated source_weights_df containing the weight of the newly added data source.
## Not run:
## Update the lr_network with a new ligand-receptor data source
library(dplyr)
lr_toy = tibble(from = "A", to = "B", source = "toy")
new_lr_network = add_new_datasource(lr_toy, lr_network,1,source_weights_df)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.