@@ -45,11 +45,11 @@ calc_cmp_transcriptomics_traits=function(v){
45
45
appendTab(inputId = " tabset" ,
46
46
tabPanel(" Linear model" ,
47
47
isolate(selectInput(" phen6" , " Phenotype-1" ,choices = cn )),
48
- isolate(selectInput(" opt1" , " operator-1" ,choices = c(" " ," *" ," +" ))),
48
+ isolate(selectInput(" opt1" , " operator-1" ,choices = c(" --- " ," *" ," +" ))),
49
49
isolate(selectInput(" phen7" , " Phenotype-2" ,choices = cn )),
50
- isolate(selectInput(" opt2" , " operator-2" ,choices = c(" " ," *" ," +" ))),
50
+ isolate(selectInput(" opt2" , " operator-2" ,choices = c(" --- " ," *" ," +" ))),
51
51
isolate(selectInput(" phen8" , " Phenotype-3" ,choices = cn )),
52
- isolate(textAreaInput(" phen5_area" , " Result" , " Data Summary " , height = " 400px" )),
52
+ isolate(textAreaInput(" phen5_area" , " Result" , " " , height = " 400px" )),
53
53
isolate(actionButton(" go_alpha5" , " Go!" ))
54
54
))
55
55
appendTab(inputId = " tabset" ,
@@ -173,17 +173,41 @@ linear_model=function(v, phen6, phen7, phen8, opt1, opt2){
173
173
L1 = colnames(expr )[2 : length(colnames(expr ))]
174
174
L2 = trait [,1 ]
175
175
L12 = L1 [L1 %in% L2 ]
176
-
176
+
177
177
ix1 = which(colnames(trait )== phen6 )
178
178
ix2 = which(colnames(trait )== phen7 )
179
179
ix3 = which(colnames(trait )== phen8 )
180
180
181
+ print(c(" phen6=" ,phen6 ))
182
+ print(c(" phen7=" ,phen7 ))
183
+ print(c(" phen8=" ,phen8 ))
184
+ print(c(" ix1=" ,ix1 ))
185
+ print(c(" ix2=" ,ix2 ))
186
+ print(c(" ix3=" ,ix3 ))
187
+
181
188
t1 = trait [L12 ,ix1 ]
182
189
t2 = trait [L12 ,ix2 ]
190
+ t3 = trait [L12 ,ix3 ]
183
191
t0 = expr [1 ,L12 ]
184
192
t0_r = (t(t0 ))
193
+
194
+ print(length(t1 ))
195
+ print(length(t2 ))
196
+ print(length(t3 ))
185
197
186
- df = data.frame (t0_r ,t1 ,t2 )
198
+ df = data.frame (t0_r ,t1 ,t2 ,t3 )
199
+ print(dim(df ))
200
+ print(head(df ))
201
+
202
+ if (dim(df )[2 ]> 3 ){
203
+ colnames(df )= c(" expression" ,phen6 ,phen7 ,phen8 )
204
+ }else if (dim(df )[2 ]> 2 ){
205
+ colnames(df )= c(" expression" ,phen6 ,phen7 )
206
+ }else {
207
+ colnames(df )= c(" expression" ,phen6 )
208
+ }
209
+
210
+ print(summary(df ))
187
211
188
212
if (phen8 == " ---" ){
189
213
if (opt1 == " *" ){
0 commit comments