source: branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/experiment.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: 21.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="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<%
11  final SessionControl sc = Base.getExistingSessionControl(pageContext, true);
12  final String ID = sc.getId();
13  final String requestId = request.getParameter("requestId");
14
15  //we also need to figure out the name/id of the currently selected experiment that this import is getting initiated from
16  ItemContext cc = sc.getCurrentContext(Item.EXPERIMENT);
17  int experimentID = cc.getId();
18  DbControl dc = sc.newDbControl();
19  Experiment experiment = Experiment.getById(dc, experimentID);
20  String expName = experiment.getName();
21  dc.close();
22
23  //set the experiment id in the bean so we can get at it later in the plugin
24  inputDataBean.setExperimentId(new Integer(experimentID).toString());
25%>
26
27<html>
28
29<head>
30
31<link rel="stylesheet" type="text/css" href="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/styles.css" />
32<link rel="stylesheet" type="text/css" href="/base/include/styles/main.css">
33<link rel="stylesheet" type="text/css" href="/base/include/styles/size_m.css">
34
35<script>
36self.resizeTo(800,900);
37</script>
38
39<script language="JavaScript" src="<%= request.getContextPath()%>/include/scripts/main.js" type="text/javascript"></script>
40
41<script type="text/javascript">
42    function getScale()
43    {
44      return 1.0;
45    }
46    function selectArrayDesignOnClick()
47    {
48      var frm = document.forms['experimentData'];
49      var url = '<%= request.getContextPath()%>/lims/arraydesigns/index.jsp?ID=<%=ID%>&cmd=UpdateContext&mode=selectone&callback=setArrayDesignCallback';
50      if (frm.accession.length > 0)
51      {
52        var id = Math.abs(parseInt(frm.accession[0].value));       
53        url += '&item_id='+id;
54      }
55      Main.openPopup(url, 'SelectArrayDesign', 1000, 700);
56    }
57    function setArrayDesignCallback(id, name)
58    {
59      var frm = document.forms['experimentData'];
60      var list = frm.accession;
61      if (list.length < 1 || list[0].value == '0') // >
62      {
63        Forms.addListOption(list, 0, new Option());
64      }
65      list[0].value = name;
66      list[0].text = name;
67      list.selectedIndex = 0;
68      parentsChanged = true;
69    }
70  //submits form
71  function submit()
72  {
73    document.experimentData.submit();
74  }
75
76    //function to display or hide a given element
77    function showHideItems(myItem, myButton)
78    {
79       //this is the ID of the hidden item
80      var myItem = document.getElementById(myItem);
81
82      //this is the ID of the plus/minus button image
83      var myButton = document.getElementById(myButton);
84
85        if (myItem.style.display != "none")
86        {
87            //items are currently displayed, so hide them
88            myItem.style.display = "none";
89            swapImage(myButton,"plus");
90        }
91        else
92        {
93            //items are currently hidden, so display them
94            myItem.style.display = "block";
95            swapImage(myButton,"minus");
96        }
97    }
98
99    //function to swap an image based on its current state
100    function swapImage(myImage, state)
101    {
102        if (state == "minus")
103        {
104            myImage.src = "<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/hide.gif";
105        }
106
107        else
108        {
109            myImage.src = "<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/show.gif";
110      }
111    }
112
113</script>
114
115</head>
116
117<!-- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
118
119<body>
120
121
122
123 
124
125<h2>Tab2MAGE Import Wizard -- Your Experiment</h2>
126<p>
127
128Please configure your experiment for upload by answering the questions on this and the following two pages.
129The answers you provide will be used to automatically create a new experiment in BASE and your raw data will be imported
130into this. All the associated objects (Hybridizations, Scans, Extracts etc.) will also be created.
131<p>
132
133<form name="experimentData" action="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/protocols.jsp?ID=<%=ID%>" method="post">
134<input type="hidden" name="ID" value="<%=ID%>"> 
135<input type="hidden"name="requestId" value="<%=requestId%>"> 
136
137<table cellpadding="0" cellspacing="0">
138
139  <!-- ------------------------------------------------------------------------------------------------------------------------------------------------ -->
140  <tr >
141    <td class="boldText">Domain:</td>
142    <td class="input"><input type="text" size="45" name="domain" value="scri.ac.uk" /></td>
143    <td class="helpText">The domain tag provides information on the originator of the output MAGE-ML document. This field can contain
144    any suitable string, such as the originating internet domain name (e.g. "ebi.ac.uk").</td>
145  </tr>
146 
147  <!-- ------------------------------------------------------------------------------------------------------------------------------------------------ -->
148  <tr >
149    <td class="boldText">Array Acession:</td>
150
151    <td class="input">
152
153    <div id="accession" class="selectionlist required">
154    <table class="noBorder"  cellspacing="0" cellpadding="5">
155      <tr class="noBorder">
156        <td style="border-style: none;"><select name="accession" onchange="arrayDesignOnChange()"></select></td>
157        <td style="border-style: none;">
158        <div class="buttonclass"
159          onmouseover="this.className='buttonclass_hover';"
160          onmouseout="this.className='buttonclass';"
161          onclick="selectArrayDesignOnClick()">
162        <div class="buttonclass_inner">Select&hellip;</div>
163        </div>
164        </td>
165      </tr>
166    </table>
167    </div>
168    </td>
169
170    <td class="helpText">Please select an existing array design from BASE or create a
171    new one. For ArrayExpress submissions, the array design name becomes
172    the array accession identifier. Accession numbers for experiments
173    submitted to ArrayExpress should have the format E-XXXX-n.</td>
174
175  </tr>
176
177
178
179      <!-- ------------------------------------------------------------------------------------------------------------------------------------------------ -->
180    <tr >
181      <td class="boldText">Quality Control:</td>
182      <td class="input"><select multiple name="qualityControl" size="7">
183        <option selected="selected">biological replicate</option>
184        <option>dye swap quality control</option>
185        <option>peer review quality control</option>
186        <option>real time PCR quality control</option>
187        <option>reverse transcription PCR quality control</option>
188        <option >spike quality control</option>
189        <option>technical replicate</option>
190      </select></td>
191      <td class="helpText">A list of terms taken from the <a
192        href="http://mged.sourceforge.net/ontologies/MGEDontology.php"
193        target="_blank">MGED ontology</a>. Multiple values can be selected
194      by holding down the Ctrl key and clicking on items.</td>
195    </tr>
196
197    <!-- ------------------------------------------------------------------------------------------------------------------------------------------------ -->
198    <tr>
199      <td class="boldText">Experiment Design Type:</td>
200      <td class="input">
201
202      <table class="noBorder" cellpadding="3">
203
204        <tr>
205          <td valign="top" style="border-style: none;">Biological Property<br />
206          </td>
207          <td colspan="2" style="border-style: none;"><a
208            onclick="showHideItems('BiologicalProperty', 'buttonBiologicalProperty');"
209            title="Show/hide items"> <img
210            src="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/show.gif"
211            border="0" id="buttonBiologicalProperty"
212            name="buttonBiologicalProperty" /></a> <!-- begin div containing hidden items -->
213          <div id="BiologicalProperty" style="display:none"><select
214            multiple="multiple" name="biologicalProperty" size="16">
215            <option>cell_component_comparison_design</option>
216            <option>cell_cycle_design</option>
217            <option>cell_type_comparison_design</option>
218            <option>cellular_process_design</option>
219            <option>development_or_differentiation_design</option>
220            <option>imprinting_design</option>
221            <option>individual_genetic_characteristics_design</option>
222            <option>innate_behavior_design</option>
223            <option>is_expressed_design</option>
224            <option>organism_part_comparison_design</option>
225            <option>organism_status_design</option>
226            <option>physiological_process_design</option>
227            <option>sex_design</option>
228            <option>species_design</option>
229            <option selected="selected">strain_or_line_design</option>
230            <option>unknown_experiment_design_type</option>
231          </select></div>
232          </td>
233        </tr>
234
235        <tr>
236          <td style="border-style: none;">BioMolecular Annotation</td>
237          <td style="border-style: none;"><a
238            onclick="showHideItems('BioMolecularAnnotation', 'buttonBioMolecularAnnotation');"
239            title="Show/hide items"> <img
240            src="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/show.gif"
241            border="0" id="buttonBioMolecularAnnotation"
242            name="buttonBioMolecularAnnotation" /></a> <!-- begin div containing hidden items -->
243          <div id="BioMolecularAnnotation" style="display:none"><select
244            multiple="multiple" name="bioMolecularAnnotation"  size="11">
245            <option>RNA_stability_design</option>
246            <option>binding_site_identification_design</option>
247            <option>co-expression_design</option>
248            <option>comparative_genome_hybridization_design</option>
249            <option>genotyping_design</option>
250            <option>operon_identification_design</option>
251            <option>secreted_protein_identification_design</option>
252            <option>tiling_path_design</option>
253            <option>transcript_identification_design</option>
254            <option>translational_bias_design</option>
255            <option>unknown_experiment_design_type</option>
256          </select></div>
257          </td>
258        </tr>
259
260        <tr>
261          <td style="border-style: none;">Epidemiological Design</td>
262          <td style="border-style: none;"><a
263            onclick="showHideItems('EpidemiologicalDesign', 'buttonEpidemiologicalDesign');"
264            title="Show/hide items"> <img
265            src="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/show.gif"
266            border="0" id="buttonEpidemiologicalDesign"
267            name="buttonEpidemiologicalDesign" /></a> <!-- begin div containing hidden items -->
268          <div id="EpidemiologicalDesign" style="display:none"><select
269            multiple="multiple" name="epidemiologicalDesign"  size="4">
270            <option>clinical_history_design</option>
271            <option>disease_state_design</option>
272            <option>family_history_design</option>
273            <option>unknown_experiment_design_type</option>
274          </select></div>
275          </td>
276        </tr>
277
278        <tr>
279          <td style="border-style: none;">Methodological Design</td>
280          <td style="border-style: none;"><a
281            onclick="showHideItems('MethodologicalDesign', 'buttonMethodologicalDesign');"
282            title="Show/hide items"> <img
283            src="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/show.gif"
284            border="0" id="buttonMethodologicalDesign"
285            name="buttonMethodologicalDesign" /></a> <!-- begin div containing hidden items -->
286          <div id="MethodologicalDesign" style="display:none"><select
287            multiple="multiple" name="methodologicalDesign" size="18">
288            <option>all_pairs</option>
289            <option>array_platform_variation_design</option>
290            <option>dye_swap_design</option>
291            <option>ex_vivo_design</option>
292            <option>hardware_variation_design</option>
293            <option>in_vitro_design</option>
294            <option>in_vivo_design</option>
295            <option>loop_design</option>
296            <option>normalization_testing_design</option>
297            <option>operator_variation_design</option>
298            <option>optimization_design</option>
299            <option>quality_control_testing_design</option>
300            <option>reference_design</option>
301            <option>replicate_design</option>
302            <option>self_vs_self_design</option>
303            <option>software_variation_design</option>
304            <option>time_series_design</option>
305            <option>unknown_experiment_design_type</option>
306          </select></div>
307          </td>
308        </tr>
309
310        <tr>
311          <td style="border-style: none;">Perturbational Design</td>
312          <td style="border-style: none;"><a
313            onclick="showHideItems('PerturbationalDesign', 'buttonPerturbationalDesign');"
314            title="Show/hide items"> <img
315            src="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/show.gif"
316            border="0" id="buttonPerturbationalDesign"
317            name="buttonPerturbationalDesign" /></a> <!-- begin div containing hidden items -->
318          <div id="PerturbationalDesign" style="display:none"><select
319            multiple="multiple" name="perturbationalDesign" size="12">
320            <option>cellular_modification_design</option>
321            <option>compound_treatment_design</option>
322            <option>disease_state_design</option>
323            <option>dose_response_design</option>
324            <option>genetic_modification_design</option>
325            <option>growth_condition_design</option>
326            <option>injury_design</option>
327            <option>non-targeted_transgenic_variation_design</option>
328            <option>pathogenicity_design</option>
329            <option>stimulated_design_type</option>
330            <option>stimulus_or_stress_design</option>
331            <option>unknown_experiment_design_type</option>
332          </select></div>
333          </td>
334        </tr>
335
336        <tr>
337          <td style="border-style: none;">Technological Design</td>
338          <td style="border-style: none;"><a
339            onclick="showHideItems('TechnologicalDesign', 'buttonTechnologicalDesign');"
340            title="Show/hide items"> <img
341            src="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/show.gif"
342            border="0" id="buttonTechnologicalDesign"
343            name="buttonTechnologicalDesign" /></a> <!-- begin div containing hidden items -->
344          <div id="TechnologicalDesign" style="display:none"><select
345            multiple="multiple" name="technologicalDesign" size="4">
346            <option>binding_site_identification_design</option>
347            <option>cellular_modification_design</option>
348            <option>comparative_genome_hybridization_design</option>
349            <option>transcript_identification_design</option>
350          </select></div>
351          </td>
352        </tr>
353
354      </table>
355
356
357      </td>
358      <td class="helpText">A list of terms taken from the <a
359        href="http://mged.sourceforge.net/ontologies/MGEDontology.php"
360        target="_blank">MGED ontology</a>.
361      <p>Click "expand" for an item to see list boxes with specific
362      choices.<br />
363      <br />
364      Multiple values can be selected by holding down the Ctrl key and
365      clicking on items.
366      </td>
367    </tr>
368
369    <!-- ------------------------------------------------------------------------------------------------------------------------------------------------ -->
370    <tr>
371      <td class="boldText">Experiment Name:</td>
372      <td class="input"><textarea rows="4" cols="30"
373        name="experimentName"><%=expName%></textarea></td>
374      <td class="helpText">The name you have chosen for the Experiment.</td>
375    </tr>
376
377    <!-- ------------------------------------------------------------------------------------------------------------------------------------------------ -->
378    <tr>
379      <td class="boldText">Experiment Description:</td>
380      <td class="input"><textarea rows="4" cols="30"
381        name="description">my test description</textarea></td>
382      <td class="helpText">A short paragraph describing the purpose of the experiment.</td>
383    </tr>
384
385    <!-- ------------------------------------------------------------------------------------------------------------------------------------------------ -->
386    <tr>
387      <td class="boldText">Release Date:</td>
388      <td class="input"><input type="text" size="10"
389        name="releaseDate" value="2007-05-15" /></td>
390      <td class="helpText">Date for public release, in the format YYYY-MM-DD.</td>
391    </tr>
392    <!-- ------------------------------------------------------------------------------------------------------------------------------------------------ -->
393    <tr>
394      <td class="boldText">Submission Date:</td>
395      <td class="input"><input type="text" size="10"
396        name="submissionDate" value="2007-05-30" /></td>
397      <td class="helpText">Date of submission, in the format YYYY-MM-DD.</td>
398    </tr>
399    <!-- ------------------------------------------------------------------------------------------------------------------------------------------------ -->
400    <tr>
401      <td class="boldText">Submitter:</td>
402      <td class="input"><input type="text" size="45" name="submitter"
403        value="Micha Bayer" /></td>
404      <td class="helpText">The name of the person responsible for submitting the
405      experiment to the database.</td>
406    </tr>
407    <!-- ------------------------------------------------------------------------------------------------------------------------------------------------ -->
408    <tr>
409      <td class="boldText">Organization:</td>
410      <td class="input"><input type="text" size="45"
411        name="organization" value="SCRI" /></td>
412      <td class="helpText">The organization to which the submitter is affiliated.</td>
413    </tr>
414    <!-- ------------------------------------------------------------------------------------------------------------------------------------------------ -->
415
416    <tr>
417      <td class="boldText">Publication Details:</td>
418      <td class="input"></td>
419      <td class="helpText">Publication details for any manuscript
420      associated with the experiment.</td>
421    </tr>
422
423    <tr>
424      <td class="plainLabel" style="border-style: none;">Title:</td>
425      <td class="input" style="border-style: none;"><textarea rows="3" cols="30"
426        name="publicationTitle" >My crazy title</textarea></td>
427      <td style="border-style: none;"></td>
428    </tr>
429    <!-- ------------------------------------------------------------------------------------------------------------------------------------------------ -->
430    <tr>
431      <td class="plainLabel" style="border-style: none;">Authors:</td>
432      <td class="input" style="border-style: none;"><textarea rows="3" cols="30" name="authors">Micha Bayer; Joe Bloggs</textarea></td>
433      <td  class="helpText" style="border-style: none;">The authors list is a semicolon-delimited list of names.</td>
434    </tr>
435    <!-- ------------------------------------------------------------------------------------------------------------------------------------------------ -->
436    <tr>
437      <td class="plainLabel" style="border-style: none;">Journal:</td>
438      <td class="input" style="border-style: none;"><textarea rows="3" cols="30" name="journal">The Journal of Irreproducible Results</textarea></td>
439      <td  class="helpText" style="border-style: none;">The journal field should contain a standard Pubmed journal
440      abbreviated name. </td>
441    </tr>
442    <!-- ------------------------------------------------------------------------------------------------------------------------------------------------ -->
443    <tr>
444      <td class="plainLabel" style="border-style: none;">Volume:</td>
445      <td class="input" style="border-style: none;"><input type="text" size="10" name="volume"
446        value="1" /></td>
447      <td style="border-style: none;"></td>
448    </tr>
449    <!-- ------------------------------------------------------------------------------------------------------------------------------------------------ -->
450    <tr>
451      <td class="plainLabel" style="border-style: none;">Issue:</td>
452      <td class="input" style="border-style: none;"><input type="text" size="10" name="issue"
453        value="1" /></td>
454      <td style="border-style: none;"></td>
455    </tr>
456    <!-- ------------------------------------------------------------------------------------------------------------------------------------------------ -->
457    <tr>
458      <td class="plainLabel" style="border-style: none;">Pages:</td>
459      <td class="input" style="border-style: none;"><input type="text" size="10" name="pages"
460        value="112-122" /></td>
461      <td style="border-style: none;"></td>
462    </tr>
463    <!-- ------------------------------------------------------------------------------------------------------------------------------------------------ -->
464    <tr>
465      <td class="plainLabel" style="border-style: none;">Year:</td>
466      <td class="input" style="border-style: none;"><input type="text" size="10" name="year"
467        value="2007" /></td>
468      <td style="border-style: none;"></td>
469    </tr>
470    <!-- ------------------------------------------------------------------------------------------------------------------------------------------------ -->
471    <tr>
472      <td class="plainLabel" style="border-style: none;">Pubmed ID:</td>
473      <td class="input" style="border-style: none;"><input type="text" size="30" name="pubmedId"
474        value=" " /></td>
475      <td style="border-style: none;"></td>
476
477    </tr>
478
479    <!-- ------------------------------------------------------------------------------------------------------------------------------------------------ -->
480  </table>
481
482  <p>
483
484
485  <table align="center" class="noBorder" cellspacing="5"  cellpadding="5">
486  <tr class="noBorder">
487    <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>
488    <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>
489  </table>
490
491</form>
492
493</body>
494</html>
495
496
Note: See TracBrowser for help on using the repository browser.