Find which genes were among the top-predicted targets genes in a specific cross-validation round and see whether these genes belong to the gene set of interest as well.
Source:R/application_prediction.R
get_top_predicted_genes.Rdget_top_predicted_genes Find which genes were among the top-predicted targets genes in a specific cross-validation round and see whether these genes belong to the gene set of interest as well.
Arguments
- round
Integer describing which fold of the cross-validation scheme it is.
- gene_prediction_list
List with per round of cross-validation: a tibble with columns "gene", "prediction" and "response" (e.g. output of function `assess_rf_class_probabilities`)
- quantile_cutoff
Quantile of which genes should be considered as top-predicted targets. Default: 0.95, thus considering the top 5 percent predicted genes as predicted targets.
Value
A tibble indicating for every gene whether it belongs to the geneset and whether it belongs to the top-predicted genes in a specific cross-validation round.
Examples
if (FALSE) { # \dontrun{
weighted_networks <- construct_weighted_networks(lr_network, sig_network, gr_network, source_weights_df)
ligands <- list("TNF", "BMP2", "IL4")
ligand_target_matrix <- construct_ligand_target_matrix(weighted_networks, lr_network, ligands, ltf_cutoff = 0, algorithm = "PPR", damping_factor = 0.5, secondary_targets = FALSE)
potential_ligands <- c("TNF", "BMP2", "IL4")
geneset <- c("SOCS2", "SOCS3", "IRF1")
background_expressed_genes <- c("SOCS2", "SOCS3", "IRF1", "ICAM1", "ID1", "ID2", "ID3")
gene_predictions_list <- seq(2) %>% lapply(assess_rf_class_probabilities, 2, geneset = geneset, background_expressed_genes = background_expressed_genes, ligands_oi = potential_ligands, ligand_target_matrix = ligand_target_matrix)
seq(length(gene_predictions_list)) %>% lapply(get_top_predicted_genes, gene_predictions_list)
} # }