@sjcrh/proteinpaint-server 2.27.0 → 2.27.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/utils/fastclust.R CHANGED
@@ -42,10 +42,17 @@ args <- commandArgs(trailingOnly = T)
42
42
  if (length(args) != 1) stop("Usage: Rscript test.R in.json > results")
43
43
  infile <- args[1]
44
44
  input <- fromJSON(infile)
45
- normalized_matrix <- t(scale(t(input$matrix))) # Applying z-score normalization
45
+
46
+ if (length(input$valueIsTransformed) == 0 || input$valueIsTransformed == FALSE) {
47
+ normalized_matrix <- t(scale(t(input$matrix))) # Applying z-score normalization
48
+ } else { # No normalization
49
+ normalized_matrix <- input$matrix
50
+ }
51
+
46
52
  # For columns (i.e samples)
47
53
  RowDist <- dist(normalized_matrix, method = "euclidean") # Transposing the matrix
48
54
 
55
+
49
56
  # Hierarchical clustering
50
57
  print (input$cluster_method)
51
58
  RowDend <- hclust(RowDist, method = tolower(input$cluster_method))