Browse code

hide GeneSets tabpanel

pablo-rodr-bio2 authored on 21/04/2021 10:51:28
Showing3 changed files

1 1
new file mode 100644
... ...
@@ -0,0 +1,11 @@
1
+"s1" "s2" "s3" "s4" "s5" "s6" "s7" "s8" "s9" "s10" "s11" "s12" "s13" "s14" "s15" "s16" "s17" "s18" "s19" "s20" "s21" "s22" "s23" "s24" "s25" "s26" "s27" "s28" "s29" "s30"
2
+"g1" -0.715242187222796 1.30117599220059 0.237430272491026 1.01755863695209 0.624187472020653 1.01494317274366 -0.205299257468199 2.41677335378821 0.034551067133851 -0.647045631318269 -0.0735560191364783 0.492228570064431 1.77950290977515 -0.190516802042901 -1.24104449680849 1.43040234118818 0.871964954078744 1.97541905401908 0.0204507085250325 -0.105784167649752 -0.601892845985016 -0.097369267513081 0.967267260167914 0.605370668930333 -0.273248106811925 0.844904241408072 -0.833843580535001 0.961264151809677 -0.316415868196993 -2.80977467896054
3
+"g2" -0.752688968217742 0.756774763795962 1.21810861032581 -1.18843403514798 0.959005377787825 -1.99274848868858 0.65119328158767 -1.65104889568819 0.190230315692457 -2.15764633501528 -1.16865142442436 0.267835015331683 0.286424419628825 0.378423903636832 0.454769268982633 1.04662884711155 -0.348472448955611 -0.281482115038967 0.314057663506262 1.40405026771417 -0.993698591098714 0.216152541801233 -0.108280091234486 -0.506333542189239 -0.468699779782087 -0.782201845619403 0.57872237461645 -1.45646591707643 -0.102346513520598 0.464967990785852
4
+"g3" -0.938538703606894 -1.72673039911433 -1.33877428723497 -0.721604440436015 1.67105482886294 -0.427279287205429 0.273766491036548 -0.463987242966015 0.174726396981842 0.884250820028209 -0.634748264908909 0.653257679471382 0.126315858458886 0.300038545205798 0.659902638142608 0.435288948907682 0.518503765888248 -1.32295111275522 1.32821469603699 1.29408390614558 1.0267850560749 0.882465164396587 -0.69842066759439 -1.42056550469574 0.704167283929716 1.1107114182028 -1.08758071407693 -0.781739711532082 -1.18155922705569 0.840539826961
5
+"g4" -1.05251327933874 -0.601506708006782 0.6608202977898 1.51921771138818 0.0560167332749619 0.116637283582706 1.02467323481835 0.825379862759242 -1.05501704260268 -0.829477611624518 -0.0288415529283144 -0.12270866097738 1.27226677946852 -1.00563625951084 -0.199889828101433 0.71517840711106 -0.390684978638979 -0.239351567138116 0.121318377490778 -1.08999187241124 0.751061302606323 0.205597504483387 -0.27594516842554 0.127992965684126 -1.19736350236541 0.249824719926562 1.48403093155628 0.32040231431661 0.498658043829925 -0.285845423591384
6
+"g5" -0.437159533180399 -0.352046456582617 -0.522912376313422 0.377387973023929 -0.051981906180899 -0.893207570054953 0.817659446374088 0.510132546878663 0.476133278302629 -0.573560270768283 0.67069596873393 -0.41367651359212 -0.718466221319259 0.0192592746253708 -0.645113956859792 0.917174917641003 -1.09278720910151 -0.214041239985383 0.712842320031113 -0.873071000417463 -1.5091665373287 -0.616435842873528 1.11464854536198 1.94585121773144 0.866366132112773 1.65191539162316 -1.18620658531375 -0.444781978336992 -1.03895644030703 0.504126254591608
7
+"g6" 0.331179172958982 0.703523902756894 0.683745521850712 -2.05222282043373 -1.75323735914227 0.333902942499225 -0.209793171228509 -0.589481038515 1.37857013695924 1.50390060900454 -1.65054654342511 -2.64314895202898 -0.450338623924712 -1.07742065311198 0.16532102124205 -2.66092279846568 1.21001051044026 0.15168050450932 0.778860029783535 -1.35807905937061 -0.0951474508492868 -0.734799251921281 0.550043961214136 0.800914339573062 0.864152486225893 -1.45897072853692 0.10107915139528 1.370003993971 -0.22622198144241 -1.15591652508367
8
+"g7" -2.01421049792072 -0.105671334003774 -0.0608219546600742 -1.36403745208238 0.0993275940878275 0.411429920615731 0.378167772208507 -0.996780742207522 0.456236403179813 -0.774144929605405 -0.349754239211268 -0.092941018479472 2.39745248004976 0.712703325244282 0.438818700714454 1.11027709663882 0.740900011274274 1.71230497731928 0.914773270855634 0.181847192619832 -0.895947822756499 -0.131802793041181 1.23667580008161 1.16525338994626 -1.19862235906875 -0.0512978861253612 0.532989286826481 0.673253863354836 0.381425829451352 -0.127148606825662
9
+"g8" 0.211980433372292 -1.25864862806017 0.632960713031451 -0.200781015589121 -0.571850057895563 -0.0330361592759917 -0.945408831123893 0.144475704710697 -1.13558847037434 0.845731540189296 0.756406438545484 0.430284696359987 0.011129187220888 1.08477508986065 0.883302819948705 -0.484987596562325 1.72426223915645 -0.326143892505348 -0.574394552184383 0.164840867918466 -2.07075107054196 0.310016986578952 0.139097857161771 0.358855723093152 0.639491997900534 -0.526925176125598 0.586735339092625 0.0721667524147558 -0.783515789013048 -1.94151837604062
10
+"g9" 1.23667504641657 1.68443570809411 1.33551761505939 0.865779404334488 -0.974009582804091 -2.46589819376003 0.856923010899318 -0.0143074131669134 -0.435645469691905 -1.26068287881878 -0.538809159977592 0.53539884086815 1.63356842140831 -2.22498769648741 -2.05233698390195 0.230616830631202 0.0651539325793032 0.373004655804915 1.62688121419468 0.364114687355063 0.150120131188143 -1.03968035270204 0.410275096490425 -0.608557178316224 2.43022665234451 -0.197264869076299 -0.30174666386638 -1.50775731753668 0.582991405680064 1.18118089143852
11
+"g10" 2.03757401824044 0.911391291795963 0.00729009031689879 -0.101883255715222 -0.17990623104754 2.57145814586664 -0.461038338884354 -1.79028123726406 0.346103619553607 -0.354542403073978 0.227291921672942 -0.555278351313252 -1.43850664491452 1.23569346230014 -1.63637926805902 -0.295157800883577 1.12500274582817 -0.227684064895531 -0.380956739294013 0.552157714218558 -0.0792117092585882 -0.184308868842384 -0.558456912348133 -0.202240855110284 -0.557215481941608 -0.629578742686005 0.079501995328401 0.0261002253262418 -1.31651040165169 1.85991086154316
... ...
@@ -5,22 +5,8 @@ function(input, output, session) {
5 5
   file.create(rout)
6 6
   console.text <- reactiveFileReader(200, session, rout, readLines, warn=F)
7 7
   
8
-  # ERRORS MESSAGES
9
-  output$errorsGsva <- renderText({
10
-    req(argInp$varMinsz(), argInp$varMaxsz(), argInp$selectedTau())
11
-    rv$errors.gsva
12
-  })
13
-
14
-  # ENABLING 'RUN' BTN
15
-  observe({
16
-    if(!is.null(matrix()) && !is.null(genesets())){
17
-      enable("button")
18
-    } else {
19
-      disable("button")
20
-    }
21
-  })
22 8
   
23
-  ### INPUTS ###
9
+  ##################### INPUTS #####################
24 10
   
25 11
   # DATA MATRIX
26 12
   matrix <- matrixServer("matrix1")
... ...
@@ -31,8 +17,9 @@ function(input, output, session) {
31 17
   # ARGUMENTS
32 18
   argInp <- argumentsDataServer("argumentsInput")
33 19
   
20
+  
34 21
 
35
-  #### GSVA RESULTS ####
22
+  ##################### GSVA RESULTS ################
36 23
   
37 24
   ## REACTIVE VALUES
38 25
   rv <- reactiveValues(gs=NULL, dat.t=NULL, n=NULL, dd.col=NULL, p=NULL, 
... ...
@@ -128,6 +115,10 @@ function(input, output, session) {
128 115
   # PRINTING CONSOLE.TEXT
129 116
   modalGSVAServer("modal.text", console.text, gsva.cancel, rout)
130 117
   
118
+  
119
+  
120
+  ##################### OUTPUTS ##################
121
+  
131 122
   # PLOT1 RENDER
132 123
   plot1_Server("plot1", rv)
133 124
 
... ...
@@ -139,7 +130,6 @@ function(input, output, session) {
139 130
   })
140 131
   plot2_Server("plot2", eventData1, rv)
141 132
   
142
-  
143 133
   # PLOT3 RENDER
144 134
   eventData2 <- reactive({
145 135
     req(rv$p2)
... ...
@@ -148,7 +138,39 @@ function(input, output, session) {
148 138
   })
149 139
   plot3_Server("plot3", eventData2, rv, matrix, genesets)
150 140
   
151
-  # DWN BTN
141
+  # ERRORS MESSAGES
142
+  output$errorsGsva <- renderText({
143
+    req(argInp$varMinsz(), argInp$varMaxsz(), argInp$selectedTau())
144
+    rv$errors.gsva
145
+  })
146
+  
147
+  # SESSION INFO
148
+  output$sessionInfo <- renderPrint({
149
+    sessionInfo()
150
+  })
151
+  
152
+  
153
+  ##################### UI SETUPS #####################
154
+  
155
+  ## ENABLING 'RUN' BTN
156
+  observe({
157
+    if(!is.null(matrix()) && !is.null(genesets())){
158
+      enable("button")
159
+    } else {
160
+      disable("button")
161
+    }
162
+  })
163
+  
164
+  ## HIDE 'GeneSets' PANEL WHILE THERE IS NO GSVA OBJECT
165
+  observe({
166
+    if(is.null(rv$gs)) {
167
+      hideTab(inputId="Panels", target="GeneSets")
168
+    } else {
169
+      showTab(inputId="Panels", target="GeneSets")
170
+    }
171
+  })
172
+  
173
+  # DNLD BTN
152 174
   downloadServer("download", reactive(rv$gs))
153 175
   
154 176
   # CLOSE BTN
... ...
@@ -183,10 +205,6 @@ function(input, output, session) {
183 205
     any given Gene Set in this Sample,  click on any point in this plot and a
184 206
     second plot will appear bellow it", "<br/>", sep="<br/>"))
185 207
   })
186
-  
187
-  # SESSION INFO
188
-  output$sessionInfo <- renderPrint({
189
-    sessionInfo()
190
-  })
208
+
191 209
 
192 210
 }
... ...
@@ -33,7 +33,7 @@ fluidPage(
33 33
       ))
34 34
     ),
35 35
     mainPanel(width=6,
36
-              tabsetPanel(type="tabs",
36
+              tabsetPanel(id = "Panels", type="tabs",
37 37
                           tabPanel("Samples",
38 38
                                    textOutput("errorsGsva"),
39 39
                                    htmlOutput("text1"),
... ...
@@ -41,7 +41,7 @@ fluidPage(
41 41
                                    tableOutput("result"),
42 42
                                    downloadUI("download"),
43 43
                                    closeBtnUI("close")),
44
-                          tabPanel("Gene Sets",
44
+                          tabPanel("GeneSets",
45 45
                                    uiOutput("text2"),
46 46
                                    htmlOutput("text3"),
47 47
                                    plot2_UI("plot2"),