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

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

file mappings now filter through into tab2mage file but still have to implement two channel arrays

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