Bioc bug fix
... | ... |
@@ -12,70 +12,55 @@ loadpageServer <- function(id, parent_session) { |
12 | 12 |
moduleServer(id, function(input, output, session) { |
13 | 13 |
# toggle ui (DDA DIA SRM) |
14 | 14 |
observe({ |
15 |
- if (input$DDA_DIA == "DDA") { |
|
15 |
+ print("bio") |
|
16 |
+ |
|
17 |
+ print(input$BIO) |
|
18 |
+ if((input$BIO == "Protein" || input$BIO == "Peptide") && input$DDA_DIA == "LType"){ |
|
16 | 19 |
runjs("$('[type=radio][name=loadpage-filetype]:disabled').parent().parent().parent().find('div.radio').css('opacity', 1)") |
17 | 20 |
enable("filetype") |
18 |
- disable(selector = "[type=radio][value=spec]") |
|
19 |
- disable(selector = "[type=radio][value=open]") |
|
20 |
- disable(selector = "[type=radio][value=ump]") |
|
21 | 21 |
disable(selector = "[type=radio][value=spmin]") |
22 |
- disable(selector = "[type=radio][value=diann]") |
|
23 | 22 |
runjs("$.each($('[type=radio][name=loadpage-filetype]:disabled'), function(_, e){ $(e).parent().parent().css('opacity', 0.4) })") |
24 |
- } |
|
25 |
- else if (input$DDA_DIA == "DIA") { |
|
23 |
+ |
|
24 |
+ } else if ((input$BIO == "Protein" || input$BIO == "Peptide") && input$DDA_DIA == "TMT"){ |
|
26 | 25 |
runjs("$('[type=radio][name=loadpage-filetype]:disabled').parent().parent().parent().find('div.radio').css('opacity', 1)") |
27 | 26 |
enable("filetype") |
28 |
- disable(selector = "[type=radio][value=maxq]") |
|
29 |
- disable(selector = "[type=radio][value=prog]") |
|
30 |
- disable(selector = "[type=radio][value=PD]") |
|
31 |
- disable(selector = "[type=radio][value=openms]") |
|
32 |
- disable(selector = "[type=radio][value=spmin]") |
|
33 |
- disable(selector = "[type=radio][value=phil]") |
|
34 |
- runjs("$.each($('[type=radio][name=loadpage-filetype]:disabled'), function(_, e){ $(e).parent().parent().css('opacity', 0.4) })") |
|
35 |
- } |
|
36 |
- else if (input$DDA_DIA == "SRM_PRM") { |
|
37 |
- runjs("$('[type=radio][name=loadpage-filetype]:disabled').parent().parent().parent().find('div.radio').css('opacity', 1)") |
|
38 |
- enable("filetype") |
|
39 |
- disable(selector = "[type=radio][value=maxq]") |
|
27 |
+ disable(selector = "[type=radio][value=sky]") |
|
40 | 28 |
disable(selector = "[type=radio][value=prog]") |
41 |
- disable(selector = "[type=radio][value=PD]") |
|
42 |
- disable(selector = "[type=radio][value=openms]") |
|
43 | 29 |
disable(selector = "[type=radio][value=spec]") |
44 | 30 |
disable(selector = "[type=radio][value=open]") |
45 | 31 |
disable(selector = "[type=radio][value=ump]") |
46 |
- disable(selector = "[type=radio][value=spmin]") |
|
47 |
- disable(selector = "[type=radio][value=phil]") |
|
48 | 32 |
disable(selector = "[type=radio][value=diann]") |
49 | 33 |
runjs("$.each($('[type=radio][name=loadpage-filetype]:disabled'), function(_, e){ $(e).parent().parent().css('opacity', 0.4) })") |
50 |
- } |
|
51 |
- |
|
52 |
- else if (input$DDA_DIA == "TMT") { |
|
34 |
+ |
|
35 |
+ } else if (input$BIO == "PTM" && input$DDA_DIA == "LType"){ |
|
53 | 36 |
runjs("$('[type=radio][name=loadpage-filetype]:disabled').parent().parent().parent().find('div.radio').css('opacity', 1)") |
54 | 37 |
enable("filetype") |
55 |
- disable(selector = "[type=radio][value=sky]") |
|
38 |
+ # disable(selector = "[type=radio][value=sky]") |
|
56 | 39 |
disable(selector = "[type=radio][value=prog]") |
57 |
- disable(selector = "[type=radio][value=spec]") |
|
40 |
+ disable(selector = "[type=radio][value=PD]") |
|
41 |
+ disable(selector = "[type=radio][value=openms]") |
|
42 |
+ disable(selector = "[type=radio][value=spmin]") |
|
58 | 43 |
disable(selector = "[type=radio][value=open]") |
59 | 44 |
disable(selector = "[type=radio][value=ump]") |
45 |
+ disable(selector = "[type=radio][value=phil]") |
|
60 | 46 |
disable(selector = "[type=radio][value=diann]") |
61 |
- runjs("$.each($('[type=radio][name=loadpage-filetype]:disabled'), function(_, e){ $(e).parent().parent().css('opacity', 0.4) })") |
|
62 | 47 |
|
63 |
- } |
|
64 |
- else if (input$DDA_DIA %in% c("PTM", "PTM_TMT")) { |
|
48 |
+ runjs("$.each($('[type=radio][name=loadpage-filetype]:disabled'), function(_, e){ $(e).parent().parent().css('opacity', 0.4) })") |
|
49 |
+ }else if (input$BIO == "PTM" && input$DDA_DIA == "TMT"){ |
|
65 | 50 |
runjs("$('[type=radio][name=loadpage-filetype]:disabled').parent().parent().parent().find('div.radio').css('opacity', 1)") |
66 | 51 |
enable("filetype") |
67 |
- # disable(selector = "[type=radio][value=sky]") |
|
68 | 52 |
disable(selector = "[type=radio][value=prog]") |
69 |
- # disable(selector = "[type=radio][value=PD]") |
|
70 | 53 |
disable(selector = "[type=radio][value=openms]") |
71 |
- # disable(selector = "[type=radio][value=spec]") |
|
54 |
+ disable(selector = "[type=radio][value=spec]") |
|
72 | 55 |
disable(selector = "[type=radio][value=open]") |
73 | 56 |
disable(selector = "[type=radio][value=ump]") |
74 | 57 |
disable(selector = "[type=radio][value=spmin]") |
75 |
- # disable(selector = "[type=radio][value=phil]") |
|
76 | 58 |
disable(selector = "[type=radio][value=diann]") |
77 |
- runjs("$.each($('[type=radio][name=loadpage-filetype]:disabled'), function(_, e){ $(e).parent().parent().css('opacity', 0.4) })") |
|
59 |
+ disable(selector = "[type=radio][value=sky]") |
|
60 |
+ |
|
61 |
+ runjs("$.each($('[type=radio][name=loadpage-filetype]:disabled'), function(_, e){ $(e).parent().parent().css('opacity', 0.4) })") |
|
78 | 62 |
} |
63 |
+ |
|
79 | 64 |
}) |
80 | 65 |
|
81 | 66 |
observeEvent(input$filetype,{ |
... | ... |
@@ -238,11 +223,11 @@ loadpageServer <- function(id, parent_session) { |
238 | 223 |
h4("Summary of dataset"), |
239 | 224 |
tableOutput(ns("summary2")), |
240 | 225 |
tags$br(), |
241 |
- conditionalPanel(condition = "input['loadpage-DDA_DIA'] !== 'PTM'", |
|
226 |
+ conditionalPanel(condition = "input['loadpage-BIO'] !== 'PTM'", |
|
242 | 227 |
h4("Top 6 rows of the dataset"), |
243 | 228 |
tableOutput(ns("summary")) |
244 | 229 |
), |
245 |
- conditionalPanel(condition = "input['loadpage-DDA_DIA'] == 'PTM'", |
|
230 |
+ conditionalPanel(condition = "input['loadpage-BIO'] == 'PTM'", |
|
246 | 231 |
h4("Top 6 rows of the PTM dataset"), |
247 | 232 |
tableOutput(ns("summary_ptm")), |
248 | 233 |
tags$br(), |
... | ... |
@@ -52,15 +52,20 @@ loadpageUI <- function(id) { |
52 | 52 |
|
53 | 53 |
# selection for DIA DDA or SRM/PRM |
54 | 54 |
|
55 |
+ radioButtons(ns("BIO"), |
|
56 |
+ label <- h4("1. Biological Question",class = "icon-wrapper",icon("question-circle", lib = "font-awesome" ), |
|
57 |
+ div("Select the biological question of interest.", class = "icon-tooltip")), |
|
58 |
+ c("Protein"="Protein", "Peptide"="Peptide","PTM"="PTM") |
|
59 |
+ ), |
|
55 | 60 |
radioButtons(ns("DDA_DIA"), |
56 |
- label <- h4("1. Experimental Design",class = "icon-wrapper",icon("question-circle", lib = "font-awesome"), |
|
57 |
- div("DDA/DIA/SRM/PRM are used for label-free preparation. PTM can either by label-free or TMT.", class = "icon-tooltip")), |
|
58 |
- c("DDA" = "DDA", "DIA" = "DIA", "SRM/PRM" = "SRM_PRM", |
|
59 |
- "DDA/TMT"="TMT", "PTM"="PTM")), |
|
61 |
+ label <- h4("2. Label Type",class = "icon-wrapper",icon("question-circle", lib = "font-awesome" ), |
|
62 |
+ div("Label-free will process all label-free acquisitions including DDA/DIA/SRM/PRM.", class = "icon-tooltip")), |
|
63 |
+ c("Label-Free"="LType", "TMT"="TMT") |
|
64 |
+ ), |
|
60 | 65 |
# upload |
61 | 66 |
|
62 | 67 |
radioButtons(ns("filetype"), |
63 |
- label <- h4("2. Type of File",class = "icon-wrapper",icon("question-circle", lib = "font-awesome"), |
|
68 |
+ label <- h4("3. Type of File",class = "icon-wrapper",icon("question-circle", lib = "font-awesome"), |
|
64 | 69 |
div("Choose the spectral processing tool used to process your data", class = "icon-tooltip")), |
65 | 70 |
choices = c("Example dataset" = "sample", |
66 | 71 |
"MSstats Format" = "msstats", |
... | ... |
@@ -70,26 +75,21 @@ loadpageUI <- function(id) { |
70 | 75 |
"OpenSWATH" = "open", "DIA-Umpire" = "ump", |
71 | 76 |
"SpectroMine" = "spmin", "FragPipe" = "phil", "DIANN"="diann"), |
72 | 77 |
selected = character(0)), |
73 |
- conditionalPanel( |
|
74 |
- condition = "input['loadpage-DDA_DIA'] != 'PTM'", |
|
75 |
- radioButtons(ns("level"), |
|
76 |
- label <- h4("3. Analysis Level",class = "icon-wrapper",icon("question-circle", lib = "font-awesome"), |
|
77 |
- div("Choose either peptide or protein level of analysis. MSstats is classically designed for protein level analysis and peptide analysis may produce inconsistent results.", class = "icon-tooltip")), |
|
78 |
- choices = c("Protein" = "Protein", "Peptide" = "Peptide"), |
|
79 |
- selected = "Protein") |
|
80 |
- ), |
|
78 |
+ |
|
79 |
+ tags$hr(), |
|
80 |
+ conditionalPanel( condition="input['loadpage-BIO'] != 'PTM' && input['loadpage-filetype'] == 'sample' && input['loadpage-DDA_DIA'] == 'LType' ", |
|
81 |
+ radioButtons(ns("LabelFreeType"), |
|
82 |
+ label <- h4("4. Type of Label-Free type",class = "icon-wrapper",icon("question-circle", lib = "font-awesome"), |
|
83 |
+ div("Choose the spectral processing tool used to process your data", class = "icon-tooltip")), |
|
84 |
+ choices = c("DDA" = "DDA", |
|
85 |
+ "DIA" ="DIA", |
|
86 |
+ "SRM/PRM" ="SRM_PRM"), |
|
87 |
+ selected = character(0))), |
|
88 |
+ |
|
81 | 89 |
tags$hr(), |
82 |
- conditionalPanel( |
|
83 |
- condition = "input['loadpage-filetype'] == 'sample' && input['loadpage-DDA_DIA'] == 'PTM' && input['loadpage-filetype'] != 'phil'", |
|
84 |
- radioButtons(ns("PTMTMT"), |
|
85 |
- label <- h4("3. TMT Experiment",class = "icon-wrapper",icon("question-circle", lib = "font-awesome"), |
|
86 |
- div("Indicate whether to use a label free or TMT sample experiment", class = "icon-tooltip")), |
|
87 |
- c(No='No', Yes='Yes'), |
|
88 |
- inline=TRUE) |
|
89 |
- ), |
|
90 | 90 |
conditionalPanel( |
91 | 91 |
condition = "(input['loadpage-filetype'] =='10col' || input['loadpage-filetype'] =='prog' || input['loadpage-filetype'] =='PD' || input['loadpage-filetype'] =='open'|| |
92 |
- input['loadpage-filetype'] =='openms' || input['loadpage-filetype'] =='spmin' || input['loadpage-filetype'] == 'phil') && input['loadpage-DDA_DIA'] != 'PTM'", |
|
92 |
+ input['loadpage-filetype'] =='openms' || input['loadpage-filetype'] =='spmin' || input['loadpage-filetype'] == 'phil') && input['loadpage-BIO'] != 'PTM'", |
|
93 | 93 |
h4("4. Upload quantification dataset"), |
94 | 94 |
fileInput(ns('data'), "", multiple = FALSE, |
95 | 95 |
accept = c("text/csv", |
... | ... |
@@ -101,7 +101,7 @@ loadpageUI <- function(id) { |
101 | 101 |
c(Comma=",",Semicolon=";", Tab="\t",Pipe="|"), |
102 | 102 |
inline = TRUE) |
103 | 103 |
), |
104 |
- conditionalPanel(condition = "input['loadpage-filetype'] == 'msstats' && input['loadpage-DDA_DIA'] != 'PTM' && input['loadpage-DDA_DIA'] != 'PTM_TMT'", |
|
104 |
+ conditionalPanel(condition = "input['loadpage-filetype'] == 'msstats' && (input['loadpage-BIO'] != 'PTM' && (input['loadpage-BIO'] != 'PTM' && input['loadpage-DDA_DIA'] != 'TMT'))", |
|
105 | 105 |
h4("4. Upload data in MSstats Format"), |
106 | 106 |
fileInput(ns('msstatsdata'), "", multiple = FALSE, |
107 | 107 |
accept = c("text/csv", |
... | ... |
@@ -113,7 +113,7 @@ loadpageUI <- function(id) { |
113 | 113 |
c(Comma=",",Semicolon=";", Tab="\t",Pipe="|"), |
114 | 114 |
inline = TRUE) |
115 | 115 |
), |
116 |
- conditionalPanel(condition = "input['loadpage-filetype'] == 'msstats' && (input['loadpage-DDA_DIA'] == 'PTM' || input['loadpage-DDA_DIA'] == 'PTM_TMT')", |
|
116 |
+ conditionalPanel(condition = "input['loadpage-filetype'] == 'msstats' && (input['loadpage-BIO'] == 'PTM' || (input['loadpage-BIO'] == 'PTM' && input['loadpage-DDA_DIA'] == 'TMT'))", |
|
117 | 117 |
h4("4. Upload PTM data in MSstats Format"), |
118 | 118 |
fileInput(ns('msstatsptmdata'), "", multiple = FALSE, |
119 | 119 |
accept = c("text/csv", |
... | ... |
@@ -125,7 +125,7 @@ loadpageUI <- function(id) { |
125 | 125 |
c(Comma=",",Semicolon=";", Tab="\t",Pipe="|"), |
126 | 126 |
inline = TRUE) |
127 | 127 |
), |
128 |
- conditionalPanel(condition = "input['loadpage-filetype'] == 'sky' && input['loadpage-DDA_DIA'] != 'PTM'", |
|
128 |
+ conditionalPanel(condition = "input['loadpage-filetype'] == 'sky' && input['loadpage-BIO'] != 'PTM'", |
|
129 | 129 |
h4("4. Upload MSstats report from Skyline"), |
130 | 130 |
fileInput(ns('skylinedata'), "", multiple = FALSE, |
131 | 131 |
accept = c("text/csv", |
... | ... |
@@ -137,7 +137,7 @@ loadpageUI <- function(id) { |
137 | 137 |
c(Comma=",",Semicolon=";", Tab="\t",Pipe="|"), |
138 | 138 |
inline = TRUE) |
139 | 139 |
), |
140 |
- conditionalPanel(condition = "input['loadpage-filetype'] == 'diann' && input['loadpage-DDA_DIA'] != 'PTM'", |
|
140 |
+ conditionalPanel(condition = "input['loadpage-filetype'] == 'diann' && input['loadpage-BIO'] != 'PTM'", |
|
141 | 141 |
h4("4. Upload MSstats report from DIANN"), |
142 | 142 |
fileInput(ns('dianndata'), "", multiple = FALSE, |
143 | 143 |
accept = c("text/csv", |
... | ... |
@@ -149,7 +149,7 @@ loadpageUI <- function(id) { |
149 | 149 |
c(Comma=",",Semicolon=";", Tab="\t",Pipe="|"), |
150 | 150 |
inline = TRUE) |
151 | 151 |
), |
152 |
- conditionalPanel(condition = "input['loadpage-filetype'] == 'spec' && input['loadpage-DDA_DIA'] != 'PTM'", |
|
152 |
+ conditionalPanel(condition = "input['loadpage-filetype'] == 'spec' && input['loadpage-BIO'] != 'PTM'", |
|
153 | 153 |
h4("4. Upload MSstats scheme output from Spectronaut"), |
154 | 154 |
fileInput(ns('specdata'), "", multiple = FALSE, |
155 | 155 |
accept = c("text/csv",".xlsx", |
... | ... |
@@ -171,7 +171,7 @@ loadpageUI <- function(id) { |
171 | 171 |
# ), |
172 | 172 |
|
173 | 173 |
conditionalPanel( |
174 |
- condition = "input['loadpage-filetype'] == 'phil' && input['loadpage-DDA_DIA'] == 'PTM'", |
|
174 |
+ condition = "input['loadpage-filetype'] == 'phil' && input['loadpage-BIO'] == 'PTM'", |
|
175 | 175 |
h4("3. Upload PTM msstats dataset"), |
176 | 176 |
fileInput(ns('ptmdata'), "", multiple = FALSE, |
177 | 177 |
accept = c("text/csv", |
... | ... |
@@ -206,13 +206,13 @@ loadpageUI <- function(id) { |
206 | 206 |
), |
207 | 207 |
|
208 | 208 |
|
209 |
- conditionalPanel(condition = "(input['loadpage-filetype'] == 'spec' || input['loadpage-filetype'] =='spmin') && input['loadpage-DDA_DIA'] != 'PTM'", |
|
209 |
+ conditionalPanel(condition = "(input['loadpage-filetype'] == 'spec' || input['loadpage-filetype'] =='spmin') && input['loadpage-BIO'] != 'PTM'", |
|
210 | 210 |
fileInput(ns('data1'), "", multiple = FALSE, accept = c(".xls")), |
211 | 211 |
), |
212 | 212 |
tags$br(), |
213 | 213 |
conditionalPanel( |
214 |
- condition = "(input['loadpage-filetype'] == 'sky' || input['loadpage-filetype'] == 'prog' || input['loadpage-filetype'] == 'PD' || input['loadpage-filetype'] == 'spec' || input['loadpage-filetype'] == 'open'|| input['loadpage-filetype'] =='spmin' || input['loadpage-filetype'] == 'phil' || input['loadpage-filetype'] == 'diann') && input['loadpage-DDA_DIA'] != 'PTM'", |
|
215 |
- h4("5. Upload annotation Filel", class = "icon-wrapper",icon("question-circle", lib = "font-awesome"), |
|
214 |
+ condition = "(input['loadpage-filetype'] == 'sky' || input['loadpage-filetype'] == 'prog' || input['loadpage-filetype'] == 'PD' || input['loadpage-filetype'] == 'spec' || input['loadpage-filetype'] == 'open'|| input['loadpage-filetype'] =='spmin' || input['loadpage-filetype'] == 'phil' || input['loadpage-filetype'] == 'diann') && input['loadpage-BIO'] != 'PTM'", |
|
215 |
+ h4("5. Upload annotation File", class = "icon-wrapper",icon("question-circle", lib = "font-awesome"), |
|
216 | 216 |
div("Upload manually created annotation file. This file maps MS runs to experiment metadata (i.e. conditions, bioreplicates). Please see Help tab for information on creating this file.",class = "icon-tooltip")), |
217 | 217 |
#downloadLink("template", "Annotation file template"), |
218 | 218 |
fileInput(ns('annot'), "", multiple = FALSE, |
... | ... |
@@ -221,34 +221,30 @@ loadpageUI <- function(id) { |
221 | 221 |
), |
222 | 222 |
tags$br(), |
223 | 223 |
## PTM Fragpipe input -- -------------------------------------------------------- |
224 |
- conditionalPanel(condition = "input['loadpage-filetype'] == 'msstats' && (input['loadpage-DDA_DIA'] == 'PTM' || input['loadpage-DDA_DIA'] == 'PTM_TMT')", |
|
224 |
+ conditionalPanel(condition = "input['loadpage-filetype'] == 'msstats' && (input['loadpage-BIO'] == 'PTM' || (input['loadpage-BIO'] == 'PTM' && input['loadpage-DDA_DIA'] == 'TMT'))", |
|
225 | 225 |
h4("4. (Optional) Upload unmodified data in MSstats Format"), |
226 | 226 |
fileInput(ns('unmod'), "", multiple = FALSE, |
227 | 227 |
accept = c("text/csv", |
228 | 228 |
"text/comma-separated-values,text/plain", |
229 | 229 |
".csv")), |
230 |
- tags$br(), |
|
231 |
- radioButtons(ns("PTMTMT"), |
|
232 |
- label = h4("5. TMT Experiment", class = "icon-wrapper",icon("question-circle", lib = "font-awesome"), |
|
233 |
- div("Indicate if experiment was processed using TMT labeling",class = "icon-tooltip")), |
|
234 |
- c(No='No', Yes='Yes'), |
|
235 |
- inline = TRUE)), |
|
230 |
+ tags$br() |
|
231 |
+ ), |
|
236 | 232 |
conditionalPanel( |
237 |
- condition = "input['loadpage-filetype'] == 'maxq' && (input['loadpage-DDA_DIA'] != 'PTM' && input['loadpage-DDA_DIA'] != 'PTM_TMT')", |
|
238 |
- h4("5. Upload evidence.txt File"), |
|
233 |
+ condition = "input['loadpage-filetype'] == 'maxq' && input['loadpage-BIO'] != 'PTM' && (input['loadpage-DDA_DIA'] == 'TMT' || input['loadpage-DDA_DIA'] == 'LType')", |
|
234 |
+ h4("4. Upload evidence.txt File"), |
|
239 | 235 |
fileInput(ns('evidence'), "", multiple = FALSE, |
240 | 236 |
accept = c("text/csv", "text/comma-separated-values,text/plain", ".csv")), |
241 |
- h4("6. Upload proteinGroups.txt File"), |
|
237 |
+ h4("5. Upload proteinGroups.txt File"), |
|
242 | 238 |
fileInput(ns('pGroup'), "", multiple = FALSE, |
243 | 239 |
accept = c("text/csv", "text/comma-separated-values,text/plain", ".csv")), |
244 |
- h4("7. Upload annotation File", class = "icon-wrapper",icon("question-circle", lib = "font-awesome"), |
|
240 |
+ h4("6. Upload annotation File", class = "icon-wrapper",icon("question-circle", lib = "font-awesome"), |
|
245 | 241 |
div("Upload manually created annotation file. This file maps MS runs to experiment metadata (i.e. conditions, bioreplicates). Please see Help tab for information on creating this file.",class = "icon-tooltip")), |
246 | 242 |
fileInput(ns('annot1'), "", multiple = FALSE, |
247 | 243 |
accept = c("text/csv", "text/comma-separated-values,text/plain", ".csv")) |
248 | 244 |
), |
249 | 245 |
## PTM input -- -------------------------------------------------------- |
250 | 246 |
conditionalPanel( |
251 |
- condition = "(input['loadpage-filetype'] == 'maxq' || input['loadpage-filetype'] == 'PD' || input['loadpage-filetype'] == 'spec' || input['loadpage-filetype'] == 'sky') && (input['loadpage-DDA_DIA'] == 'PTM' || input['loadpage-DDA_DIA'] == 'PTM_TMT')", |
|
247 |
+ condition = "(input['loadpage-filetype'] == 'maxq' || input['loadpage-filetype'] == 'PD' || input['loadpage-filetype'] == 'spec' || input['loadpage-filetype'] == 'sky') && (input['loadpage-BIO'] == 'PTM' || (input['loadpage-BIO'] == 'PTM' && input['loadpage-DDA_DIA'] == 'TMT'))", |
|
252 | 248 |
h4("4. Upload PTM input.txt File"), |
253 | 249 |
fileInput(ns('ptm_input'), "", multiple = FALSE, |
254 | 250 |
accept = c("text/csv",".xlsx", |
... | ... |
@@ -267,38 +263,32 @@ loadpageUI <- function(id) { |
267 | 263 |
accept = c("text/csv/xlsx", "text/comma-separated-values,text/plain", ".csv", ".xlsx")) |
268 | 264 |
), |
269 | 265 |
conditionalPanel( |
270 |
- condition = "(input['loadpage-filetype'] == 'maxq') && (input['loadpage-DDA_DIA'] == 'PTM' || input['loadpage-DDA_DIA'] == 'PTM_TMT')", |
|
266 |
+ condition = "(input['loadpage-filetype'] == 'maxq') && (input['loadpage-BIO'] == 'PTM' || (input['loadpage-BIO'] == 'PTM' && input['loadpage-DDA_DIA'] == 'TMT'))", |
|
271 | 267 |
h4("7. (Optional) Upload Unmodified Protein proteinGroups.txt File"), |
272 | 268 |
fileInput(ns('ptm_pgroup'), "", multiple = FALSE, |
273 | 269 |
accept = c("text/csv", "text/comma-separated-values,text/plain", ".csv")) |
274 | 270 |
), |
271 |
+ |
|
275 | 272 |
conditionalPanel( |
276 |
- condition = "(input['loadpage-filetype'] == 'maxq' || input['loadpage-filetype'] == 'PD') && (input['loadpage-DDA_DIA'] == 'PTM' || input['loadpage-DDA_DIA'] == 'PTM_TMT')", |
|
277 |
- radioButtons(ns("PTMTMT_maxq_pd"), |
|
278 |
- label = h4("TMT Experiment", class = "icon-wrapper",icon("question-circle", lib = "font-awesome"), |
|
279 |
- div("Indicate if experiment was processed using TMT labelin",class = "icon-tooltip")), |
|
280 |
- c(No='No', Yes='Yes'), |
|
281 |
- selected='Yes',inline = TRUE)), |
|
282 |
- conditionalPanel( |
|
283 |
- condition = "(input['loadpage-filetype'] == 'maxq') && (input['loadpage-DDA_DIA'] == 'PTM' || input['loadpage-DDA_DIA'] == 'PTM_TMT')", |
|
273 |
+ condition = "(input['loadpage-filetype'] == 'maxq') && (input['loadpage-BIO'] == 'PTM' || (input['loadpage-BIO'] == 'PTM' && input['loadpage-DDA_DIA'] == 'TMT'))", |
|
284 | 274 |
h4("Modification Label",class = "icon-wrapper",icon("question-circle", lib = "font-awesome"),div("Indicate if experiment was processed using TMT labeling",class = "icon-tooltip")), |
285 | 275 |
textInput(ns("mod_id_maxq"), "", |
286 | 276 |
value="\\(Phospho \\(STY\\)\\)") |
287 | 277 |
), |
288 | 278 |
conditionalPanel( |
289 |
- condition = "(input['loadpage-filetype'] == 'PD') && (input['loadpage-DDA_DIA'] == 'PTM' || input['loadpage-DDA_DIA'] == 'PTM_TMT')", |
|
279 |
+ condition = "(input['loadpage-filetype'] == 'PD') && (input['loadpage-BIO'] == 'PTM' || (input['loadpage-BIO'] == 'PTM' && input['loadpage-DDA_DIA'] == 'TMT'))", |
|
290 | 280 |
h4("Modification Label", class = "icon-wrapper",icon("question-circle", lib = "font-awesome"),div("Indicate if experiment was processed using TMT labeling",class = "icon-tooltip")), |
291 | 281 |
textInput(ns("mod_id_pd"), "", |
292 | 282 |
value="\\(Phospho\\)") |
293 | 283 |
), |
294 | 284 |
conditionalPanel( |
295 |
- condition = "(input['loadpage-filetype'] == 'spec') && (input['loadpage-DDA_DIA'] == 'PTM' || input['loadpage-DDA_DIA'] == 'PTM_TMT')", |
|
285 |
+ condition = "(input['loadpage-filetype'] == 'spec') && (input['loadpage-BIO'] == 'PTM' || (input['loadpage-BIO'] == 'PTM' && input['loadpage-DDA_DIA'] == 'TMT'))", |
|
296 | 286 |
h4("Modification Label",class = "icon-wrapper",icon("question-circle", lib = "font-awesome"),div("Indicate if experiment was processed using TMT labeling",class = "icon-tooltip")), |
297 | 287 |
textInput(ns("mod_id_spec"),"", |
298 | 288 |
value="\\[Phospho \\(STY\\)\\]") |
299 | 289 |
), |
300 | 290 |
conditionalPanel( |
301 |
- condition = "(input['loadpage-filetype'] == 'maxq' || input['loadpage-filetype'] == 'PD' || input['loadpage-filetype'] == 'spec' || input['loadpage-filetype'] == 'sky') && (input['loadpage-DDA_DIA'] == 'PTM' || input['loadpage-DDA_DIA'] == 'PTM_TMT')", |
|
291 |
+ condition = "(input['loadpage-filetype'] == 'maxq' || input['loadpage-filetype'] == 'PD' || input['loadpage-filetype'] == 'spec' || input['loadpage-filetype'] == 'sky') && (input['loadpage-BIO'] == 'PTM' || (input['loadpage-BIO'] == 'PTM' && input['loadpage-DDA_DIA'] == 'TMT'))", |
|
302 | 292 |
h4("FASTA file column name",class = "icon-wrapper",icon("question-circle", lib = "font-awesome"),div("Name of column in FASTA file that matches with Protein name column in input. It is critical the values in both columns match so that the modfication can be identified.",class = "icon-tooltip")), |
303 | 293 |
textInput(ns("mod_id_spec"),"", |
304 | 294 |
value="uniprot_iso") |
... | ... |
@@ -340,12 +330,12 @@ loadpageUI <- function(id) { |
340 | 330 |
# title = "Enter the column in your data containing protein names")), |
341 | 331 |
# value = "ProteinAccessions")), |
342 | 332 |
|
343 |
- conditionalPanel(condition = "input['loadpage-filetype'] && input['loadpage-DDA_DIA'] == 'DDA' && input['loadpage-filetype'] !== 'sample' && input['loadpage-filetype'] !== 'MRF'", |
|
333 |
+ conditionalPanel(condition = "input['loadpage-filetype'] && input['loadpage-DDA_DIA'] == 'LType' && input['loadpage-filetype'] !== 'sample' && input['loadpage-filetype'] !== 'MRF'", |
|
344 | 334 |
h4("Select the options for pre-processing"), |
345 | 335 |
checkboxInput(ns("uniqe_peptides"), "Use unique peptides", value = TRUE), |
346 | 336 |
checkboxInput(ns("remove"), "Remove proteins with 1 peptide and charge", value = FALSE)), |
347 | 337 |
|
348 |
- conditionalPanel(condition = "input['loadpage-filetype'] && input['loadpage-DDA_DIA'] == 'DIA' && input['loadpage-filetype'] !== 'sample'", |
|
338 |
+ conditionalPanel(condition = "input['loadpage-filetype'] && input['loadpage-DDA_DIA'] == 'LType' && input['loadpage-filetype'] !== 'sample'", |
|
349 | 339 |
checkboxInput(ns("remove"), "Remove proteins with 1 feature", value = FALSE), |
350 | 340 |
conditionalPanel(condition = "input['loadpage-filetype'] == 'sky' || input['loadpage-filetype'] == 'spec'|| input['loadpage-filetype'] == 'diann' ", |
351 | 341 |
checkboxInput(ns("q_val"), "Filter with Q-value"), |
... | ... |
@@ -27,7 +27,7 @@ qcServer <- function(input, output, session,parent_session, loadpage_input,get_d |
27 | 27 |
output$Names = renderUI({ |
28 | 28 |
ns <- session$ns |
29 | 29 |
if (input$standards == "Proteins") { |
30 |
- if((loadpage_input()$DDA_DIA=="SRM_PRM" && loadpage_input()$filetype=="sky")||(loadpage_input()$DDA_DIA=="DIA" && loadpage_input()$filetype=="ump")){ |
|
30 |
+ if((loadpage_input()$DDA_DIA=="LType" && loadpage_input()$filetype=="sky")||(loadpage_input()$DDA_DIA=="LType" && loadpage_input()$filetype=="ump")){ |
|
31 | 31 |
|
32 | 32 |
selectizeInput(ns("names"), "choose standard", unique(get_data()[2]), multiple = TRUE) |
33 | 33 |
} |
... | ... |
@@ -80,7 +80,7 @@ qcServer <- function(input, output, session,parent_session, loadpage_input,get_d |
80 | 80 |
# m_feat = 20 |
81 | 81 |
# } |
82 | 82 |
|
83 |
- if (loadpage_input()$DDA_DIA =="PTM"){ |
|
83 |
+ if (loadpage_input()$BIO =="PTM"){ |
|
84 | 84 |
m_feat = nrow(unique(get_data()$PTM[1])) |
85 | 85 |
} else { |
86 | 86 |
m_feat = nrow(unique(get_data()[1])) |
... | ... |
@@ -100,8 +100,10 @@ qcServer <- function(input, output, session,parent_session, loadpage_input,get_d |
100 | 100 |
|
101 | 101 |
output$Which = renderUI({ |
102 | 102 |
ns <- session$ns |
103 |
- if ((loadpage_input()$DDA_DIA!="PTM" && input$type1 == "QCPlot")) { |
|
104 |
- if((loadpage_input()$DDA_DIA=="SRM_PRM" && input$filetype=="sky") || (loadpage_input()$DDA_DIA=="DIA" && loadpage_input()$filetype=="ump")){ |
|
103 |
+ print("Inside render UI and getting input$type1") |
|
104 |
+ print(input$type1) |
|
105 |
+ if ((loadpage_input()$BIO!="PTM" && input$type1 == "QCPlot")) { |
|
106 |
+ if((loadpage_input()$DDA_DIA=="LType" && loadpage_input()$filetype=="sky") || (loadpage_input()$DDA_DIA=="LType" && loadpage_input()$filetype=="ump")){ |
|
105 | 107 |
selectizeInput(ns("which"), "Show plot for", |
106 | 108 |
choices = c("", "ALL PROTEINS" = "allonly", |
107 | 109 |
unique(get_data()[2]))) |
... | ... |
@@ -110,8 +112,8 @@ qcServer <- function(input, output, session,parent_session, loadpage_input,get_d |
110 | 112 |
choices = c("", "ALL PROTEINS" = "allonly", |
111 | 113 |
unique(get_data()[1]))) |
112 | 114 |
} |
113 |
- } else if (loadpage_input()$DDA_DIA == "PTM"){ |
|
114 |
- if (input$type1 == "QCPlot"){ |
|
115 |
+ } else if (loadpage_input()$BIO == "PTM"){ |
|
116 |
+ if (loadpage_input()$type1 == "QCPlot"){ |
|
115 | 117 |
selectizeInput(ns("which"), "Show plot for", |
116 | 118 |
choices = c("", "ALL PROTEINS" = "allonly", |
117 | 119 |
unique(get_data()$PTM[1]))) |
... | ... |
@@ -167,7 +169,7 @@ qcServer <- function(input, output, session,parent_session, loadpage_input,get_d |
167 | 169 |
address = file |
168 | 170 |
) |
169 | 171 |
|
170 |
- } else if (loadpage_input()$DDA_DIA == "PTM"){ |
|
172 |
+ } else if (loadpage_input()$BIO == "PTM"){ |
|
171 | 173 |
|
172 | 174 |
dataProcessPlotsPTM(preprocess_data(), |
173 | 175 |
type=input$type1, |
... | ... |
@@ -247,7 +249,7 @@ qcServer <- function(input, output, session,parent_session, loadpage_input,get_d |
247 | 249 |
|
248 | 250 |
observeEvent(input$run,{ |
249 | 251 |
|
250 |
- if(loadpage_input()$DDA_DIA=="PTM"){ |
|
252 |
+ if(loadpage_input()$BIO=="PTM"){ |
|
251 | 253 |
enable("prepr_csv_ptm") |
252 | 254 |
enable("summ_csv_ptm") |
253 | 255 |
enable("prepr_csv_prot") |
... | ... |
@@ -417,7 +419,7 @@ qcServer <- function(input, output, session,parent_session, loadpage_input,get_d |
417 | 419 |
type = input$typequant, |
418 | 420 |
format = input$format, |
419 | 421 |
use_log_file = FALSE) |
420 |
- } else if (loadpage_input()$DDA_DIA == "PTM" & (loadpage_input()$PTMTMT == "Yes" | loadpage_input()$filetype=='phil')){ |
|
422 |
+ } else if (loadpage_input()$BIO == "PTM" & ((loadpage_input()$BIO == "PTM" & loadpage_input()$DDA_DIA == "TMT") | loadpage_input()$filetype=='phil')){ |
|
421 | 423 |
temp = copy(preprocess_data()) |
422 | 424 |
setnames(temp$PTM$ProteinLevelData, |
423 | 425 |
c("Abundance", "Condition", "BioReplicate"), |
... | ... |
@@ -426,7 +428,7 @@ qcServer <- function(input, output, session,parent_session, loadpage_input,get_d |
426 | 428 |
type = input$typequant, |
427 | 429 |
format = input$format, |
428 | 430 |
use_log_file = FALSE) |
429 |
- } else if (loadpage_input()$DDA_DIA == "PTM" & loadpage_input()$PTMTMT == "No"){ |
|
431 |
+ } else if (loadpage_input()$BIO == "PTM" & (loadpage_input()$BIO == "PTM" & loadpage_input()$DDA_DIA != "TMT")){ |
|
430 | 432 |
temp = copy(preprocess_data()) |
431 | 433 |
abundant$results =quantification(temp$PTM, |
432 | 434 |
type = input$typequant, |
... | ... |
@@ -22,12 +22,12 @@ qcUI <- function(id) { |
22 | 22 |
tags$br(), |
23 | 23 |
sidebarPanel( |
24 | 24 |
# transformation |
25 |
- conditionalPanel(condition = "input['loadpage-DDA_DIA'] == 'TMT' || (input['loadpage-DDA_DIA'] == 'PTM' && input['loadpage-PTMTMT'] == 'Yes')", |
|
25 |
+ conditionalPanel(condition = "input['loadpage-DDA_DIA'] == 'TMT' || (input['loadpage-BIO'] == 'PTM' && (input['loadpage-BIO'] == 'PTM' && input['loadpage-DDA_DIA'] == 'TMT'))", |
|
26 | 26 |
h4("1. Peptide level normalization",class = "icon-wrapper",icon("question-circle", lib = "font-awesome"), |
27 | 27 |
div("Global median normalization on peptide level data, equalizes medians across all the channels and runs", class = "icon-tooltip")), |
28 | 28 |
checkboxInput(ns("global_norm"), "Yes", value = TRUE)), |
29 | 29 |
|
30 |
- conditionalPanel(condition = "input['loadpage-DDA_DIA'] == 'SRM_PRM' || input['loadpage-DDA_DIA'] == 'DDA' || input['loadpage-DDA_DIA'] == 'DIA' || (input['loadpage-DDA_DIA'] == 'PTM' && input['loadpage-PTMTMT'] == 'No')", |
|
30 |
+ conditionalPanel(condition = "input['loadpage-DDA_DIA'] == 'LType' || (input['loadpage-BIO'] == 'PTM' && (input['loadpage-BIO'] == 'PTM' && input['loadpage-DDA_DIA'] != 'TMT'))", |
|
31 | 31 |
radioButtons(ns("log"), |
32 | 32 |
label = h4("1. Log transformation",class = "icon-wrapper",icon("question-circle", lib = "font-awesome"), |
33 | 33 |
div("Logarithmic transformation applied to the Intensity column", class = "icon-tooltip")), |
... | ... |
@@ -36,7 +36,7 @@ qcUI <- function(id) { |
36 | 36 |
|
37 | 37 |
tags$hr(), |
38 | 38 |
|
39 |
- conditionalPanel(condition = "input['loadpage-DDA_DIA'] == 'TMT' || (input['loadpage-DDA_DIA'] == 'PTM' && input['loadpage-PTMTMT'] == 'Yes')", |
|
39 |
+ conditionalPanel(condition = "input['loadpage-DDA_DIA'] == 'TMT' || (input['loadpage-BIO'] == 'PTM' && (input['loadpage-BIO'] == 'PTM' && input['loadpage-DDA_DIA'] == 'TMT'))", |
|
40 | 40 |
selectInput(ns("summarization"), |
41 | 41 |
h4("2. Summarization method",class = "icon-wrapper",icon("question-circle", lib = "font-awesome"), |
42 | 42 |
div("Select method to be used for protein summarization. For details on each option please see Help tab", class = "icon-tooltip")), |
... | ... |
@@ -45,35 +45,35 @@ qcUI <- function(id) { |
45 | 45 |
"Log(Sum)" = "LogSum","Median" = "Median"), |
46 | 46 |
selected = "log")), |
47 | 47 |
|
48 |
- conditionalPanel(condition = "(input['loadpage-DDA_DIA'] == 'TMT' || (input['loadpage-DDA_DIA'] == 'PTM' && input['loadpage-PTMTMT'] == 'Yes')) && input['qc-summarization'] == 'msstats'", |
|
48 |
+ conditionalPanel(condition = "(input['loadpage-DDA_DIA'] == 'TMT' || (input['loadpage-BIO'] == 'PTM' && (input['loadpage-BIO'] == 'PTM' && input['loadpage-DDA_DIA'] == 'TMT'))) && input['qc-summarization'] == 'msstats'", |
|
49 | 49 |
checkboxInput(ns("null"), label =tags$div("Do not apply cutoff",class = "icon-wrapper",icon("question-circle", lib = "font-awesome"), |
50 | 50 |
div("Maximum quantile for deciding censored missing values, default is 0.999", class = "icon-tooltip")) |
51 | 51 |
), |
52 | 52 |
numericInput(ns("maxQC"), NULL, 0.999, 0.000, 1.000, 0.001)), |
53 | 53 |
|
54 | 54 |
# Normalization |
55 |
- conditionalPanel(condition = "input['loadpage-DDA_DIA'] == 'SRM_PRM' || input['loadpage-DDA_DIA'] == 'DDA' || input['loadpage-DDA_DIA'] == 'DIA'", |
|
55 |
+ conditionalPanel(condition = "input['loadpage-DDA_DIA'] == 'LType'", |
|
56 | 56 |
selectInput(ns("norm"), |
57 | 57 |
label = h4("2. Normalization",class = "icon-wrapper",icon("question-circle", lib = "font-awesome"), |
58 | 58 |
div("Normalization to remove systematic bias between MS runs. For more information visit the Help tab", class = "icon-tooltip")), |
59 | 59 |
c("none" = "FALSE", "equalize medians" = "equalizeMedians", |
60 | 60 |
"quantile" = "quantile", "global standards" = "globalStandards"), |
61 | 61 |
selected = "equalizeMedians")), |
62 |
- conditionalPanel(condition = "input['loadpage-DDA_DIA'] == 'PTM' && input['loadpage-PTMTMT'] == 'No'", |
|
62 |
+ conditionalPanel(condition = "input['loadpage-BIO'] == 'PTM' && (input['loadpage-BIO'] == 'PTM' && input['loadpage-DDA_DIA'] != 'TMT')", |
|
63 | 63 |
selectInput(ns("norm"), |
64 | 64 |
label = h4("2. Normalization",class = "icon-wrapper",icon("question-circle", lib = "font-awesome"), |
65 | 65 |
div("Normalization to remove systematic bias between MS runs. For more information visit the Help tab", class = "icon-tooltip")), |
66 | 66 |
c("none" = "FALSE", "equalize medians" = "equalizeMedians", |
67 | 67 |
"quantile" = "quantile"), |
68 | 68 |
selected = "equalizeMedians")), |
69 |
- conditionalPanel(condition = "input['qc-norm'] == 'globalStandards' && (input['loadpage-DDA_DIA'] !== 'PTM' && input['loadpage-DDA_DIA'] !== 'TMT')", |
|
69 |
+ conditionalPanel(condition = "input['qc-norm'] == 'globalStandards' && (input['loadpage-BIO'] !== 'PTM' && input['loadpage-DDA_DIA'] !== 'TMT')", |
|
70 | 70 |
radioButtons(ns("standards"), "Choose type of standards", |
71 | 71 |
c("Proteins", "Peptides")), |
72 | 72 |
uiOutput(ns("Names"))), |
73 | 73 |
tags$hr(), |
74 | 74 |
|
75 | 75 |
conditionalPanel( |
76 |
- condition = "input['loadpage-DDA_DIA'] == 'TMT' || (input['loadpage-DDA_DIA'] == 'PTM' && input['loadpage-PTMTMT'] == 'Yes')", |
|
76 |
+ condition = "input['loadpage-DDA_DIA'] == 'TMT' || (input['loadpage-BIO'] == 'PTM' && (input['loadpage-BIO'] == 'PTM' && input['loadpage-DDA_DIA'] == 'TMT'))", |
|
77 | 77 |
h4("3. Local protein normalization",class = "icon-wrapper",icon("question-circle", lib = "font-awesome"), |
78 | 78 |
div("Reference channel based normalization between MS runs on protein level data. Requires one reference channel in each MS run, annotated by 'Norm' in Condition column of annotation file", class = "icon-tooltip")), |
79 | 79 |
checkboxInput(ns("reference_norm"), "Yes", value = TRUE), |
... | ... |
@@ -85,7 +85,7 @@ qcUI <- function(id) { |
85 | 85 |
|
86 | 86 |
|
87 | 87 |
conditionalPanel( |
88 |
- condition = "input['loadpage-DDA_DIA'] == 'DDA' || input['loadpage-DDA_DIA'] == 'DIA' || input['loadpage-DDA_DIA'] == 'SRM_PRM' || (input['loadpage-DDA_DIA'] == 'PTM' && input['loadpage-PTMTMT'] == 'No')", |
|
88 |
+ condition = "input['loadpage-DDA_DIA'] == 'LType' || (input['loadpage-BIO'] == 'PTM' && (input['loadpage-BIO'] == 'PTM' && input['loadpage-DDA_DIA'] != 'TMT'))", |
|
89 | 89 |
|
90 | 90 |
# features |
91 | 91 |
|
... | ... |
@@ -242,11 +242,11 @@ qcUI <- function(id) { |
242 | 242 |
# tags$h4("Calculation in progress...")), |
243 | 243 |
#tags$div(id='download_buttons') |
244 | 244 |
tags$br(), |
245 |
- conditionalPanel(condition="input['loadpage-DDA_DIA'] !== 'PTM'", |
|
245 |
+ conditionalPanel(condition="input['loadpage-BIO'] !== 'PTM'", |
|
246 | 246 |
disabled(downloadButton(ns("prepr_csv"),"Download .csv of feature level data")), |
247 | 247 |
disabled(downloadButton(ns("summ_csv"),"Download .csv of protein level data")) |
248 | 248 |
), |
249 |
- conditionalPanel(condition="input['loadpage-DDA_DIA'] == 'PTM'", |
|
249 |
+ conditionalPanel(condition="input['loadpage-BIO'] == 'PTM'", |
|
250 | 250 |
disabled(downloadButton(ns("prepr_csv_ptm"),"Download .csv of PTM feature level data")), |
251 | 251 |
disabled(downloadButton(ns("summ_csv_ptm"),"Download .csv of PTM level data")), |
252 | 252 |
tags$br(), |
... | ... |
@@ -20,9 +20,9 @@ statmodelServer <- function(input, output, session,parent_session, loadpage_inpu |
20 | 20 |
# choices of groups for contrast matrix |
21 | 21 |
|
22 | 22 |
choices = reactive({ |
23 |
- if (loadpage_input()$DDA_DIA == "PTM" & (loadpage_input()$PTMTMT == "Yes" | loadpage_input()$filetype=='phil')){ |
|
23 |
+ if (loadpage_input()$BIO == "PTM" & ((loadpage_input()$BIO == "PTM" & loadpage_input()$DDA_DIA == "TMT") | loadpage_input()$filetype=='phil')){ |
|
24 | 24 |
levels(preprocess_data()$PTM$ProteinLevelData$Condition) |
25 |
- } else if(loadpage_input()$DDA_DIA == "PTM" & loadpage_input()$PTMTMT == "No"){ |
|
25 |
+ } else if(loadpage_input()$BIO == "PTM" & (loadpage_input()$BIO == "PTM" & loadpage_input()$DDA_DIA != "TMT")){ |
|
26 | 26 |
levels(preprocess_data()$PTM$ProteinLevelData$GROUP) |
27 | 27 |
} else if(loadpage_input()$DDA_DIA=="TMT"){ |
28 | 28 |
levels(preprocess_data()$ProteinLevelData$Condition) |
... | ... |
@@ -39,7 +39,7 @@ statmodelServer <- function(input, output, session,parent_session, loadpage_inpu |
39 | 39 |
|
40 | 40 |
|
41 | 41 |
observe({ |
42 |
- if(loadpage_input()$DDA_DIA == "TMT" | loadpage_input()$DDA_DIA == "PTM"){ |
|
42 |
+ if(loadpage_input()$DDA_DIA == "TMT" | loadpage_input()$BIO == "PTM"){ |
|
43 | 43 |
hide("Design") |
44 | 44 |
} |
45 | 45 |
else{ |
... | ... |
@@ -302,8 +302,8 @@ statmodelServer <- function(input, output, session,parent_session, loadpage_inpu |
302 | 302 |
remove_norm_channel = TRUE, |
303 | 303 |
remove_empty_channel = TRUE |
304 | 304 |
)\n", sep = "") |
305 |
- } else if (loadpage_input()$DDA_DIA == "PTM"){ |
|
306 |
- if (loadpage_input()$PTMTMT == "Yes" | loadpage_input()$filetype=='phil'){ |
|
305 |
+ } else if (loadpage_input()$BIO == "PTM"){ |
|
306 |
+ if ((loadpage_input()$BIO == "PTM" & loadpage_input()$DDA_DIA == "TMT") | loadpage_input()$filetype=='phil'){ |
|
307 | 307 |
dt = "TMT" |
308 | 308 |
} else { |
309 | 309 |
dt = "LabelFree" |
... | ... |
@@ -318,7 +318,7 @@ statmodelServer <- function(input, output, session,parent_session, loadpage_inpu |
318 | 318 |
codes = paste(codes, "\n# Model-based comparison\n", sep = "") |
319 | 319 |
codes = paste(codes,"model = MSstats::groupComparison(contrast.matrix, summarized)\n", sep = "") |
320 | 320 |
} |
321 |
- if (loadpage_input()$DDA_DIA == "PTM"){ |
|
321 |
+ if (loadpage_input()$BIO == "PTM"){ |
|
322 | 322 |
codes = paste(codes, "groupComparisonPlotsPTM(data=model, |
323 | 323 |
type=\"Enter VolcanoPlot, Heatmap, or ComparisonPlot\", |
324 | 324 |
which.Comparison=\"all\", |
... | ... |
@@ -345,14 +345,15 @@ statmodelServer <- function(input, output, session,parent_session, loadpage_inpu |
345 | 345 |
} |
346 | 346 |
|
347 | 347 |
SignificantProteins = eventReactive(input$calculate,{ |
348 |
- if (loadpage_input()$DDA_DIA == "PTM"){ |
|
348 |
+ if (loadpage_input()$BIO == "PTM"){ |
|
349 |
+ |
|
349 | 350 |
data_comp = data_comparison() |
350 | 351 |
sig_unadj = data_comp$PTM.Model[ |
351 |
- data_comp$PTM.Model$adj.pvalue < input$signif] |
|
352 |
+ data_comp$PTM.Model$adj.pvalue < input$signif,] |
|
352 | 353 |
sig_prot = data_comp$PROTEIN.Model[ |
353 |
- data_comp$PROTEIN.Model$adj.pvalue < input$signif] |
|
354 |
+ data_comp$PROTEIN.Model$adj.pvalue < input$signif,] |
|
354 | 355 |
sig_adj = data_comp$ADJUSTED.Model[ |
355 |
- data_comp$ADJUSTED.Model$adj.pvalue < input$signif] |
|
356 |
+ data_comp$ADJUSTED.Model$adj.pvalue < input$signif,] |
|
356 | 357 |
significant = list(PTM.Model=sig_unadj, |
357 | 358 |
PROTEIN.Model=sig_prot, |
358 | 359 |
ADJUSTED.Model=sig_adj) |
... | ... |
@@ -387,7 +388,7 @@ statmodelServer <- function(input, output, session,parent_session, loadpage_inpu |
387 | 388 |
return(path1_id) |
388 | 389 |
} |
389 | 390 |
|
390 |
- if (loadpage_input()$DDA_DIA=="PTM"){ |
|
391 |
+ if (loadpage_input()$BIO=="PTM"){ |
|
391 | 392 |
plot1 = groupComparisonPlotsPTM(data_comparison(), |
392 | 393 |
input$typeplot, |
393 | 394 |
sig=input$sig, |
... | ... |
@@ -76,7 +76,7 @@ statmodelUI <- function(id) { |
76 | 76 |
p("Please add a comparison matrix before modeling."), |
77 | 77 |
disabled(actionButton(ns("calculate"), "Start")), |
78 | 78 |
tags$hr(), |
79 |
- conditionalPanel(condition = "input['loadpage-DDA_DIA'] == 'TMT' || (input['loadpage-PTMTMT'] == 'Yes')", |
|
79 |
+ conditionalPanel(condition = "input['loadpage-DDA_DIA'] == 'TMT' || (input['loadpage-BIO'] == 'PTM' && input['loadpage-DDA_DIA'] == 'TMT')", |
|
80 | 80 |
radioButtons(ns("moderated"), |
81 | 81 |
label= h4("Empirical Bayes moderation",class = "icon-wrapper",icon("question-circle", lib = "font-awesome"), |
82 | 82 |
div("TRUE will moderate t statistic; FALSE (default) uses ordinary t statistic.", class = "icon-tooltip")), |
... | ... |
@@ -154,7 +154,7 @@ statmodelUI <- function(id) { |
154 | 154 |
Volcano Plot comparison, you must save the results \ |
155 | 155 |
as a pdf."), |
156 | 156 |
conditionalPanel( |
157 |
- condition = "input['loadpage-DDA_DIA'] !== 'PTM'", |
|
157 |
+ condition = "input['loadpage-BIO'] !== 'PTM'", |
|
158 | 158 |
actionButton(ns("viewresults"), |
159 | 159 |
"View plot in browser (only for one \ |
160 | 160 |
comparison/protein)")), |
... | ... |
@@ -172,7 +172,7 @@ statmodelUI <- function(id) { |
172 | 172 |
tags$br(), |
173 | 173 |
)), |
174 | 174 |
uiOutput(ns("matrix")), |
175 |
- conditionalPanel(condition = "input['loadpage-DDA_DIA']=='PTM'", |
|
175 |
+ conditionalPanel(condition = "input['loadpage-BIO']=='PTM'", |
|
176 | 176 |
tabsetPanel( |
177 | 177 |
tabPanel("Adjusted PTM Results", |
178 | 178 |
uiOutput(ns("adj_table_results"))), |
... | ... |
@@ -182,7 +182,7 @@ statmodelUI <- function(id) { |
182 | 182 |
uiOutput(ns("prot_table_results"))) |
183 | 183 |
) |
184 | 184 |
), |
185 |
- conditionalPanel(condition = "input['loadpage-DDA_DIA']!=='PTM'", |
|
185 |
+ conditionalPanel(condition = "input['loadpage-BIO']!=='PTM'", |
|
186 | 186 |
uiOutput(ns("table_results")) |
187 | 187 |
), |
188 | 188 |
tags$br(), |
... | ... |
@@ -40,12 +40,12 @@ server <- function(input, output, session) { |
40 | 40 |
# output$statmodel = renderUI(statmodel()) |
41 | 41 |
# |
42 | 42 |
observe({ |
43 |
- if(input$"loadpage-DDA_DIA" %in% c("TMT", "PTM")){ |
|
43 |
+ if(input$"loadpage-DDA_DIA" %in% c("TMT") && input$"loadpage-BIO" %in% c("PTM") ){ |
|
44 | 44 |
hideTab(inputId = "tablist", target = "PQ") |
45 | 45 |
hideTab(inputId = "tablist", target = "Future") |
46 | 46 |
} |
47 | 47 |
|
48 |
- if(!(input$"loadpage-DDA_DIA" %in% c("TMT", "PTM"))){ |
|
48 |
+ if(!(input$"loadpage-DDA_DIA" %in% c("TMT")) && !(input$"loadpage-BIO" %in% c("PTM"))){ |
|
49 | 49 |
showTab(inputId = "tablist", target = "PQ") |
50 | 50 |
showTab(inputId = "tablist", target = "Future") |
51 | 51 |
} |
... | ... |
@@ -156,6 +156,7 @@ getAnnot2 <- function(input) { |
156 | 156 |
} |
157 | 157 |
|
158 | 158 |
getAnnot <- function(input) { |
159 |
+ print("Inside Annot"); |
|
159 | 160 |
annot = input$annot |
160 | 161 |
if(is.null(annot)) { |
161 | 162 |
return(NULL) |
... | ... |
@@ -211,33 +212,33 @@ getData <- function(input) { |
211 | 212 |
return(NULL) |
212 | 213 |
} |
213 | 214 |
if(input$filetype == 'sample') { |
214 |
- if(input$DDA_DIA == "SRM_PRM") { |
|
215 |
+ if(input$BIO != "PTM" && input$DDA_DIA =='LType' && input$LabelFreeType == "SRM_PRM") { |
|
215 | 216 |
mydata = MSstats::DDARawData |
216 | 217 |
} |
217 |
- else if(input$DDA_DIA == "DDA") { |
|
218 |
+ else if(input$BIO != "PTM" && input$DDA_DIA == 'LType' && input$LabelFreeType == "DDA") { |
|
218 | 219 |
mydata = MSstats::DDARawData |
219 | 220 |
} |
220 |
- else if(input$DDA_DIA == "DIA"){ |
|
221 |
+ else if(input$BIO != "PTM" && input$DDA_DIA =='LType' && input$LabelFreeType == "DIA"){ |
|
221 | 222 |
mydata = read.csv(system.file("extdata/dataset.csv", |
222 | 223 |
package = "MSstatsShiny"), |
223 | 224 |
header = TRUE, sep = ";") |
224 | 225 |
} |
225 |
- else if(input$DDA_DIA == "TMT"){ |
|
226 |
+ else if(input$BIO != "PTM" && input$DDA_DIA == "TMT"){ |
|
226 | 227 |
mydata = PDtoMSstatsTMTFormat(input = MSstatsTMT::raw.pd, |
227 | 228 |
annotation = MSstatsTMT::annotation.pd, |
228 | 229 |
which.proteinid = input$which.proteinid, |
229 | 230 |
use_log_file = FALSE |
230 | 231 |
) |
231 | 232 |
} |
232 |
- else if (input$DDA_DIA == "PTM"){ |
|
233 |
- if (input$PTMTMT == "No"){ |
|
233 |
+ else if (input$BIO == "PTM"){ |
|
234 |
+ if (input$DDA_DIA != "TMT"){ |
|
234 | 235 |
mydata = MSstatsPTM::raw.input |
235 | 236 |
} else { |
236 | 237 |
mydata = MSstatsPTM::raw.input.tmt |
237 | 238 |
} |
238 | 239 |
} |
239 | 240 |
} |
240 |
- else if (input$DDA_DIA %in% c("PTM", "PTM_TMT")){ |
|
241 |
+ else if (input$BIO == 'PTM' || (input$BIO == 'PTM' && input$DDA_DIA == 'TMT')){ |
|
241 | 242 |
if (input$filetype == 'maxq') { |
242 | 243 |
mydata = read.csv(input$ptm_input$datapath,sep="\t") |
243 | 244 |
print(input$globaldata$datapath) |
... | ... |
@@ -251,7 +252,7 @@ getData <- function(input) { |
251 | 252 |
|
252 | 253 |
pg_maxq_ptm = try(read.csv(input$ptm_pgroup$datapath, sep="\t"),silent=TRUE) |
253 | 254 |
annotation = try(read.csv(input$ptm_annot$datapath),silent=TRUE) |
254 |
- if (input$PTMTMT_maxq_pd == "Yes"){ |
|
255 |
+ if (input$BIO == "PTM" && input$DDA_DIA == "TMT"){ |
|
255 | 256 |
label = "TMT" |
256 | 257 |
} else { |
257 | 258 |
label = "LF" |
... | ... |
@@ -304,7 +305,7 @@ getData <- function(input) { |
304 | 305 |
use_unmod_peptides=FALSE |
305 | 306 |
} |
306 | 307 |
|
307 |
- if (input$PTMTMT_maxq_pd == "Yes"){ |
|
308 |
+ if (input$BIO == "PTM" && input$DDA_DIA == "TMT"){ |
|
308 | 309 |
label = "TMT" |
309 | 310 |
} else { |
310 | 311 |
label = "LF" |
... | ... |
@@ -377,7 +378,7 @@ getData <- function(input) { |
377 | 378 |
if(input$filetype=='spec' || input$filetype=='spmin'){ |
378 | 379 |
infile = input$data1 |
379 | 380 |
} |
380 |
- else if(input$filetype=='phil' & input$DDA_DIA != "PTM"){ |
|
381 |
+ else if(input$filetype=='phil' & input$BIO != "PTM"){ |
|
381 | 382 |
mydata = read.csv(input$data$datapath) |
382 | 383 |
|
383 | 384 |
} |
... | ... |
@@ -416,28 +417,6 @@ getData <- function(input) { |
416 | 417 |
data = read.csv(input$skylinedata$datapath, header = TRUE, sep = input$sep, |
417 | 418 |
stringsAsFactors=FALSE) |
418 | 419 |
# } |
419 |
- if(input$DDA_DIA=="DDA" ){ |
|
420 |
- data = data[which(data$Fragment.Ion %in% c("precursor", |
|
421 |
- "precursor [M+1]", |
|
422 |
- "precursor [M+2]")),] |
|
423 |
- |
|
424 |
- mydata = SkylinetoMSstatsFormat(data, |
|
425 |
- annotation = getAnnot(input), |
|
426 |
- fewMeasurements="remove", |
|
427 |
- removeProtein_with1Feature = input$remove, |
|
428 |
- use_log_file = FALSE) |
|
429 |
- } |
|
430 |
- else if(input$DDA_DIA=="DIA"){ |
|
431 |
- mydata = SkylinetoMSstatsFormat(data, |
|
432 |
- annotation = getAnnot(input), |
|
433 |
- filter_with_Qvalue = TRUE, |
|
434 |
- qvalue_cutoff = 0.01, |
|
435 |
- fewMeasurements="remove", |
|
436 |
- removeProtein_with1Feature = TRUE, |
|
437 |
- use_log_file = FALSE) |
|
438 |
- |
|
439 |
- } |
|
440 |
- else if(input$DDA_DIA=="SRM_PRM") { |
|
441 | 420 |
mydata = SkylinetoMSstatsFormat(data, |
442 | 421 |
annotation = getAnnot(input), |
443 | 422 |
filter_with_Qvalue = TRUE, |
... | ... |
@@ -445,8 +424,6 @@ getData <- function(input) { |
445 | 424 |
fewMeasurements="remove", |
446 | 425 |
removeProtein_with1Feature = TRUE, |
447 | 426 |
use_log_file = FALSE) |
448 |
- } |
|
449 |
- |
|
450 | 427 |
} |
451 | 428 |
else if(input$filetype == 'maxq') { |
452 | 429 |
cat(file=stderr(), "Reached in maxq\n") |
... | ... |
@@ -546,6 +523,8 @@ getData <- function(input) { |
546 | 523 |
qvalue_cutoff = 0.01, ## same as default |
547 | 524 |
removeProtein_with1Feature = TRUE, |
548 | 525 |
use_log_file = FALSE) |
526 |
+ print("Mydata from mstats") |
|
527 |
+ print(mydata) |
|
549 | 528 |
} |
550 | 529 |
else if(input$filetype == 'open') { |
551 | 530 |
|
... | ... |
@@ -628,11 +607,12 @@ getData <- function(input) { |
628 | 607 |
} |
629 | 608 |
|
630 | 609 |
|
631 |
- if (input$level == "Peptide"){ |
|
610 |
+ if (input$BIO == "Peptide"){ |
|
632 | 611 |
mydata$ProteinName = mydata$PeptideSequence |
633 | 612 |
} |
634 | 613 |
|
635 | 614 |
remove_modal_spinner() |
615 |
+ |
|
636 | 616 |
return(mydata) |
637 | 617 |
} |
638 | 618 |
|
... | ... |
@@ -647,30 +627,30 @@ library(MSstatsPTM)\n", sep = "") |
647 | 627 |
"\n# MSstatsPTM version ", packageVersion("MSstatsPTM"), sep = "") |
648 | 628 |
codes = paste(codes, "\n\n# Read data\n", sep = "") |
649 | 629 |
if(input$filetype == 'sample') { |
650 |
- if(input$DDA_DIA == "SRM_PRM") { |
|
630 |
+ if(input$BIO != "PTM" && input$DDA_DIA =='LType' && input$LabelFreeType == "SRM_PRM") { |
|
651 | 631 |
codes = paste(codes, "data = SRM_yeast\n", sep = "") |
652 | 632 |
} |
653 |
- else if(input$DDA_DIA == "DDA") { |
|
633 |
+ else if(input$BIO != "PTM" && input$DDA_DIA =='LType' && input$LabelFreeType == "DDA") { |
|
654 | 634 |
codes = paste(codes, "data = DDARawData\n", sep = "") |
655 | 635 |
} |
656 |
- else if(input$DDA_DIA == "DIA"){ |
|
636 |
+ else if(input$BIO != "PTM" && input$DDA_DIA =='LType' && input$LabelFreeType == "DIA"){ |
|
657 | 637 |
codes = paste(codes, "data = read.csv(\"dataset.csv\", header = TRUE, sep = \";\")\n", sep = "") |
658 | 638 |
} |
659 |
- else if(input$DDA_DIA == "TMT"){ |
|
639 |
+ else if(input$BIO != "PTM" && input$DDA_DIA == "TMT"){ |
|
660 | 640 |
codes = paste(codes, "data = PDtoMSstatsTMTFormat(input = MSstatsTMT::raw.pd, |
661 | 641 |
annotation = MSstatsTMT::annotation.pd, |
662 | 642 |
which.proteinid =\'", input$which.proteinid,"\',\n\t\t\t\t ", |
663 | 643 |
"use_log_file = FALSE)\n", sep = "") |
664 |
- } else if (input$DDA_DIA == "PTM") { |
|
665 |
- if (input$PTMTMT == "Yes"){ |
|
644 |
+ } else if (input$BIO == "PTM") { |
|
645 |
+ if (input$BIO == "PTM" && input$DDA_DIA == "TMT"){ |
|
666 | 646 |
codes = paste(codes, "data = MSstatsPTM::raw.input.tmt\n", sep = "") |
667 |
- } else if (input$PTMTMT == "No"){ |
|
647 |
+ } else if (input$BIO == "PTM" && input$DDA_DIA != "TMT"){ |
|
668 | 648 |
codes = paste(codes, "data = MSstatsPTM::raw.input\n", sep = "") |
669 | 649 |
} |
670 | 650 |
} |
671 | 651 |
|
672 | 652 |
} else if (input$filetype == "msstats") { |
673 |
- if (input$DDA_DIA == "PTM") { |
|
653 |
+ if (input$BIO == "PTM") { |
|
674 | 654 |
codes = paste(codes, "\nptm_data = read.csv(\'Enter PTM data file path here\')\nglobal_data = read.csv(\'Enter unmod data file path here\')\ndata = list(PTM = ptm_data, PROTEIN = unmod)\n") |
675 | 655 |
} else { |
676 | 656 |
codes = paste(codes, "data = read.csv(\'Enter MSstats formatted data file path here\')\n") |
... | ... |
@@ -716,7 +696,7 @@ library(MSstatsPTM)\n", sep = "") |
716 | 696 |
annotation=an_maxq, |
717 | 697 |
proteinGroups=\'", input$which.proteinid,"\',\n\t\t\t\t ", |
718 | 698 |
"use_log_file = FALSE)\n", sep = "") |
719 |
- } else if (input$DDA_DIA=="PTM"){ |
|
699 |
+ } else if (input$BIO=="PTM"){ |
|
720 | 700 |
codes = paste(codes, "sites.data = read.csv(\"insert your PTM site data filepath\")\n data = MaxQtoMSstatsPTMFormat(sites.data, an_maxq, ev_maxq, pg_maxq, an_maxq)\n", |
721 | 701 |
sep="") |
722 | 702 |
} else { |
... | ... |
@@ -829,7 +809,7 @@ library(MSstatsPTM)\n", sep = "") |
829 | 809 |
|
830 | 810 |
codes = paste(codes, "data = PhilosophertoMSstatsTMTFormat(data, |
831 | 811 |
annotation = annot_file)\n", sep = "") |
832 |
- }else if (input$filetype == 'phil' & input$DDA_DIA == "PTM"){ |
|
812 |
+ }else if (input$filetype == 'phil' & input$BIO == "PTM"){ |
|
833 | 813 |
codes = paste(codes,"data = read.csv(\"insert your msstats filepath\")\n" |
834 | 814 |
, sep = "") |
835 | 815 |
codes = paste(codes,"annot_file = read.csv(\"insert your annotation filepath\")\n" |
... | ... |
@@ -851,7 +831,7 @@ library(MSstatsPTM)\n", sep = "") |
851 | 831 |
} |
852 | 832 |
} |
853 | 833 |
|
854 |
- if (input$DDA_DIA != "PTM"){ |
|
834 |
+ if (input$BIO != "PTM"){ |
|
855 | 835 |
codes = paste(codes,"data = unique(as.data.frame(data))\n", sep = "") |
856 | 836 |
} |
857 | 837 |
return(codes) |
... | ... |
@@ -862,13 +842,13 @@ getSummary1 <- function(input, df,annot_df) { |
862 | 842 |
# df = getData(input) |
863 | 843 |
print("+++++++++ In getSummary1 +++++++++") |
864 | 844 |
# annot_df = getAnnot(input) |
865 |
- if (input$DDA_DIA != "PTM"){ |
|
845 |
+ if (input$BIO != "PTM"){ |
|
866 | 846 |
df = as.data.frame(df) |
867 | 847 |
df = df %>% filter(!Condition %in% c("Norm", "Empty")) |
868 | 848 |
nf = ifelse("Fraction" %in% colnames(df),n_distinct(df$Fraction),1) |
869 | 849 |
} |
870 | 850 |
|
871 |
- if(input$DDA_DIA=="TMT"){ |
|
851 |
+ if(input$BIO != "PTM" && input$DDA_DIA=="TMT"){ |
|
872 | 852 |
if(is.null(annot_df)){ |
873 | 853 |
df1 = df %>% summarise("Number of Conditions" = n_distinct(Condition), |
874 | 854 |
"Number of Biological Replicates" = n_distinct(BioReplicate), |
... | ... |
@@ -886,10 +866,10 @@ getSummary1 <- function(input, df,annot_df) { |
886 | 866 |
"Number of Technical Replicates" = n_distinct(TechRepMixture)) |
887 | 867 |
} |
888 | 868 |
|
889 |
- } else if (input$DDA_DIA == "PTM"){ |
|
869 |
+ } else if (input$BIO == "PTM"){ |
|
890 | 870 |
ptm_df = as.data.frame(df$PTM) |
891 | 871 |
unmod_df = as.data.frame(df$PROTEIN) |
892 |
- if (input$PTMTMT == "Yes" | input$filetype=='phil'){ |
|
872 |
+ if ((input$BIO == "PTM" & input$DDA_DIA == "TMT") | input$filetype=='phil'){ |
|
893 | 873 |
|
894 | 874 |
ptm_df1 = ptm_df %>% summarise("Number of Conditions" = n_distinct(Condition), |
895 | 875 |
"Number of PTM Mixtures" = n_distinct(Mixture), |
... | ... |
@@ -921,7 +901,7 @@ getSummary1 <- function(input, df,annot_df) { |
921 | 901 |
) |
922 | 902 |
} |
923 | 903 |
|
924 |
- if (input$DDA_DIA != "PTM"){ |
|
904 |
+ if (input$BIO != "PTM"){ |
|
925 | 905 |
df2 = df %>% group_by(Condition, Run) %>% summarise("Condition_Run" = n()) %>% ungroup() %>% |
926 | 906 |
select("Condition_Run") |
927 | 907 |
df3 = df %>% group_by(Run, BioReplicate) %>% summarise("BioReplicate_Run" = n()) %>% ungroup() %>% |
... | ... |
@@ -956,18 +936,18 @@ getSummary1 <- function(input, df,annot_df) { |
956 | 936 |
getSummary2 <- function(input,df) { |
957 | 937 |
# df = getData(input) |
958 | 938 |
print("+++++++++ In getSummary2 +++++++++") |
959 |
- print(input$PTMTMT) |
|
960 |
- if(input$DDA_DIA=="TMT"){ |
|
939 |
+ #print(input$PTMTMT) |
|
940 |
+ if(input$BIO != "PTM" && input$DDA_DIA=="TMT"){ |
|
961 | 941 |
df = as.data.frame(df) |
962 | 942 |
df = df %>% mutate("FEATURES" = paste(ProteinName, PeptideSequence, Charge, |
963 | 943 |
sep = '_')) |
964 |
- } else if (input$DDA_DIA == "PTM" & (input$PTMTMT == "Yes" | input$filetype=='phil')){ |
|
944 |
+ } else if (input$BIO == "PTM" & ((input$BIO == "PTM" & input$DDA_DIA == "TMT" )| input$filetype=='phil')){ |
|
965 | 945 |
df_ptm = as.data.frame(df$PTM) %>% mutate("FEATURES" = paste(ProteinName, PeptideSequence, |
966 | 946 |
Charge, sep = '_')) |
967 | 947 |
df_prot = as.data.frame(df$PROTEIN) %>% mutate("FEATURES" = paste(ProteinName, |
968 | 948 |
PeptideSequence, |
969 | 949 |
Charge, sep = '_')) |
970 |
- } else if (input$DDA_DIA == "PTM" & input$PTMTMT == "No"){ |
|
950 |
+ } else if (input$BIO == "PTM" & (input$BIO == "PTM" & input$DDA_DIA != "TMT" )){ |
|
971 | 951 |
df_ptm = as.data.frame(df$PTM) %>% mutate("FEATURES" = paste(PeptideSequence, |
972 | 952 |
PrecursorCharge, |
973 | 953 |
FragmentIon, |
... | ... |
@@ -984,7 +964,7 @@ getSummary2 <- function(input,df) { |
984 | 964 |
sep = '_')) |
985 | 965 |
} |
986 | 966 |
|
987 |
- if (input$DDA_DIA != "PTM"){ |
|
967 |
+ if (input$BIO != "PTM"){ |
|
988 | 968 |
|
989 | 969 |
df1 = df %>% summarise("Number of Proteins" = n_distinct(ProteinName), |
990 | 970 |
"Number of Peptides" = n_distinct(PeptideSequence), |
... | ... |
@@ -1064,13 +1044,13 @@ preprocessData <- function(qc_input,loadpage_input,input_data ) { |
1064 | 1044 |
MSstatsLogsSettings(FALSE) |
1065 | 1045 |
## Here we run the underlying functions for MSstats and MSstatsTMT |
1066 | 1046 |
## summarization. Done so we can loop over proteins and create a progress bar |
1067 |
- if(loadpage_input$DDA_DIA == "PTM" & (loadpage_input$PTMTMT == "Yes" | loadpage_input$filetype=='phil')){ |
|
1047 |
+ if(loadpage_input$BIO == "PTM" & ((loadpage_input$BIO == "PTM" & loadpage_input$DDA_DIA == "TMT" ) | loadpage_input$filetype=='phil')){ |
|
1068 | 1048 |
|
1069 | 1049 |
preprocessed_ptm = MSstatsShiny::tmt_summarization_loop(input_data$PTM, qc_input,loadpage_input) |
1070 | 1050 |
preprocessed_unmod = MSstatsShiny::tmt_summarization_loop(input_data$PROTEIN, qc_input,loadpage_input) |
1071 | 1051 |
preprocessed = list(PTM = preprocessed_ptm, PROTEIN = preprocessed_unmod) |
1072 | 1052 |
|
1073 |
- } else if (loadpage_input$DDA_DIA == "PTM" & loadpage_input$PTMTMT == "No"){ |
|
1053 |
+ } else if (loadpage_input$BIO == "PTM" & (loadpage_input$BIO == "PTM" & loadpage_input$DDA_DIA != "TMT" )){ |
|
1074 | 1054 |
|
1075 | 1055 |
preprocessed_ptm = MSstatsShiny::lf_summarization_loop(input_data$PTM, qc_input, loadpage_input) |
1076 | 1056 |
preprocessed_unmod = MSstatsShiny::lf_summarization_loop(input_data$PROTEIN, qc_input, loadpage_input) |
... | ... |
@@ -1113,8 +1093,8 @@ preprocessDataCode <- function(qc_input,loadpage_input) { |
1113 | 1093 |
originalPlot = TRUE, |
1114 | 1094 |
summaryPlot =", qc_input$summ,",\t\t\t\t |
1115 | 1095 |
address = FALSE)\n", sep="") |
1116 |
- } else if (loadpage_input$DDA_DIA == "PTM"){ |
|
1117 |
- if (loadpage_input$PTMTMT == "Yes" | loadpage_input$filetype=='phil'){ |
|
1096 |
+ } else if (loadpage_input$BIO == "PTM"){ |
|
1097 |
+ if ((loadpage_input$BIO == "PTM" & loadpage_input$DDA_DIA == "TMT" ) | loadpage_input$filetype=='phil'){ |
|
1118 | 1098 |
codes = paste(codes, "\n# use MSstats for protein summarization\n", sep = "") |
1119 | 1099 |
codes = paste(codes, "summarized = MSstatsPTM::dataSummarizationPTM_TMT(data, |
1120 | 1100 |
method = '",qc_input$summarization,"\',\t\t\t\t |
... | ... |
@@ -1190,7 +1170,7 @@ dataComparison <- function(statmodel_input,qc_input,loadpage_input,matrix,input_ |
1190 | 1170 |
print("+++++++++ In Data Comparison +++++++++") |
1191 | 1171 |
# input_data = preprocessData(qc_input,loadpage_input,get_data()) |
1192 | 1172 |
contrast.matrix = matrix |
1193 |
- if (loadpage_input$DDA_DIA == "PTM" & (loadpage_input$PTMTMT == "Yes" | loadpage_input$filetype=='phil')){ |
|
1173 |
+ if (loadpage_input$BIO == "PTM" & ((loadpage_input$BIO == "PTM" & loadpage_input$DDA_DIA == "TMT" ) | loadpage_input$filetype=='phil')){ |
|
1194 | 1174 |
model_ptm = MSstatsShiny::tmt_model(input_data$PTM, statmodel_input, contrast.matrix) |
1195 | 1175 |
model_protein = MSstatsShiny::tmt_model(input_data$PROTEIN, statmodel_input, contrast.matrix) |
1196 | 1176 |
model_adj = MSstatsShiny::apply_adj(model_ptm$ComparisonResult, |
... | ... |
@@ -1199,7 +1179,7 @@ dataComparison <- function(statmodel_input,qc_input,loadpage_input,matrix,input_ |
1199 | 1179 |
'PROTEIN.Model' = model_protein$ComparisonResult, |
1200 | 1180 |
'ADJUSTED.Model' = model_adj) |
1201 | 1181 |
|
1202 |
- } else if(loadpage_input$DDA_DIA == "PTM" & loadpage_input$PTMTMT == "No"){ |
|
1182 |
+ } else if(loadpage_input$BIO == "PTM" & (loadpage_input$BIO == "PTM" & loadpage_input$DDA_DIA != "TMT" )){ |
|
1203 | 1183 |
model_ptm = MSstatsShiny::lf_model(input_data$PTM, contrast.matrix) |
1204 | 1184 |
model_protein = MSstatsShiny::lf_model(input_data$PROTEIN, contrast.matrix) |
1205 | 1185 |
model_adj = MSstatsShiny::apply_adj(model_ptm$ComparisonResult, |
... | ... |
@@ -16,13 +16,16 @@ we recommend processing large datasets using a local installation. |
16 | 16 |
|
17 | 17 |
### Bioconductor |
18 | 18 |
|
19 |
-For large file processing, it is recommend you use a local install of the application. The easiest way to install the application locally is via [Bioconductor](https://bioconductor.org/packages/release/bioc/html/MSstatsShiny.html) |
|
19 |
+To install the application via Bioconductor, please use the following steps. |
|
20 |
+ |
|
21 |
+1. Download [R](https://www.r-project.org/) and [RStudio](https://www.rstudio.com/products/rstudio/download/) - [How to](https://rstudio-education.github.io/hopr/starting.html). **Note R version must be >= 4.3** |
|
22 |
+2. Intall the package via [Bioconductor](https://bioconductor.org/packages/release/bioc/html/MSstatsShiny.html) |
|
20 | 23 |
|
21 | 24 |
### Github |
22 | 25 |
|
23 | 26 |
To install the application via Github, please use the following steps. |
24 | 27 |
|
25 |
-1. Download [R](https://www.r-project.org/) and [RStudio](https://www.rstudio.com/products/rstudio/download/) - [How to](https://rstudio-education.github.io/hopr/starting.html). **Note R version must be >= 4.2** |
|
28 |
+1. Download [R](https://www.r-project.org/) and [RStudio](https://www.rstudio.com/products/rstudio/download/) - [How to](https://rstudio-education.github.io/hopr/starting.html). **Note R version must be >= 4.3** |
|
26 | 29 |
2. Install the package by executing `devtools::install_github("Vitek-Lab/MSstatsShiny")` in the console. |
27 | 30 |
3. Run the application by executing `library(MSstatsShiny)` and `launch_MSstatsShiny()` or `MSstatsShiny::launch_MSstatsShiny()` in the console. |
28 | 31 |
|
... | ... |
@@ -345,7 +345,7 @@ test_that("getAnnot2 returns an error message when given invalid input", { |
345 | 345 |
test_that("getAnnot returns a data frame when given valid input", { |
346 | 346 |
suppressWarnings({ |
347 | 347 |
mock_input$filetype = "sample" |
348 |
- mock_input$DDA_DIA = "DIA" |
|
348 |
+ mock_input$DDA_DIA = "LType" |
|
349 | 349 |
mock_input$annot$datapath = test_file_tsv |
350 | 350 |
annot <- getAnnot(mock_input) |
351 | 351 |
expect_s3_class(annot, "data.frame") |
... | ... |
@@ -355,7 +355,7 @@ test_that("getAnnot returns a data frame when given valid input", { |
355 | 355 |
test_that("getAnnot returns NULL when given a null input", { |
356 | 356 |
suppressWarnings({ |
357 | 357 |
mock_input$filetype = "sample" |
358 |
- mock_input$DDA_DIA = "DIA" |
|
358 |
+ mock_input$DDA_DIA = "LType" |
|
359 | 359 |
mock_input$annot <- NULL |
360 | 360 |
annot <- getAnnot(mock_input) |
361 | 361 |
expect_equal(annot, NULL) |
... | ... |
@@ -365,7 +365,7 @@ test_that("getAnnot returns NULL when given a null input", { |
365 | 365 |
test_that("getAnnot returns an error message when given invalid input", { |
366 | 366 |
suppressWarnings({ |
367 | 367 |
mock_input$filetype = "sample" |
368 |
- mock_input$DDA_DIA = "DIA" |
|
368 |
+ mock_input$DDA_DIA = "LType" |
|
369 | 369 |
mock_input$annot$datapath <- '/path/to' |
370 | 370 |
annot <- getAnnot(mock_input) |
371 | 371 |
expect_equal(annot, "File load error. Please ensure file is in csv format.") |
... | ... |
@@ -411,19 +411,24 @@ test_that("Empty file type returns NULL", { |
411 | 411 |
|
412 | 412 |
test_that("sample file type returns expected value", { |
413 | 413 |
mock_input$filetype = "sample" |
414 |
- ips_vec <- c("SRM_PRM", "DIA", "DDA") |
|
414 |
+ mock_input$BIO <- "Protein" |
|
415 |
+ mock_input$DDA_DIA <- "LType" |
|
416 |
+ ips_vec <- c("SRM_PRM" , "DDA" , |
|
417 |
+ "DIA") |
|
415 | 418 |
for (ddadia in ips_vec) { |
416 |
- mock_input$DDA_DIA <- ddadia |
|
419 |
+ mock_input$LabelFreeType <- ddadia |
|
417 | 420 |
output <- getData(mock_input) |
418 |
- expect_is(output, "data.frame") |
|
421 |
+ expect_type(output, "list") |
|
419 | 422 |
} |
420 | 423 |
|
421 |
- mock_input$DDA_DIA <- "PTM" |
|
424 |
+ mock_input$DDA_DIA <- "LType" |
|
425 |
+ mock_input$BIO <- "PTM" |
|
422 | 426 |
output <- getData(mock_input) |
423 | 427 |
print(typeof(output)) |
424 | 428 |
expect_type(output,"list") |
425 | 429 |
|
426 |
- mock_input$PTMTMT <- "Yes" |
|
430 |
+ mock_input$DDA_DIA <- "TMT" |
|
431 |
+ mock_input$BIO <- "PTM" |
|
427 | 432 |
output <- getData(mock_input) |
428 | 433 |
print(typeof(output)) |
429 | 434 |
expect_type(output,"list") |
... | ... |
@@ -431,7 +436,9 @@ test_that("sample file type returns expected value", { |
431 | 436 |
|
432 | 437 |
test_that("dda maxquant", { |
433 | 438 |
suppressWarnings({ |
434 |
- mock_input$DDA_DIA <- "DDA" |
|
439 |
+ mock_input$BIO <- "Protein" |
|
440 |
+ |
|
441 |
+ mock_input$DDA_DIA <- "LType" |
|
435 | 442 |
mock_input$filetype = "maxq" |
436 | 443 |
|
437 | 444 |
stub(getData,"getEvidence",data.table::fread(system.file("tinytest/raw_data/MaxQuant/mq_ev.csv", |
... | ... |
@@ -451,7 +458,8 @@ test_that("dda maxquant", { |
451 | 458 |
|
452 | 459 |
test_that("dda pd", { |
453 | 460 |
suppressWarnings({ |
454 |
- mock_input$DDA_DIA <- "DDA" |
|
461 |
+ mock_input$BIO <- "Protein" |
|
462 |
+ mock_input$DDA_DIA <- "LType" |
|
455 | 463 |
mock_input$filetype = "PD" |
456 | 464 |
mock_input$sep = "," |
457 | 465 |
|
... | ... |
@@ -469,7 +477,8 @@ test_that("dda pd", { |
469 | 477 |
|
470 | 478 |
test_that("dda prog", { |
471 | 479 |
suppressWarnings({ |
472 |
- mock_input$DDA_DIA <- "DDA" |
|
480 |
+ mock_input$BIO <- "Protein" |
|
481 |
+ mock_input$DDA_DIA <- "LType" |
|
473 | 482 |
mock_input$filetype = "prog" |
474 | 483 |
mock_input$sep = "," |
475 | 484 |
|
... | ... |
@@ -488,7 +497,8 @@ test_that("dda prog", { |
488 | 497 |
|
489 | 498 |
test_that("dda dia skyline", { |
490 | 499 |
suppressWarnings({ |
491 |
- mock_input$DDA_DIA <- "DDA" |
|
500 |
+ mock_input$BIO <- "Protein" |
|
501 |
+ mock_input$DDA_DIA <- "LType" |
|
492 | 502 |
mock_input$filetype = "sky" |
493 | 503 |
mock_input$sep = "," |
494 | 504 |
|
... | ... |
@@ -502,7 +512,7 @@ test_that("dda dia skyline", { |
502 | 512 |
expect_type(output,"list") |
503 | 513 |
expect_identical(names(output), expected_names) |
504 | 514 |
|
505 |
- mock_input$DDA_DIA <- "DIA" |
|
515 |
+ mock_input$DDA_DIA <- "LType" |
|
506 | 516 |
output <- getData(mock_input) |
507 | 517 |
expected_names <- c("ProteinName","PeptideSequence","PrecursorCharge","FragmentIon","ProductCharge","IsotopeLabelType","Condition","BioReplicate","Run","Fraction","Intensity") |
508 | 518 |
expect_type(output,"list") |
... | ... |
@@ -512,7 +522,8 @@ test_that("dda dia skyline", { |
512 | 522 |
|
513 | 523 |
test_that("dda openms", { |
514 | 524 |
suppressWarnings({ |
515 |
- mock_input$DDA_DIA <- "DDA" |
|
525 |
+ mock_input$BIO <- "Protein" |
|
526 |
+ mock_input$DDA_DIA <- "LType" |
|
516 | 527 |
mock_input$filetype = "openms" |
517 | 528 |
mock_input$sep = "," |
518 | 529 |
|
... | ... |
@@ -528,7 +539,8 @@ test_that("dda openms", { |
528 | 539 |
|
529 | 540 |
test_that("dia diaumpire", { |
530 | 541 |
suppressWarnings({ |
531 |
- mock_input$DDA_DIA <- "DIA" |
|
542 |
+ mock_input$BIO <- "Protein" |
|
543 |
+ mock_input$DDA_DIA <- "LType" |
|
532 | 544 |
mock_input$filetype = "ump" |
533 | 545 |
|
534 | 546 |
stub(getData,"getFragSummary",data.table::fread(system.file("tinytest/raw_data/DIAUmpire/dia_frag.csv", |
... | ... |
@@ -549,7 +561,8 @@ test_that("dia diaumpire", { |
549 | 561 |
|
550 | 562 |
test_that("dia spectronaut", { |
551 | 563 |
suppressWarnings({ |
552 |
- mock_input$DDA_DIA <- "DIA" |
|
564 |
+ mock_input$BIO <- "Protein" |
|
565 |
+ mock_input$DDA_DIA <- "LType" |
|
553 | 566 |
mock_input$filetype = "spec" |
554 | 567 |
|
555 | 568 |
stub(getData,"getAnnot",NULL) |
... | ... |
@@ -565,7 +578,8 @@ test_that("dia spectronaut", { |
565 | 578 |
|
566 | 579 |
test_that("dia openswath", { |
567 | 580 |
suppressWarnings({ |
568 |
- mock_input$DDA_DIA <- "DIA" |
|
581 |
+ mock_input$BIO <- "Protein" |
|
582 |
+ mock_input$DDA_DIA <- "LType" |
|
569 | 583 |
mock_input$filetype = "open" |
570 | 584 |
mock_input$sep = "\t" |
571 | 585 |
|
... | ... |
@@ -582,6 +596,7 @@ test_that("dia openswath", { |
582 | 596 |
|
583 | 597 |
test_that("tmt maxquant", { |
584 | 598 |
suppressWarnings({ |
599 |
+ mock_input$BIO <- "Protein" |
|
585 | 600 |
mock_input$DDA_DIA <- "TMT" |
586 | 601 |
mock_input$filetype = "maxq" |
587 | 602 |
|
... | ... |
@@ -605,6 +620,7 @@ test_that("tmt maxquant", { |
605 | 620 |
|
606 | 621 |
test_that("tmt openms", { |
607 | 622 |
suppressWarnings({ |
623 |
+ mock_input$BIO <- "Protein" |
|
608 | 624 |
mock_input$DDA_DIA <- "TMT" |
609 | 625 |
mock_input$filetype = "openms" |
610 | 626 |
mock_input$sep = "," |
... | ... |
@@ -621,6 +637,7 @@ test_that("tmt openms", { |
621 | 637 |
|
622 | 638 |
test_that("tmt spectromine", { |
623 | 639 |
suppressWarnings({ |
640 |
+ mock_input$BIO <-"Protein" |
|
624 | 641 |
mock_input$DDA_DIA <- "TMT" |
625 | 642 |
mock_input$filetype = "spmin" |
626 | 643 |
|
... | ... |
@@ -657,20 +674,26 @@ test_that("get data code filetype sample", { |
657 | 674 |
suppressWarnings({ |
658 | 675 |
mock_input$filetype = "sample" |
659 | 676 |
|
660 |
- mock_input$DDA_DIA <- "SRM_PRM" |
|
677 |
+ mock_input$BIO <- "Protein" |
|
678 |
+ mock_input$DDA_DIA <- "LType" |
|
679 |
+ mock_input$LabelFreeType ="SRM_PRM" |
|
661 | 680 |
output <- getDataCode(mock_input) |
662 | 681 |
expect_type(output,"character") |
663 | 682 |
|
664 |
- mock_input$DDA_DIA <- "DDA" |
|
683 |
+ mock_input$BIO <- "Protein" |
|
684 |
+ mock_input$DDA_DIA <- "LType" |
|
685 |
+ mock_input$LabelFreeType ="DDA" |
|
665 | 686 |
output <- getDataCode(mock_input) |
666 | 687 |
expect_type(output,"character") |
667 | 688 |
|
668 |
- mock_input$DDA_DIA <- "DIA" |
|
689 |
+ mock_input$BIO <- "Protein" |
|
690 |
+ mock_input$DDA_DIA <- "LType" |
|
691 |
+ mock_input$LabelFreeType ="DIA" |
|
669 | 692 |
output <- getDataCode(mock_input) |
670 | 693 |
expect_type(output,"character") |
671 | 694 |
|
672 |
- mock_input$DDA_DIA <- "PTM" |
|
673 |
- mock_input$PTMTMT <- "Yes" |
|
695 |
+ mock_input$BIO <- "Protein" |
|
696 |
+ mock_input$DDA_DIA <- "TMT" |
|
674 | 697 |
output <- getDataCode(mock_input) |
675 | 698 |
expect_type(output,"character") |
676 | 699 |
}) |
... | ... |
@@ -680,11 +703,11 @@ test_that("get data code filetype msstats", { |
680 | 703 |
suppressWarnings({ |
681 | 704 |
mock_input$filetype = "msstats" |
682 | 705 |
|
683 |
- mock_input$DDA_DIA <- "PTM" |
|
706 |
+ mock_input$BIO <- "PTM" |
|
684 | 707 |
output <- getDataCode(mock_input) |
685 | 708 |
expect_type(output,"character") |
686 | 709 |
|
687 |
- mock_input$DDA_DIA <- "DDA" |
|
710 |
+ mock_input$BIO <- "Protein" |
|
688 | 711 |
output <- getDataCode(mock_input) |
689 | 712 |
expect_type(output,"character") |
690 | 713 |
}) |
... | ... |
@@ -692,9 +715,10 @@ test_that("get data code filetype msstats", { |
692 | 715 |
|
693 | 716 |
test_that("get data code filetype 10col", { |
694 | 717 |
suppressWarnings({ |
718 |
+ mock_input$BIO <- "Protein" |
|
695 | 719 |
mock_input$filetype = "10col" |
696 | 720 |
|
697 |
- mock_input$DDA_DIA <- "DDA" |
|
721 |
+ mock_input$DDA_DIA <- "LType" |
|
698 | 722 |
output <- getDataCode(mock_input) |
699 | 723 |
expect_type(output,"character") |
700 | 724 |
}) |
... | ... |
@@ -702,13 +726,14 @@ test_that("get data code filetype 10col", { |
702 | 726 |
|
703 | 727 |
test_that("get data code filetype sky", { |
704 | 728 |
suppressWarnings({ |
729 |
+ mock_input$BIO <- "Protein" |
|
705 | 730 |
mock_input$filetype = "sky" |
706 | 731 |
|
707 |
- mock_input$DDA_DIA <- "DDA" |
|
732 |
+ mock_input$DDA_DIA <- "LType" |
|
708 | 733 |
output <- getDataCode(mock_input) |
709 | 734 |
expect_type(output,"character") |
710 | 735 |
|
711 |
- mock_input$DDA_DIA <- "DIA" |
|
736 |
+ mock_input$DDA_DIA <- "LType" |
|
712 | 737 |
output <- getDataCode(mock_input) |
713 | 738 |
expect_type(output,"character") |
714 | 739 |
}) |
... | ... |
@@ -717,16 +742,17 @@ test_that("get data code filetype sky", { |
717 | 742 |
test_that("get data code filetype maxq", { |
718 | 743 |
suppressWarnings({ |
719 | 744 |
mock_input$filetype = "maxq" |
720 |
- |
|
745 |
+ mock_input$BIO <- "Protein" |
|
721 | 746 |
mock_input$DDA_DIA <- "TMT" |
722 | 747 |
output <- getDataCode(mock_input) |
723 | 748 |
expect_type(output,"character") |
724 | 749 |
|
725 |
- mock_input$DDA_DIA <- "PTM" |
|
750 |
+ mock_input$BIO <- "PTM" |
|
726 | 751 |
output <- getDataCode(mock_input) |
727 | 752 |
expect_type(output,"character") |
728 | 753 |
|
729 |
- mock_input$DDA_DIA <- "DIA" |
|
754 |
+ mock_input$BIO <- "Protein" |
|
755 |
+ mock_input$DDA_DIA <- "LType" |
|
730 | 756 |
output <- getDataCode(mock_input) |
731 | 757 |
expect_type(output,"character") |
732 | 758 |
}) |
... | ... |
@@ -735,8 +761,8 @@ test_that("get data code filetype maxq", { |
735 | 761 |
test_that("get data code filetype prog", { |
736 | 762 |
suppressWarnings({ |
737 | 763 |
mock_input$filetype = "prog" |
738 |
- |
|
739 |
- mock_input$DDA_DIA <- "DIA" |
|
764 |
+ mock_input$BIO <- "Protein" |
|
765 |
+ mock_input$DDA_DIA <- "LType" |
|
740 | 766 |
output <- getDataCode(mock_input) |
741 | 767 |
expect_type(output,"character") |
742 | 768 |
}) |
... | ... |
@@ -745,12 +771,13 @@ test_that("get data code filetype prog", { |
745 | 771 |
test_that("get data code filetype PD", { |
746 | 772 |
suppressWarnings({ |
747 | 773 |
mock_input$filetype = "PD" |
748 |
- |
|
774 |
+ mock_input$BIO <- "Protein" |
|
749 | 775 |
mock_input$DDA_DIA <- "TMT" |
750 | 776 |
output <- getDataCode(mock_input) |
751 | 777 |
expect_type(output,"character") |
752 | 778 |
|
753 |
- mock_input$DDA_DIA <- "DIA" |
|
779 |
+ mock_input$BIO <- "Protein" |
|
780 |
+ mock_input$DDA_DIA <- "LType" |
|
754 | 781 |
output <- getDataCode(mock_input) |
755 | 782 |
expect_type(output,"character") |
756 | 783 |
}) |
... | ... |
@@ -759,32 +786,32 @@ test_that("get data code filetype PD", { |
759 | 786 |
test_that("get data code filetype spec & open & openms", { |
760 | 787 |
suppressWarnings({ |
761 | 788 |
mock_input$filetype = "spec" |
762 |
- |
|
763 |
- mock_input$DDA_DIA <- "DIA" |
|
789 |
+ mock_input$BIO <- "Protein" |
|
790 |
+ mock_input$DDA_DIA <- "LType" |
|
764 | 791 |
output <- getDataCode(mock_input) |
765 | 792 |
expect_type(output,"character") |
766 | 793 |
|
767 | 794 |
mock_input$filetype = "open" |
768 | 795 |
|
769 |
- mock_input$DDA_DIA <- "DIA" |
|
796 |
+ mock_input$DDA_DIA <- "LType" |
|
770 | 797 |
output <- getDataCode(mock_input) |
771 | 798 |
expect_type(output,"character") |
772 | 799 |
|
773 | 800 |
mock_input$filetype = "openms" |
774 | 801 |
|
775 |
- mock_input$DDA_DIA <- "DIA" |
|
802 |
+ mock_input$DDA_DIA <- "LType" |
|
776 | 803 |
output <- getDataCode(mock_input) |
777 | 804 |
expect_type(output,"character") |
778 | 805 |
|
779 | 806 |
mock_input$filetype = "spim" |
780 | 807 |
|
781 |
- mock_input$DDA_DIA <- "DIA" |
|
808 |
+ mock_input$DDA_DIA <- "LType" |
|
782 | 809 |
output <- getDataCode(mock_input) |
783 | 810 |
expect_type(output,"character") |
784 | 811 |
|
785 | 812 |
mock_input$filetype = "phil" |
786 | 813 |
|
787 |
- mock_input$DDA_DIA <- "DIA" |
|
814 |
+ mock_input$DDA_DIA <- "LType" |
|
788 | 815 |
output <- getDataCode(mock_input) |
789 | 816 |
expect_type(output,"character") |
790 | 817 |
}) |
... | ... |
@@ -816,8 +843,8 @@ mockGetData = function(mock_input) { |
816 | 843 |
test_that("get summary 1 PTM PTMTMT:Yes", { |
817 | 844 |
suppressWarnings({ |
818 | 845 |
mock_input$filetype = "sample" |
819 |
- mock_input$DDA_DIA <- "PTM" |
|
820 |
- mock_input$PTMTMT <- "Yes" |
|
846 |
+ mock_input$BIO <- "PTM" |
|
847 |
+ mock_input$DDA_DIA <- "TMT" |
|
821 | 848 |
stub(getSummary1,"getData",mockGetData(mock_input)) |
822 | 849 |
|
823 | 850 |
output <- getSummary1(mock_input,getData(mock_input)) |
... | ... |
@@ -831,8 +858,8 @@ test_that("get summary 1 PTM PTMTMT:Yes", { |
831 | 858 |
test_that("get summary 1 PTM PTMTMT:No", { |
832 | 859 |
suppressWarnings({ |
833 | 860 |
mock_input$filetype = "sample" |
834 |
- mock_input$DDA_DIA <- "PTM" |
|
835 |
- mock_input$PTMTMT <- "No" |
|
861 |
+ mock_input$BIO <- "PTM" |
|
862 |
+ mock_input$DDA_DIA <- "LType" |
|
836 | 863 |
stub(getSummary1,"getData",mockGetData(mock_input)) |
837 | 864 |
|
838 | 865 |
output <- getSummary1(mock_input,getData(mock_input)) |
... | ... |
@@ -845,8 +872,10 @@ test_that("get summary 1 PTM PTMTMT:No", { |
845 | 872 |
|
846 | 873 |
test_that("get summary 1 Other:DDA", { |
847 | 874 |
suppressWarnings({ |
875 |
+ mock_input$BIO <- "Protein" |
|
848 | 876 |
mock_input$filetype = "sample" |
849 |
- mock_input$DDA_DIA <- "DDA" |
|
877 |
+ mock_input$DDA_DIA <- "LType" |
|
878 |
+ mock_input$LabelFreeType <- "DDA" |
|
850 | 879 |
stub(getSummary1,"getData",mockGetData(mock_input)) |
851 | 880 |
|
852 | 881 |
output <- getSummary1(mock_input,getData(mock_input)) |
... | ... |
@@ -878,8 +907,8 @@ stub(getSummary2,"remove_modal_spinner",{},depth=2) |
878 | 907 |
test_that("get summary 2 PTM PTMTMT:Yes", { |
879 | 908 |
suppressWarnings({ |
880 | 909 |
mock_input$filetype = "sample" |
881 |
- mock_input$DDA_DIA <- "PTM" |
|
882 |
- mock_input$PTMTMT <- "Yes" |
|
910 |
+ mock_input$BIO <- "PTM" |
|
911 |
+ mock_input$DDA_DIA <- "TMT" |
|
883 | 912 |
stub(getSummary2,"getData",mockGetData(mock_input)) |
884 | 913 |
|
885 | 914 |
output <- getSummary2(mock_input,getData(mock_input)) |
... | ... |
@@ -899,8 +928,8 @@ test_that("get summary 2 PTM PTMTMT:Yes", { |
899 | 928 |
test_that("get summary 2 PTM PTMTMT:No", { |
900 | 929 |
suppressWarnings({ |
901 | 930 |
mock_input$filetype = "sample" |
902 |
- mock_input$DDA_DIA <- "PTM" |
|
903 |
- mock_input$PTMTMT <- "No" |
|
931 |
+ mock_input$BIO <- "PTM" |
|
932 |
+ mock_input$DDA_DIA <- "LType" |
|
904 | 933 |
stub(getSummary2,"getData",mockGetData(mock_input)) |
905 | 934 |
|
906 | 935 |
output <- getSummary2(mock_input,getData(mock_input)) |
... | ... |
@@ -915,7 +944,9 @@ test_that("get summary 2 PTM PTMTMT:No", { |
915 | 944 |
test_that("get summary 2 Other:DDA", { |
916 | 945 |
suppressWarnings({ |
917 | 946 |
mock_input$filetype = "sample" |
918 |
- mock_input$DDA_DIA <- "DDA" |
|
947 |
+ mock_input$BIO <- "Protein" |
|
948 |
+ mock_input$DDA_DIA <- "LType" |
|
949 |
+ mock_input$LabelFreeType <- "DDA" |
|
919 | 950 |
stub(getSummary2,"getData",mockGetData(mock_input)) |
920 | 951 |
|
921 | 952 |
output <- getSummary2(mock_input,getData(mock_input)) |
... | ... |
@@ -945,8 +976,8 @@ mockPreprocessData = function(mock_input) { |
945 | 976 |
# err |
946 | 977 |
test_that("preprocessData QC, PTM and PTMTMT: No", { |
947 | 978 |
suppressWarnings({ |
948 |
- mock_input$DDA_DIA <- "PTM" |
|
949 |
- mock_input$PTMTMT = "No" |
|
979 |
+ mock_input$BIO <- "PTM" |
|
980 |
+ mock_input$DDA_DIA <- "LType" |
|
950 | 981 |
mock_input$filetype = "sample" |
951 | 982 |
mock_input$norm = "equalizeMedians" |
952 | 983 |
mock_input$log = "2" |
... | ... |
@@ -975,8 +1006,8 @@ test_that("preprocessData QC, PTM and PTMTMT: No", { |
975 | 1006 |
# err |
976 | 1007 |
test_that("preprocessData QC, PTM and PTMTMT: Yes", { |
977 | 1008 |
suppressWarnings({ |
978 |
- mock_input$DDA_DIA <- "PTM" |
|
979 |
- mock_input$PTMTMT = "Yes" |
|
1009 |
+ mock_input$BIO <- "PTM" |
|
1010 |
+ mock_input$DDA_DIA <- "TMT" |
|
980 | 1011 |
mock_input$filetype = "sample" |
981 | 1012 |
mock_input$norm = "equalizeMedians" |
982 | 1013 |
mock_input$log = "2" |
... | ... |
@@ -1035,7 +1066,9 @@ test_that("preprocessData QC, PTM and PTMTMT: Yes", { |
1035 | 1066 |
# err |
1036 | 1067 |
test_that("preprocessData QC Other", { |
1037 | 1068 |
suppressWarnings({ |
1038 |
- mock_input$DDA_DIA <- "DDA" |
|
1069 |
+ mock_input$BIO <- "Protein" |
|
1070 |
+ mock_input$DDA_DIA <- "LType" |
|
1071 |
+ mock_input$LabelFreeType <- "DDA" |
|
1039 | 1072 |
mock_input$filetype = "sample" |
1040 | 1073 |
mock_input$norm = "equalizeMedians" |
1041 | 1074 |
mock_input$log = "2" |
... | ... |
@@ -1082,8 +1115,9 @@ test_that("get preprocessData code TMT & PTM", { |
1082 | 1115 |
output <- preprocessDataCode(mock_input,mock_input) |
1083 | 1116 |
expect_type(output,"character") |
1084 | 1117 |
|
1085 |
- mock_input$DDA_DIA <- "PTM" |
|
1086 |
- mock_input$PTMTMT <- "Yes" |
|
1118 |
+ mock_input$BIO <- "PTM" |
|
1119 |
+ mock_input$DDA_DIA <- "TMT" |
|
1120 |
+ |
|
1087 | 1121 |
stub(preprocessDataCode,"getDataCode","some test code") |
1088 | 1122 |
stub(preprocessDataCode,"loadpage_input",mock_input) |
1089 | 1123 |
stub(preprocessDataCode,"qc_input",mock_input) |
... | ... |
@@ -1091,7 +1125,8 @@ test_that("get preprocessData code TMT & PTM", { |
1091 | 1125 |
output <- preprocessDataCode(mock_input,mock_input) |
1092 | 1126 |
expect_type(output,"character") |
1093 | 1127 |
|
1094 |
- mock_input$DDA_DIA <- "DDA" |
|
1128 |
+ mock_input$BIO <- "Protein" |
|
1129 |
+ mock_input$DDA_DIA <- "LType" |
|
1095 | 1130 |
mock_input$features_used <- "all" |
1096 | 1131 |
stub(preprocessDataCode,"getDataCode","some test code") |
1097 | 1132 |
stub(preprocessDataCode,"loadpage_input",mock_input) |
... | ... |
@@ -1120,7 +1155,8 @@ test_that("dataComparison statmodel PTM PTMTMT: Yes", { |
1120 | 1155 |
colnames(dummy_matrix) <- conditions |
1121 | 1156 |
rownames(dummy_matrix) <- conditions |
1122 | 1157 |
|
1123 |
- mock_input$DDA_DIA <- "PTM" |
|
1158 |
+ mock_input$BIO <- "PTM" |
|
1159 |
+ mock_input$DDA_DIA <- "TMT" |
|
1124 | 1160 |
mock_input$PTMTMT = "Yes" |
1125 | 1161 |
mock_input$filetype = "sample" |
1126 | 1162 |
mock_input$summarization = "Median" |
... | ... |
@@ -1163,8 +1199,8 @@ test_that("dataComparison statmodel PTM PTMTMT: No", { |
1163 | 1199 |
colnames(dummy_matrix) <- conditions |
1164 | 1200 |
rownames(dummy_matrix) <- conditions |
1165 | 1201 |
|
1166 |
- mock_input$DDA_DIA <- "PTM" |
|
1167 |
- mock_input$PTMTMT = "No" |
|
1202 |
+ mock_input$BIO <- "PTM" |
|
1203 |
+ mock_input$DDA_DIA <- "LType" |
|
1168 | 1204 |
mock_input$filetype = "sample" |
1169 | 1205 |
mock_input$MBi = TRUE |
1170 | 1206 |
mock_input$log = "2" |
... | ... |
@@ -1266,7 +1302,9 @@ test_that("dataComparison statmodel Other", { |
1266 | 1302 |
colnames(dummy_matrix) <- conditions |
1267 | 1303 |
rownames(dummy_matrix) <- conditions |
1268 | 1304 |
|
1269 |
- mock_input$DDA_DIA <- "DDA" |
|
1305 |
+ mock_input$BIO <- "Protein" |
|
1306 |
+ mock_input$DDA_DIA <- "LType" |
|
1307 |
+ mock_input$LabelFreeType <- "DDA" |
|
1270 | 1308 |
mock_input$filetype = "sample" |
1271 | 1309 |
mock_input$norm = "equalizeMedians" |
1272 | 1310 |
mock_input$log = "2" |