source: branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/experiment.jsp @ 522

Last change on this file since 522 was 522, checked in by mbayer, 14 years ago

made a number of tweaks to the interface

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