View source: R/application_network_extraction.R
get_active_ligand_receptor_network | R Documentation |
get_active_ligand_receptor_network
Get active ligand-receptor network by looking for which ligands are expressed in a sender/signaling cell and which receptors are expressed in the receiver cell. Instead of looking at absolute expression, it is possible as well to extract a ligand-receptor network of differentially expressed ligands and receptors if a vector of log2 fold change values is used as input.
get_active_ligand_receptor_network(expression_sender, expression_receiver, lr_network, expression_cutoff_sender = 0, expression_cutoff_receiver = 0)
expression_sender |
A named numeric vector of gene expression levels (absolute or logfc) for the signaling cell that sends extracellular signals to the receiver cell |
expression_receiver |
A named numeric vector of gene expression levels (absolute or logfc) for the receiver cell that receives extracellular signals from the sender cell |
lr_network |
A data frame / tibble containing ligand-receptor interactions (required columns: from, to). Can be both unweighted and weighted. |
expression_cutoff_sender |
The cutoff on expression value for the sender cell: ligands will be considered active if their expression is higher than the cutoff. Default: 0. |
expression_cutoff_receiver |
The cutoff on expression value for the receiver cell: receptors will be considered active if their expression is higher than the cutoff. Default: 0. |
A data frame containing at least the variables from, to, sender_expression, receiver_expression. In this network, the active ligand-receptor interactions in the system of interest are shown.
## Not run:
library(dplyr)
expression_vector_sender = rnorm(n = 10000, mean = 6, sd = 3)
expression_vector_receiver = rnorm(n = 10000, mean = 6, sd = 3)
names(expression_vector_sender) = sample(x = geneinfo_human$symbol,size = 10000,replace = FALSE)
names(expression_vector_receiver) = sample(x = geneinfo_human$symbol,size = 10000,replace = FALSE)
weighted_lr_network = construct_weighted_networks(lr_network, sig_network, gr_network, source_weights_df, n_output_networks = 3) %>% .$lr
sender_cell_receiver_lr_network = get_active_ligand_receptor_network(expression_vector_sender,expression_vector_receiver,weighted_lr_network,expression_cutoff_sender = 4, expression_cutoff_receiver = 4)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.