@sjcrh/proteinpaint-server 2.98.2-1 → 2.99.0

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/corr.R CHANGED
@@ -19,7 +19,9 @@ coeffs <- c()
19
19
  pvalues <- c()
20
20
  sample_sizes <- c()
21
21
  for (i in 1:length(v1)) {
22
- cor <- cor.test(as.numeric(unlist(v1[i])), as.numeric(unlist(v2[i])), method = input$method)
22
+ suppressWarnings({
23
+ cor <- cor.test(as.numeric(unlist(v1[i])), as.numeric(unlist(v2[i])), method = input$method)
24
+ })
23
25
  coeffs <- c(coeffs, cor$estimate)
24
26
  pvalues <- c(pvalues, cor$p.value)
25
27
  sample_sizes <- c(sample_sizes, length(as.numeric(unlist(v1[i]))))
@@ -33,4 +35,4 @@ names(output)[2] <- "correlation"
33
35
  names(output)[3] <- "original_p_value"
34
36
  names(output)[4] <- "adjusted_p_value"
35
37
  names(output)[5] <- "sample_size"
36
- cat(paste0("adjusted_p_values:", toJSON(output)))
38
+ toJSON(output)
package/utils/edge.R CHANGED
@@ -19,7 +19,7 @@ read_json_time <- system.time({
19
19
  controls <- unlist(strsplit(input$control, ","))
20
20
  combined <- c("geneID", "geneSymbol", cases, controls)
21
21
  })
22
- cat("Time to read JSON: ", read_json_time[3], " seconds\n")
22
+ #cat("Time to read JSON: ", read_json_time[3], " seconds\n")
23
23
 
24
24
  # Read counts data
25
25
  read_counts_time <- system.time({
@@ -59,7 +59,7 @@ read_counts_time <- system.time({
59
59
  stop("Unknown storage type")
60
60
  }
61
61
  })
62
- cat("Time to read counts data: ", read_counts_time[3], " seconds\n")
62
+ #cat("Time to read counts data: ", read_counts_time[3], " seconds\n")
63
63
 
64
64
  # Create conditions vector
65
65
  conditions <- c(rep("Diseased", length(cases)), rep("Control", length(controls)))
@@ -69,19 +69,19 @@ gene_id_symbols <- paste0(geneIDs, "\t", geneSymbols)
69
69
  dge_list_time <- system.time({
70
70
  y <- DGEList(counts = read_counts, group = conditions, genes = gene_id_symbols)
71
71
  })
72
- cat("Time to generate DGEList: ", dge_list_time[3], " seconds\n")
72
+ #cat("Time to generate DGEList: ", dge_list_time[3], " seconds\n")
73
73
 
74
74
  # Filter and normalize counts
75
75
  filter_time <- system.time({
76
76
  keep <- filterByExpr(y, min.count = input$min_count, min.total.count = input$min_total_count)
77
77
  })
78
- cat("Time to filter by expression: ", filter_time[3], " seconds\n")
78
+ #cat("Time to filter by expression: ", filter_time[3], " seconds\n")
79
79
 
80
80
  normalization_time <- system.time({
81
81
  y <- y[keep, keep.lib.sizes = FALSE]
82
82
  y <- calcNormFactors(y, method = "TMM")
83
83
  })
84
- cat("Normalization time: ", normalization_time[3], " seconds\n")
84
+ #cat("Normalization time: ", normalization_time[3], " seconds\n")
85
85
 
86
86
  # Differential expression analysis
87
87
  if (length(input$conf1) == 0) { # No adjustment of confounding factors
@@ -92,33 +92,33 @@ if (length(input$conf1) == 0) { # No adjustment of confounding factors
92
92
  })
93
93
  })
94
94
  })
95
- cat("Dispersion time: ", dispersion_time[3], " seconds\n")
95
+ #cat("Dispersion time: ", dispersion_time[3], " seconds\n")
96
96
 
97
97
  exact_test_time <- system.time({
98
98
  et <- exactTest(y)
99
99
  })
100
- cat("Exact test time: ", exact_test_time[3], " seconds\n")
100
+ #cat("Exact test time: ", exact_test_time[3], " seconds\n")
101
101
  } else { # Adjusting for confounding factors
102
102
  y$samples <- data.frame(conditions = conditions, conf1 = input$conf1)
103
103
  model_gen_time <- system.time({
104
104
  design <- model.matrix(~ conf1 + conditions, data = y$samples)
105
105
  })
106
- cat("Time for making design matrix: ", model_gen_time[3], " seconds\n")
106
+ #cat("Time for making design matrix: ", model_gen_time[3], " seconds\n")
107
107
 
108
108
  dispersion_time <- system.time({
109
109
  y <- estimateDisp(y, design)
110
110
  })
111
- cat("Dispersion time: ", dispersion_time[3], " seconds\n")
111
+ #cat("Dispersion time: ", dispersion_time[3], " seconds\n")
112
112
 
113
113
  fit_time <- system.time({
114
114
  fit <- glmFit(y, design)
115
115
  })
116
- cat("Fit time: ", fit_time[3], " seconds\n")
116
+ #cat("Fit time: ", fit_time[3], " seconds\n")
117
117
 
118
118
  test_statistics_time <- system.time({
119
119
  et <- glmLRT(fit, coef = 2)
120
120
  })
121
- cat("Test statistics time: ", test_statistics_time[3], " seconds\n")
121
+ #cat("Test statistics time: ", test_statistics_time[3], " seconds\n")
122
122
  }
123
123
 
124
124
  # Multiple testing correction
@@ -137,7 +137,7 @@ multiple_testing_correction_time <- system.time({
137
137
  names(output)[4] <- "original_p_value"
138
138
  names(output)[5] <- "adjusted_p_value"
139
139
  })
140
- cat("Time for multiple testing correction: ", multiple_testing_correction_time[3], " seconds\n")
140
+ #cat("Time for multiple testing correction: ", multiple_testing_correction_time[3], " seconds\n")
141
141
 
142
142
  # Output results
143
- cat(paste0("adjusted_p_values:", toJSON(output)))
143
+ toJSON(output)