Get the predicted top n target genes of a ligand of interest
Source:R/use_ligand_to_target.R
extract_top_n_targets.Rdextract_top_n_targets Get the predicted top n target genes of a ligand of interest.
Arguments
- ligand_oi
The ligand of interest of which top target genes should be returned
- top_n
A number between 0 and the total nr of target genes indicating which top n of target genes should be returned.
- ligand_target_matrix
A matrix of ligand-target probabilty scores.
- ligands_position
Indicate whether the ligands in the ligand-target matrix are in the rows ("rows") or columns ("cols"). Default: "cols"
Examples
if (FALSE) { # \dontrun{
## 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, lr_network, ligands)
targets <- extract_top_n_targets("BMP2", 50, ligand_target_matrix)
} # }