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

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

had to add in ability for user to configure subject names and tissues against filenames and factors too - this implemented in UI now
also restructured code in writer class and test class

File size: 8.8 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="application" />
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   
77    </script>
78
79</head>
80
81<body>
82
83
84
85
86
87<form name="hybridizations"action="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/mappings.jsp" method="post">
88<input type="hidden" name="ID" value="<%=ID%>"> <input type="hidden" name="cmd" value="SetParameters"> 
89<input type="hidden"name="requestId" value="<%=requestId%>"> 
90
91<input type="hidden" name="file_id" value="">
92<input type="hidden" name="zipFile" value=""  id="zipFile">
93
94<h1>Tab2MAGE Importer -- Your Hybridizations</h1>
95Page 3 of 4
96<p>
97<!--  table with the input form -->
98<table cellpadding="15">
99
100  <!-- question 1 -->
101  <tr >
102    <td class="boldText">Microarray platform:</td>
103    <td class="input">
104    <select name="platform">
105    <option >Affymetrix</option>
106    <option >Agilent</option>
107    <option >AIDA</option>
108    <option >BZScan</option>
109    <option >ChipSkipper</option>
110    <option >GenePix</option>
111    <option >GeneTAC</option>
112    <option >Illumina</option>
113    <option >Imagene</option>
114    <option >QuantArray Biotin</option>
115    <option >QuantArray Cy</option>
116    <option >Spotfinder</option>
117    <option ><i>Custom</i></option>
118    </select></td>
119    <td>The manufacturer of the microarray chip used.</td>
120  </tr>
121
122  <!-- question 2 -->
123  <tr>
124    <td class="boldText">Experimental organism:</td>
125    <td class="input"><input type="text" size="50" name="organism" value="Solanum tuberosum"/></td>
126    <td>The full scientific name of the experimental organism used.</td>
127  </tr>
128
129  <!-- question 3 -->
130  <tr>
131    <td class="boldText">Number of different arrays designs used:</td>
132    <td class="input"><input type="text" size="3" name="numDesigns" value="1"/></td>
133    <td>If more than one array design was used in parallel, please specify the number here.
134    We assume that all samples are applied once to each array design</td>
135  </tr>
136
137  <!-- question 4 -->
138  <tr>
139    <td class="boldText">Dye-swap</td>
140    <td class="input">yes <input type="radio" name="dyeSwap" value="yes"> no <input type="radio"
141      name="dyeSwap" value="no" checked="checked"> <br>
142     
143    </td>
144    <td>If you used a dye-swap design please indicate this here.</td>
145  </tr>
146
147  <!-- question 5 -->
148  <tr>
149    <td class="boldText">Reference sample</td>
150    <td class="input">yes <input type="radio" name="refSample" value="yes" > no <input type="radio"
151      name="refSample" value="no" checked="checked"></td>
152    <td>If you used a reference sample please indicate this here.</td>
153  </tr>
154
155  <!-- question 6 -->
156  <tr>
157    <td class="boldText">Number of treatment groups:</td>
158    <td class="input"><input type="text" size="3" name="numTreatmentGroups" value="2"/></td>
159    <td>The number of permutations of factor values. <p>
160    Example: an experiment with 2 factors and 3 factor values in each will have 6 treatment groups (2 X 3).
161    </td>
162  </tr>
163
164  <!-- question 7 -->
165  <tr>
166    <td class="boldText">Experimental factors:
167    </td>
168    <td class="input"><textarea rows="7" cols="32" name="expFactors">Strain(mutant,wildtype)</textarea></td>
169    <td>Please list all experimental factors and value ranges using the following format (one per
170    line):<br>
171    <i>Factor 1(value1,value2,...valueN)<br></i>
172    <p>Example: <i><br>
173    Compound(aspirin,ibuprofen) <br>
174    Dose(control,low,medium,high)</i></td>
175  </tr>
176
177  <!-- question 8 -->
178  <tr>
179    <td class="boldText">Number of subjects per group:</td>
180    <td class="input"><input type="text" size="3" name="numReplicates" value="2"/></td>
181    <td>This is the number of biological replicates in each treatment group.</td>
182  </tr>
183 
184  <!-- question 8a -->
185  <tr>
186    <td class="boldText">Subject (replicate) labels:</td>
187    <td class="input"><textarea rows="8" cols="32" name="subjectNames">plant1</textarea></td>
188    <td>Please provide a list of labels(names) for the experimental subjects, one per line,
189     in no particular order (copy and paste from Excel works).</td>
190  </tr> 
191 
192  <!-- question 9 -->
193  <tr>
194    <td class="boldText">Target tissues:</td>
195    <td class="input"><textarea rows="4" cols="32" name="tissues">stem</textarea></td>
196    <td>List all target tissues one per line, in no particular order (copy and paste from Excel works).</td>
197  </tr>
198 
199  <!-- question 10 -->
200  <tr>
201    <td class="boldText">Sample pooling:</td>
202    <td class="input">yes <input type="radio" name="pooling" value="yes"> no <input type="radio"
203      name="pooling" value="no" checked="checked"></td>
204    <td>If the samples were pooled please indicate this here.</td>
205  </tr>
206
207
208  <!-- file upload -->
209  <tr>
210    <td class="boldText">Zip file:</td>
211
212    <td class="input">
213    <table class="noBorder" border="0" cellspacing="0" cellpadding="5">
214      <tr class="noBorder" >
215     
216        <td style="vertical-align: middle;border-style: none;"><input type="text" name="path" size="35" value=""></td>
217       
218        <td  style="vertical-align: middle;border-style: none;">
219        <div class="buttons"
220          onmouseover="this.className='buttons_hover';"
221          onmouseout="this.className='buttons';"
222          onclick="browseOnClick()">
223        <div class="buttons_inner">
224
225        <table class="noBorder" cellspacing="0" cellpadding="0">
226          <tr class="noBorder">
227            <td style="border-style: none;">&nbsp;&nbsp;<img src="/base/images/browse.png" border="0"></td>
228            <td style="border-style: none;">Browse&hellip;</td>
229          </tr>
230        </table>
231
232        </div>
233        </div>
234        </td>
235       
236      </tr>
237    </table>
238    </td>
239
240    <td>Please select the zip file on your local disk that contains the data files for import.
241   All files must be of the same data format (e.g. Genepix or Affymetrix etc.).</td>
242  </tr>
243
244</table>
245
246<p>
247
248  <table align="center" class="noBorder" cellspacing="5"  cellpadding="5">
249  <tr class="noBorder">
250    <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>
251    <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>
252  </table>
253
254
255</form>
256
257</body>
258</html>
Note: See TracBrowser for help on using the repository browser.