@sjcrh/proteinpaint-server 2.108.0 → 2.109.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/genome/hg38.js +2 -2
- package/package.json +3 -3
- package/routes/gdc.maf.js +2 -0
- package/routes/termdb.DE.js +75 -7
- package/routes/termdb.cluster.js +7 -1
- package/routes/termdb.config.js +2 -1
- package/src/app.js +108 -18
- package/src/bedj.parseBed.js +1 -1
- package/src/run_R.js +1 -1
- package/utils/edge.R +29 -14
- package/utils/hwe.R +0 -11
package/src/bedj.parseBed.js
CHANGED
|
@@ -69,7 +69,7 @@ to parse line as gene file, require following:
|
|
|
69
69
|
|
|
70
70
|
*/
|
|
71
71
|
|
|
72
|
-
import checkReadingFrame from './checkReadingFrame'
|
|
72
|
+
import checkReadingFrame from './checkReadingFrame.js'
|
|
73
73
|
|
|
74
74
|
//a valid exonFrames field can only contain members of validFrames, names -1, 0, 1, or 2
|
|
75
75
|
const validFrames = new Set(['-1', '0', '1', '2'])
|
package/src/run_R.js
CHANGED
package/utils/edge.R
CHANGED
|
@@ -30,13 +30,6 @@ filter_genes_by_global_variance <- function(read_counts, gene_id_symbols, num_va
|
|
|
30
30
|
return(list(read_counts = read_counts, gene_id_symbols = gene_id_symbols))
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
# Will implement this later
|
|
34
|
-
filter_genes_by_group_variance <- function(read_counts, gene_id_symbols, num_variable_genes, cases, controls) {
|
|
35
|
-
# Divide the read counts into two groups
|
|
36
|
-
case_read_counts <- read_counts[, cases]
|
|
37
|
-
control_read_counts <- read_counts[, controls]
|
|
38
|
-
}
|
|
39
|
-
|
|
40
33
|
# Read JSON input from stdin
|
|
41
34
|
read_json_time <- system.time({
|
|
42
35
|
con <- file("stdin", "r")
|
|
@@ -146,15 +139,29 @@ if (length(input$conf1) == 0) { # No adjustment of confounding factors
|
|
|
146
139
|
# Check the type of confounding variable
|
|
147
140
|
if (input$conf1_mode == "continuous") { # If this is float, the input conf1 vector should be converted into a numeric vector
|
|
148
141
|
conf1 <- as.numeric(input$conf1)
|
|
149
|
-
} else { # When input$conf1_mode == "discrete" keep the vector as string.
|
|
142
|
+
} else { # When input$conf1_mode == "discrete" keep the vector as string.
|
|
150
143
|
conf1 <- as.factor(input$conf1)
|
|
151
144
|
}
|
|
152
145
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
146
|
+
if (length(input$conf2) == 0) { # No adjustment of confounding factor 2
|
|
147
|
+
y$samples <- data.frame(conditions = conditions, conf1 = conf1)
|
|
148
|
+
model_gen_time <- system.time({
|
|
149
|
+
design <- model.matrix(~ conditions + conf1, data = y$samples)
|
|
150
|
+
})
|
|
151
|
+
#cat("Time for making design matrix: ", model_gen_time[3], " seconds\n")
|
|
152
|
+
} else {
|
|
153
|
+
# Check the type of confounding variable 2
|
|
154
|
+
if (input$conf2_mode == "continuous") { # If this is float, the input conf2 vector should be converted into a numeric vector
|
|
155
|
+
conf2 <- as.numeric(input$conf2)
|
|
156
|
+
} else { # When input$conf2_mode == "discrete" keep the vector as string.
|
|
157
|
+
conf2 <- as.factor(input$conf2)
|
|
158
|
+
}
|
|
159
|
+
y$samples <- data.frame(conditions = conditions, conf1 = conf1, conf2 = conf2)
|
|
160
|
+
model_gen_time <- system.time({
|
|
161
|
+
design <- model.matrix(~ conditions + conf1 + conf2, data = y$samples)
|
|
162
|
+
})
|
|
163
|
+
#cat("Time for making design matrix: ", model_gen_time[3], " seconds\n")
|
|
164
|
+
}
|
|
158
165
|
|
|
159
166
|
dispersion_time <- system.time({
|
|
160
167
|
y <- estimateDisp(y, design)
|
|
@@ -167,7 +174,7 @@ if (length(input$conf1) == 0) { # No adjustment of confounding factors
|
|
|
167
174
|
#cat("Fit time: ", fit_time[3], " seconds\n")
|
|
168
175
|
|
|
169
176
|
test_statistics_time <- system.time({
|
|
170
|
-
et <- glmLRT(fit, coef =
|
|
177
|
+
et <- glmLRT(fit, coef = "conditionsDiseased")
|
|
171
178
|
})
|
|
172
179
|
#cat("Test statistics time: ", test_statistics_time[3], " seconds\n")
|
|
173
180
|
}
|
|
@@ -192,3 +199,11 @@ multiple_testing_correction_time <- system.time({
|
|
|
192
199
|
|
|
193
200
|
# Output results
|
|
194
201
|
toJSON(output)
|
|
202
|
+
|
|
203
|
+
#-----------------------------------#
|
|
204
|
+
# Will implement this later
|
|
205
|
+
filter_genes_by_group_variance <- function(read_counts, gene_id_symbols, num_variable_genes, cases, controls) {
|
|
206
|
+
# Divide the read counts into two groups
|
|
207
|
+
case_read_counts <- read_counts[, cases]
|
|
208
|
+
control_read_counts <- read_counts[, controls]
|
|
209
|
+
}
|