From a96583d15a9990533fc51bbde90ceb02508c9952 Mon Sep 17 00:00:00 2001 From: Zhiao Shi Date: Mon, 21 Jan 2019 11:35:11 -0600 Subject: [PATCH] * cytoscape output * increase node size * provide option to hide labels * add node shape legend --- DESCRIPTION | 2 +- R/sumer.R | 41 +++++++++++++++++++++++------- R/utils.R | 4 +-- inst/assets/head.html | 58 +++++++++++++++++++++++++++++++++++-------- 4 files changed, 83 insertions(+), 22 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 6e1f3d8..73a6494 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: sumer Title: SUmmarizing Multiomics Enrichment analysis Results -Version: 1.0 +Version: 1.1 Authors@R: person("Zhiao", "Shi", email = "zhiao.shi@gmail.com", role = c("aut", "cre")) Description: Summarizes gene set and pathway enrichment analysis results from multiomics platforms with weighted set cover and affinity propagation clustering algorithms. It therefore reduces redundancy among enriched diff --git a/R/sumer.R b/R/sumer.R index d754339..acc8f9e 100644 --- a/R/sumer.R +++ b/R/sumer.R @@ -121,6 +121,13 @@ sumer <- function(config_file, output_dir, n_threads=4){ ap_data$genesetInfo <- genesetInfo ap_results <- affinityPropagation(ap_data) + platform_shape_icon <- c("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAMAAAAM7l6QAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAALFQTFRFAAAALi4u////KCgocnJyU1NTXFxcX19fYmJiZmZmbGxsZWVldnZ2ZGRkVFRULS0tS0tLX19fcHBwgYGBjY2NlJSUU1NTa2tri4uLsbGx0tLSQEBAY2NjioqKwsLCUFBQbm5up6enT09PcnJyuLi4MzMzMjIyY2Njp6eniYmJampqSkpKi4uLsbGxgICA5+fn8vLy9vb27+/v/v7+////6urq+Pj4+/v76enp7u7u0tLS+nIsWQAAAC90Uk5TAAAAAAAAAA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/f32dnZ2tra+Pj4zMzM5ubm/Pz87+/v/f39np6eoaGh72rD8AAAAEJ0Uk5TAAAAAAAAAAAAAAAAAAeQ1tTUkEfvEblo+iPUAoo76QusWfYayXr+Nt+vsDjgfx3OYvkPtkbvBZou33z+G8td9w+7LHUOhgAAAAFiS0dECIbelXoAAAAJcEhZcwAACxMAAAsTAQCanBgAAAEfSURBVCjPdZJnd4JAEEUHXRds0cTee++9N3RtYI35/38lKJEoLPfrPfP27MwDuMPYPxzOTwWn48vOgILB6HLzyxd4t8toUDTyeFfkjZXXg56WMfn8RIXfZ3rGo0BwrdbrYOBv3BAKb4iGTTgkv44j0a1Wb6MR/IiOxXeEwi4ek+Ixm0gSKskEiwGl0nu63qdTCLhMluiQzXCQywt6WsjnoCASXcQCFA/6+lCEUvmoZ4/lEkDlpKdPFWkr1RpPt3ytigCb6w26btTN0lpRs3Wm2XOreb8Za2l3Llp76bQt7KMN3R7l72KvK/fByvQHms0Jgz5jlfuAueFIrUdDDitVHE+u7/Y6GStVBGybzr7fmE1t+L/oaL64/bxwW8zl4V/ItJ8bdLPi4gAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOS0wMS0yMFQxMDoyOTozOC0wNjowMKDoi6gAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTktMDEtMjBUMTA6Mjk6MzgtMDY6MDDRtTMUAAAAAElFTkSuQmCC") # add results to webpage cat("
", file=output_index_file, append=TRUE) cat("

Original gene sets

\n", file=output_index_file,append=TRUE,sep="") @@ -151,23 +158,31 @@ sumer <- function(config_file, output_dir, n_threads=4){ } cat("

Summary of top gene sets from all platforms

\n", file=output_index_file, append=TRUE) - cat("
+ cat("
  • Clustering is performed using affinity propagation algorithm.
  • Each node represents a gene set.
  • Size of nodes represents the relative number of genes in the set.
  • -
  • Node shape maps to omics platform (e.g., RNA-seq, Proteomics, Phosphoproteomics).
  • -
  • Node color maps to value of scores.
  • +
  • Node shape maps to omics platform.
  • \n", file=output_index_file, append=TRUE) + cat('
    \n', file=output_index_file, append=TRUE) + for(i in seq_len(n_platform)) { + cur_config <- config[i,] + cur_platform <- cur_config[["platform_name"]] + cat('
    \n', file=output_index_file, sep='', append=TRUE) + cat('
    \n', file=output_index_file, append=TRUE) + cat('
    ', cur_platform, '
    \n', file=output_index_file, sep='', append=TRUE) + } + cat("
  • Node color maps to value of scores.
\n", file=output_index_file, append=TRUE) - cat('
-
Select a layout style: -
- \n", file=output_index_file, append=TRUE) - cat("
\n", file=output_index_file, append=TRUE) + cat("\n
\n", file=output_index_file, append=TRUE) + cat('
Show/hide label: + +
+
\n', file=output_index_file, append=TRUE) + cat("
\n", file=output_index_file, append=TRUE) cat("Download data\n", file=output_index_file, sep="", append=TRUE) cat("