View source: R/application_network_extraction.R
get_active_ligand_target_matrix | R Documentation |
get_active_ligand_target_matrix
Get active ligand-target matrix, meaning that only target genes part of the response of interest will be kept as target genes in the input ligand-target matrix.
get_active_ligand_target_matrix(response,ligand_target_matrix, ligands_position = "cols")
response |
A named logical vector indicating whether a gene is responding in a biological system or not (e.g. DE after cell-cell interaction) |
ligand_target_matrix |
A matrix of ligand-target probabilty scores (or discrete target assignments). |
ligands_position |
Indicate whether the ligands in the ligand-target matrix are in the rows ("rows") or columns ("cols"). Default: "cols" |
A matrix with ligand-target probability scores (or discrete ligand-target assignments) for the active target genes in the system of interest.
## Not run:
library(dplyr)
weighted_networks = construct_weighted_networks(lr_network, sig_network, gr_network, source_weights_df)
setting = lapply(expression_settings_validation[1:2],convert_expression_settings_evaluation)
ligands = extract_ligands_from_settings(setting)
ligand_target_matrix = construct_ligand_target_matrix(weighted_networks, ligands)
active_lt = get_active_ligand_target_matrix(setting[[1]] %>% .$response, ligand_target_matrix)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.