`r paste0('Your report from GeneTonic - ', project_id)`

knitr::opts_chunk$set(
  echo = TRUE, 
  warning = FALSE, 
  message = FALSE,
  error = TRUE
)
# knitr::opts_knit$set(
#   progress = FALSE, 
#   verbose = FALSE
# )

Intro

ideas:

These are the provided objects

library(GeneTonic)
dds
res_de
head(res_enrich)
head(annotation_obj)
res_enrich <- get_aggrscores(res_enrich, res_de, annotation_obj)
# if (exists("reactive_values$mygenesets")) {
#   selected_genesets <- reactive_values$mygenesets
# } else {
#   selected_genesets <- mygenesets
# }
# 
# if (exists("reactive_values$mygenes")) {
#   selected_genes <- reactive_values$mygenes
# } else {
#   selected_genes <- mygenes
# }

if (usage_mode == "shiny_mode") {
  selected_genesets <- reactive_values$mygenesets
  selected_genes <- reactive_values$mygenes
} else if (usage_mode == "batch_mode"){
  selected_genesets <- mygenesets
  selected_genes <- mygenes
}

selected_genesets
selected_genes
# myids <- annotation_obj$gene_id[match(selected_genes ,annotation_obj$gene_name)]
myids <- selected_genes
lapply(myids, function(arg) {
  GeneTonic::gene_plot(dds,gene = arg,intgroup = "condition", 
                       annotation_obj = annotation_obj)})

Something for the selected genesets

# corresponding_gs_ids <- res_enrich$gs_id[res_enrich$gs_description %in% selected_genesets]
corresponding_gs_ids <- selected_genesets

gs_mds(res_enrich, res_de, annotation_obj, gs_labels = corresponding_gs_ids)

gs_volcano(res_enrich, volcano_labels = corresponding_gs_ids)

Geneset content, tabbed! {.tabset .tabset-fade}

Here is a heatmap for each bookmarked set

vst_data <- DESeq2::vst(dds) # or also have it passed as param

for (gs in selected_genesets) {
  corresponding_gs_desc <- res_enrich[gs, "gs_description"]
  cat("## ", corresponding_gs_desc, " {-}\n")

  gs_heatmap(vst_data, 
             res_de, 
             res_enrich, 
             annotation_obj, 
             geneset_id = gs, 
             cluster_columns = TRUE)

  cat(go_2_html(gs, res_enrich))
  cat("\n\n")
}

Session info {-}

sessionInfo()


Try the GeneTonic package in your browser

Any scripts or data that you put into this service are public.

GeneTonic documentation built on Nov. 8, 2020, 5:27 p.m.