source: branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/hybridizations.jsp @ 550

Last change on this file since 550 was 550, checked in by mbayer, 13 years ago

have restructured the code completely that writes the hybs section

File size: 11.6 KB
Line 
1<%@ page import="net.sf.basedb.core.*"%>
2<%@ page import="net.sf.basedb.clients.web.*"%>
3<%@ page import="net.sf.basedb.util.*"%>
4<%@ page import="java.util.*"%>
5
6<jsp:useBean id="inputDataBean" class="uk.ac.ebi.nugo.plugins.DataBean" scope="session" />
7<!-- submits the form data back to the bean assuming that each form element is matched to a variable in the bean by the same name -->
8<jsp:setProperty name="inputDataBean" property="*" />
9
10<%
11final SessionControl sc = Base.getExistingSessionControl(pageContext, true);
12final String ID = sc.getId();
13final String requestId = request.getParameter("requestId");
14 %>
15
16
17<html>
18
19<head>
20
21<link rel="stylesheet" type="text/css" href="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/styles.css" />
22<link rel="stylesheet" type="text/css" href="/base/include/styles/main.css">
23<link rel="stylesheet" type="text/css" href="/base/include/styles/size_m.css">
24
25<script language="JavaScript" src="<%= request.getContextPath()%>/include/scripts/main.js" type="text/javascript"></script>
26
27<script language="JavaScript" type="text/javascript">
28  //submits form
29  function submit()
30  {
31    document.hybridizations.submit();
32  }
33    function getRoot()
34    {
35      return '/base/';
36    }
37    function getScale()
38    {
39      return 1.0;
40    }
41    function doImport()
42    {
43      var frm = document.forms['hybridizations'];
44      if (Main.trimString(frm.path.value) == '')
45      {
46        alert("You must select a file to import from");
47        frm.path.focus();
48      }
49      else
50      {
51        frm.submit();
52      }
53    }
54    function browseOnClick()
55    {
56      var frm = document.forms['hybridizations'];
57      var url = '<%= request.getContextPath()%>/filemanager/index.jsp?ID=<%=ID%>&cmd=SelectOne&title=Select+file+to+import&callback=setFileCallback';
58      url += '&filter:INT:location=1';
59      Main.openPopup(url, 'SelectFile', 1000, 700);
60    }
61    function setFileCallback(fileId, path)
62    {
63      var frm = document.forms['hybridizations'];
64      frm.file_id.value = fileId;
65      frm.path.value = path;
66      document.getElementById('zipFile').value = path;
67      }
68    function recentFileOnChange()
69    {
70      var frm = document.forms['hybridizations'];
71      var selected = frm.recentFile[frm.recentFile.selectedIndex];
72      setFileCallback(selected.value, selected.text);
73      frm.recentFile.selectedIndex = 0;
74    }
75   
76    function hideTwoChannelQuestions()
77    {
78      var dyeSwapRow = document.getElementById('dyeSwapRow');
79      var refSampleRow = document.getElementById('refSampleRow');
80      var poolingRow = document.getElementById('poolingRow');
81
82            //items are currently displayed, so hide them
83          dyeSwapRow.style.display = "none";
84          refSampleRow.style.display = "none";
85          poolingRow.style.display = "none";
86    }
87   
88    function showTwoChannelQuestions()
89    {
90      var dyeSwapRow = document.getElementById('dyeSwapRow');
91      var refSampleRow = document.getElementById('refSampleRow');
92      var poolingRow = document.getElementById('poolingRow');
93
94           //items are currently hidden, so display them
95          dyeSwapRow.style.display = "table-row";
96          refSampleRow.style.display = "table-row";
97          poolingRow.style.display = "table-row";
98    }
99   
100    function checkRefSampleLogic()
101    {
102        if(document.getElementById("dyeSwapYes").checked && document.getElementById("refSampleYes").checked)
103        {
104          alert('Reference Sample and Dye Swap cannot both be set to "yes"');
105        }
106    }
107
108   
109    </script>
110
111</head>
112
113<body>
114
115
116
117
118
119<form name="hybridizations"action="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/userchoice2.jsp?ID=<%=ID%>" method="post">
120<input type="hidden" name="ID" value="<%=ID%>"> 
121<input type="hidden" name="cmd" value="SetParameters"> 
122<input type="hidden"name="requestId" value="<%=requestId%>"> 
123
124<input type="hidden" name="file_id" value="">
125<input type="hidden" name="zipFile" value="/home/michab/potato_small.zip"  id="zipFile">
126
127<h2>Tab2MAGE Import Wizard -- Your Hybridizations</h2>
128
129<p>
130<!--  table with the input form -->
131<table cellpadding="15">
132
133  <!-- platform -->
134  <tr >
135    <td class="boldText">Microarray platform:</td>
136    <td class="input">
137    <select name="platform">
138    <option onclick="hideTwoChannelQuestions();" selected="selected" >Affymetrix</option>
139    <option onclick="showTwoChannelQuestions();">Agilent</option>
140    <option onclick="showTwoChannelQuestions();">AIDA</option>
141    <option onclick="showTwoChannelQuestions();">BZScan</option>
142    <option onclick="showTwoChannelQuestions();">ChipSkipper</option>
143    <option onclick="showTwoChannelQuestions();">GenePix</option>
144    <option onclick="showTwoChannelQuestions();">GeneTAC</option>
145    <option onclick="showTwoChannelQuestions();">Illumina</option>
146    <option onclick="showTwoChannelQuestions();">Imagene</option>
147    <option onclick="showTwoChannelQuestions();">QuantArray Biotin</option>
148    <option onclick="showTwoChannelQuestions();">QuantArray Cy</option>
149    <option onclick="showTwoChannelQuestions();">Spotfinder</option>
150    <option onclick="showTwoChannelQuestions();"><i>Custom</i></option>
151    </select></td>
152    <td>The manufacturer of the microarray chip used.</td>
153  </tr>
154
155  <!-- organism -->
156  <tr>
157    <td class="boldText">Experimental organism:</td>
158    <td class="input"><input type="text" size="50" name="organism" value="Hordeum vulgare"/></td>
159    <td>The full scientific name of the experimental organism used.</td>
160  </tr>
161
162  <!-- num array designs -->
163  <tr>
164    <td class="boldText">Number of different arrays designs used:</td>
165    <td class="input"><input type="text" size="3" name="numDesigns" value="1"/></td>
166    <td>If more than one array design was used in parallel, please specify the number here.
167    We assume that all samples are applied once to each array design</td>
168  </tr>
169
170
171  <!-- num treatment grps -->
172  <tr>
173    <td class="boldText">Number of treatment groups:</td>
174    <td class="input"><input type="text" size="3" name="numTreatmentGroups" value="2"/></td>
175    <td>The number of discrete combinations of factor values, i.e. the product of the number of factor levels(values) from all factors. <p>
176    Example: an experiment with 2 factors and 3 factor values in each will have 6 treatment groups (2 X 3).
177    </td>
178  </tr>
179
180  <!-- exp factors -->
181  <tr>
182    <td class="boldText">Experimental factors:
183    </td>
184    <td class="input"><textarea rows="7" cols="32" name="expFactors">Strain(mutant,wildtype)</textarea></td>
185    <td>Please list all experimental factors and value ranges using the following format (one per
186    line):<br>
187    <i>Factor 1(value1,value2,...valueN)<br></i>
188    <p>Example: <i><br>
189    Compound(aspirin,ibuprofen) <br>
190    Dose(control,low,medium,high) <br>
191    Time(1h,4h,12h,24h)</i>
192    <p>
193    <b>IMPORTANT: If your experimental design includes a time series of any sort, the corresponding factor must be called "Time".</b></td>
194  </tr>
195
196  <!-- num subjects -->
197  <tr>
198    <td class="boldText">Number of subjects per group:</td>
199    <td class="input"><input type="text" size="3" name="numReplicates" value="2"/></td>
200    <td>This is the number of biological replicates in each treatment group.</td>
201  </tr>
202 
203  <!-- subject labels -->
204  <tr>
205    <td class="boldText">Subject (replicate) labels:</td>
206    <td class="input"><textarea rows="8" cols="32" name="subjectNames"></textarea></td>
207    <td>Please provide a list of labels(names) for the experimental subjects, one per line,
208     in no particular order (copy and paste from Excel works).</td>
209  </tr> 
210 
211  <!-- tissues -->
212  <tr>
213    <td class="boldText">Target tissues:</td>
214    <td class="input"><textarea rows="4" cols="32" name="tissues">stem</textarea></td>
215    <td>List all target tissues one per line, in no particular order (copy and paste from Excel works).</td>
216  </tr>
217
218
219  <!-- dye swap -->
220  <tr id="dyeSwapRow"  style="display:none">
221    <td class="boldText">Dye-swap</td>
222    <td class="input">
223    <table class="noBorder" cellpadding="4">
224      <tr>
225        <td class="noBorder"><input type="radio" name="dyeSwap" id="dyeSwapYes" value="yes" onchange="checkRefSampleLogic();"/></td>
226        <td class="noBorder">yes</td>
227      </tr>
228
229      <tr>
230        <td class="noBorder"><input type="radio" name="dyeSwap" id="dyeSwapNo" value="no" checked="checked"  onchange="checkRefSampleLogic();"/></td>
231        <td class="noBorder">no</td>
232      </tr>
233    </table>     
234    </td>
235    <td>If you used a dye-swap design please indicate this here.</td>
236  </tr>
237
238  <!-- ref sample -->
239  <tr id="refSampleRow"  style="display:none">
240    <td class="boldText">Reference sample</td>
241    <td class="input"> 
242    <table class="noBorder" cellpadding="4">
243      <tr>
244        <td class="noBorder"><input type="radio" name="refSample" id="refSampleYes" value="yes"  onchange="checkRefSampleLogic();"/></td>
245        <td class="noBorder">yes</td>
246      </tr>
247
248      <tr>
249        <td class="noBorder"><input type="radio"name="refSample" id="refSampleNo" value="no"  checked="checked"  onchange="checkRefSampleLogic();"/></td>
250        <td class="noBorder">no</td>
251      </tr>
252    </table>       
253    </td>
254    <td>If you used a reference sample please indicate this here.</td>
255  </tr>
256 
257  <!-- pooling -->
258  <tr id="poolingRow"  style="display:none">
259    <td class="boldText">Sample pooling:</td>
260    <td class="input">
261    <table class="noBorder" cellpadding="4">
262      <tr>
263        <td class="noBorder"><input type="radio" name="pooling" value="yes"></td>
264        <td class="noBorder">yes</td>
265      </tr>
266      <tr>
267        <td class="noBorder"><input type="radio" name="pooling" value="no" checked="checked"></td>
268        <td class="noBorder">no</td>
269      </tr>
270    </table>   
271    </td>
272    <td>If the samples were pooled please indicate this here.</td>
273  </tr>
274
275
276  <!-- file upload -->
277  <tr>
278    <td class="boldText">Zip file:</td>
279
280    <td class="input">
281    <table class="noBorder" border="0" cellspacing="0" cellpadding="5">
282      <tr class="noBorder" >
283     
284        <td style="vertical-align: middle;border-style: none;"><input type="text" name="path" size="35" value=""></td>
285       
286        <td  style="vertical-align: middle;border-style: none;">
287        <div class="buttons"
288          onmouseover="this.className='buttons_hover';"
289          onmouseout="this.className='buttons';"
290          onclick="browseOnClick()">
291        <div class="buttons_inner">
292
293        <table class="noBorder" cellspacing="0" cellpadding="0">
294          <tr class="noBorder">
295            <td style="border-style: none;">&nbsp;&nbsp;<img src="/base/images/browse.png" border="0"></td>
296            <td style="border-style: none;">Browse&hellip;</td>
297          </tr>
298        </table>
299
300        </div>
301        </div>
302        </td>
303       
304      </tr>
305    </table>
306    </td>
307
308    <td>Please select the zip file on your local disk that contains the data files for import.
309   All files must be of the same data format (e.g. Genepix or Affymetrix etc.).</td>
310  </tr>
311
312</table>
313
314<p>
315
316  <table align="center" class="noBorder" cellspacing="5"  cellpadding="5">
317  <tr class="noBorder">
318    <td id="next" width="50%" style="border-style: none;"><div class="buttons" onmouseover="this.className='buttons_hover';" onmouseout="this.className='buttons';" onclick="submit()"><div class="buttons_inner"><table  class="noBorder" cellspacing="0" cellpadding="0"><tr  class="noBorder"><td style="border-style: none;"><img src="/base/images/gonext.gif" border="0"></td><td style="border-style: none;">Next</td></tr></table></div></div></td>
319    <td id="close" width="50%" style="border-style: none;"><div class="buttons" onmouseover="this.className='buttons_hover';" onmouseout="this.className='buttons';" onclick="window.close()"><div class="buttons_inner"><table  class="noBorder" cellspacing="0" cellpadding="0"><tr  class="noBorder"><td style="border-style: none;"><img src="/base/images/cancel.gif" border="0"></td><td style="border-style: none;">Cancel</td></tr></table></div></div></td>  </tr>
320  </table>
321
322
323</form>
324
325</body>
326</html>
Note: See TracBrowser for help on using the repository browser.