Sys.getenv("PATH") knitr::opts_knit$set(root.dir = "/Users/rioualen/Desktop/NetworkEval/") knitr::opts_chunk$set(echo=FALSE, include=TRUE, warning=FALSE, message=FALSE, results = 'asis') library(kableExtra) library(EcoliGenes)
This report is generated by the NetworkEval
R package. Its purpose is to evaluate the accuracy of a set of predicted TF-gene interactions, by comparing them against a set of positive and negative regulatory interactions (RIs) generated using various strategies.
r my_eval@pred_set@id
# cat(paste0("Evaluated set: ", pred_set_id)) table <- data.frame(RIs = get_ris_n(my_eval@pred_set) + nrow(my_eval@out_ris), TFs = get_tfs_n(my_eval@pred_set) + length(my_eval@out_tfs)) kable(table, digits=2, format.args = list(big.mark = ',')) %>% kable_styling(full_width = F, font_size = 20) # cat("<b>List of TFs: </b>") # cat(paste0((get_tfs(my_eval@pred_set)), collapse = ", "))
Evaluated TFs
In order to evaluate TF-gene predicted interactions, we first select the TFs for which we have controls available. The following TFs will thus be evaluated:
# tfs_in <- sapply(get_tfs_eval(my_eval), FUN=function(x){gene_list_by_bnum[[x]]$GENE_NAME[1]}) tfs_in <- EcoliGenes::bnumber_to_symbol(get_tfs_eval(my_eval)) cat(paste0((sort(tfs_in)), collapse = ", ")) cat(paste0("\n\n* Total: ", length(tfs_in)))
Discarded TFs
The following TFs were discarded, for there is no control available to evaluate their interactions:
tfs_out <- my_eval@out_tfs # tfs_out <- sapply(tfs_out, FUN=function(x){gene_list_by_bnum[[x]]$GENE_NAME[1]}) tfs_out <- EcoliGenes::bnumber_to_symbol(tfs_out) if (length(tfs_out) != 0) { cat(paste0((sort(tfs_out)), collapse = ", ")) } cat(paste0("\n\n* Total: ", length(tfs_out)))
The interactions involving those TFs are also discarded of the evaluation.
r nrow(my_eval@out_ris)
kable(summarize(my_eval@pred_set), digits=2, format.args = list(big.mark = ',')) %>% kable_styling(full_width = F, font_size = 20) # cat("<b>List of TFs: </b>") # cat(paste0((get_tfs(my_eval@pred_set)), collapse = ", "))
kable(summarize_stats(my_eval), digits=3, format.args = list(big.mark = ',')) %>% kable_styling(full_width = F, font_size = 20)
kable(generate_confusion_matrix(my_eval), digits=2, format.args = list(big.mark = ',')) %>% kable_styling(full_width = F, font_size = 20)
Only interactions that present in either the positive set or the negative set can be labeled. The other interactions are not displayed
Number of interactions not displayed: r get_ris_n(outer_set(my_eval))
Proportion of the evaluated set: r round(get_ris_n(outer_set(my_eval))/get_ris_n(my_eval@pred_set)*100, 1)
%
generate_venn_diagram(my_eval, style=1, universe=FALSE) generate_venn_diagram(my_eval, style=2, universe=FALSE)
generate_venn_diagram(my_eval, style=1, universe=TRUE) generate_venn_diagram(my_eval, style=2, universe=TRUE)
if (length(my_eval@pred_set@scores) >= 1) { cat(paste0("\n\n## ROC curves\n")) cat(paste0("\n\nNB: curve based on ", round(get_ris_n(inner_set(my_eval))/get_ris_n(my_eval@pred_set)*100, 1), "% of the data.\n\n")) roc <- generate_roc_curve(my_eval) plot(roc$curve) kable(roc$auc, digits=3, format.args = list(big.mark = ',')) %>% kable_styling(full_width = F, font_size = 12, bootstrap_options = c("striped", "hover")) } if (length(my_eval@pred_set@scores) >= 1) { cat(paste0("\n\n## ROC curves -- shuffled scores\n")) shuffled_eval <- shuffle_scores(my_eval) roc <- generate_roc_curve(shuffled_eval) plot(roc$curve) #kable(roc$auc, digits=3, format.args = list(big.mark = ',')) %>% kable_styling(full_width = F, font_size = 12, bootstrap_options = c("striped", "hover")) }
kable(summarize(my_eval@pos_set), digits=2, format.args = list(big.mark = ',')) %>% kable_styling(full_width = F, font_size = 20) # cat("<b>List of TFs: </b>") # cat(paste0((get_tfs(my_eval@pos_set)), collapse = ", "))
kable(summarize(my_eval@neg_set), digits=2, format.args = list(big.mark = ',')) %>% kable_styling(full_width = F, font_size = 20) # cat("<b>List of TFs: </b>") # cat(paste0((get_tfs(my_eval@neg_set)), collapse = ", "))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.