source: branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/configureImporter.jsp @ 548

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

new page added to gather additional info needed for autogeneration of t2m file

File size: 10.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  //we also need to figure out the name/id of the currently selected experiment that this import is getting initiated from
17  ItemContext cc = sc.getCurrentContext(Item.EXPERIMENT);
18  int experimentId = cc.getId();
19
20 %>
21
22
23<html>
24
25<head>
26
27<link rel="stylesheet" type="text/css" href="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/styles.css" />
28<link rel="stylesheet" type="text/css" href="/base/include/styles/main.css">
29<link rel="stylesheet" type="text/css" href="/base/include/styles/size_m.css">
30
31<script language="JavaScript" src="<%= request.getContextPath()%>/include/scripts/main.js" type="text/javascript"></script>
32
33<script language="JavaScript" type="text/javascript">
34  //submits form
35  function submit()
36  {
37    document.hybridizations.submit();
38  }
39    function getRoot()
40    {
41      return '/base/';
42    }
43    function getScale()
44    {
45      return 1.0;
46    }
47    function doImport()
48    {
49      var frm = document.forms['hybridizations'];
50      if (Main.trimString(frm.path.value) == '')
51      {
52        alert("You must select a file to import from");
53        frm.path.focus();
54      }
55      else
56      {
57        frm.submit();
58      }
59    }
60    function browseOnClick()
61    {
62      var frm = document.forms['hybridizations'];
63      var url = '<%= request.getContextPath()%>/filemanager/index.jsp?ID=<%=ID%>&cmd=SelectOne&title=Select+file+to+import&callback=setFileCallback';
64      url += '&filter:INT:location=1';
65      Main.openPopup(url, 'SelectFile', 1000, 700);
66    }
67    function setFileCallback(fileId, path)
68    {
69      var frm = document.forms['hybridizations'];
70      frm.file_id.value = fileId;
71      frm.path.value = path;
72      document.getElementById('zipFile').value = path;
73      }
74    function recentFileOnChange()
75    {
76      var frm = document.forms['hybridizations'];
77      var selected = frm.recentFile[frm.recentFile.selectedIndex];
78      setFileCallback(selected.value, selected.text);
79      frm.recentFile.selectedIndex = 0;
80    }
81
82   
83    </script>
84
85</head>
86
87<body>
88
89
90
91
92
93<form name="hybridizations"action="<%= request.getContextPath()%>/common/plugin/index.jsp?ID=<%=ID%>" method="post">
94<input type="hidden" name="ID" value="<%=ID%>"> 
95<input type="hidden" name="cmd" value="SetParameters"> 
96<input type="hidden"name="requestId" value="<%=requestId%>"> 
97
98<input type="hidden" name="file_id" value="">
99<input type="hidden" name="parameter:path" value=""  id="zipFile">
100<input type="hidden" name="parameter:experimentId" value="<%=experimentId %>"  id="experimentId">
101
102
103<input type="hidden"name="parameter:domain" value="<%=inputDataBean.getDomain()%>" />
104<input type="hidden"name="parameter:accession" value="<%=inputDataBean.getAccession()%>" />
105<input type="hidden"name="parameter:qualityControl" value="<%=inputDataBean.getQualityControl()%>" />
106<input type="hidden"name="parameter:experimentalDesign" value="<%=inputDataBean.getExperimentalDesign()%>" />
107<input type="hidden"name="parameter:experimentName" value="<%=inputDataBean.getExperimentName()%>" />
108<input type="hidden"name="parameter:description" value="<%=inputDataBean.getDescription()%>" />
109<input type="hidden"name="parameter:releaseDate" value="<%=inputDataBean.getReleaseDate()%>" />
110<input type="hidden"name="parameter:submissionDate" value="<%=inputDataBean.getSubmissionDate()%>" />
111<input type="hidden"name="parameter:submitter" value="<%=inputDataBean.getSubmitter()%>" />
112<input type="hidden"name="parameter:organization" value="<%=inputDataBean.getOrganization()%>" />
113<input type="hidden"name="parameter:publicationTitle" value="<%=inputDataBean.getPublicationTitle()%>" />
114<input type="hidden"name="parameter:authors" value="<%=inputDataBean.getAuthors()%>" />
115<input type="hidden"name="parameter:journal" value="<%=inputDataBean.getJournal()%>" />
116<input type="hidden"name="parameter:volume" value="<%=inputDataBean.getVolume()%>" />
117<input type="hidden"name="parameter:issue" value="<%=inputDataBean.getIssue()%>" />
118<input type="hidden"name="parameter:pages" value="<%=inputDataBean.getPages()%>" />
119<input type="hidden"name="parameter:year" value="<%=inputDataBean.getYear()%>" />
120<input type="hidden"name="parameter:pubmedId" value="<%=inputDataBean.getPubmedId()%>" />
121<input type="hidden"name="parameter:experimentId" value="<%=inputDataBean.getExperimentId()%>" />
122<input type="hidden"name="parameter:treatmentProtocol" value="<%=inputDataBean.getTreatmentProtocol()%>" />
123<input type="hidden"name="parameter:extractionProtocol" value="<%=inputDataBean.getExtractionProtocol()%>" />
124<input type="hidden"name="parameter:labelingProtocol" value="<%=inputDataBean.getLabelingProtocol()%>" />
125<input type="hidden"name="parameter:hybridizationProtocol" value="<%=inputDataBean.getHybridizationProtocol()%>" />
126<input type="hidden"name="parameter:scanningProtocol" value="<%=inputDataBean.getScanningProtocol()%>" />
127<input type="hidden"name="parameter:treatmentProtocolParams" value="<%=inputDataBean.getTreatmentProtocolParams()%>" />
128<input type="hidden"name="parameter:extractionProtocolParams" value="<%=inputDataBean.getExtractionProtocolParams()%>" />
129<input type="hidden"name="parameter:labelingProtocolParams" value="<%=inputDataBean.getLabelingProtocolParams()%>" />
130<input type="hidden"name="parameter:hybridizationProtocolParams" value="<%=inputDataBean.getHybridizationProtocolParams()%>" />
131<input type="hidden"name="parameter:scanningProtocolParams" value="<%=inputDataBean.getScanningProtocolParams()%>" />
132<input type="hidden"name="parameter:platform" value="<%=inputDataBean.getPlatform()%>" />
133<input type="hidden"name="parameter:organism" value="<%=inputDataBean.getOrganism()%>" />
134<input type="hidden"name="parameter:numDesigns" value="<%=inputDataBean.getNumDesigns()%>" />
135<input type="hidden"name="parameter:dyeSwap" value="<%=inputDataBean.getDyeSwap()%>" />
136<input type="hidden"name="parameter:refSample" value="<%=inputDataBean.getRefSample()%>" />
137<input type="hidden"name="parameter:numTreatmentGroups" value="<%=inputDataBean.getNumTreatmentGroups()%>" />
138<input type="hidden"name="parameter:expFactors" value="<%=inputDataBean.getExpFactors()%>" />
139<input type="hidden"name="parameter:numReplicates" value="<%=inputDataBean.getNumReplicates()%>" />
140<input type="hidden"name="parameter:tissues" value="<%=inputDataBean.getTissues()%>" />
141<input type="hidden"name="parameter:pooling" value="<%=inputDataBean.getPooling()%>" />
142<input type="hidden"name="parameter:subjectNames" value="<%=inputDataBean.getSubjectNames()%>" />
143<input type="hidden"name="parameter:fileList" value="<%=inputDataBean.getFileList()%>" />
144<input type="hidden"name="parameter:subjectList" value="<%=inputDataBean.getSubjectList()%>" />
145<input type="hidden"name="parameter:tissueList" value="<%=inputDataBean.getTissueList()%>" />
146<input type="hidden"name="parameter:useWizard" value="<%=inputDataBean.getUseWizard()%>" />
147<input type="hidden"name="parameter:legacyData" value="<%=inputDataBean.getLegacyData()%>" />
148<input type="hidden"name="parameter:mappingsMode" value="<%=inputDataBean.getMappingsMode()%>" />
149<input type="hidden"name="parameter:spreadSheetMappings" value="<%= inputDataBean.getSpreadSheetMappings()%>"/>
150<input type="hidden"name="parameter:samplePairing" value="<%= inputDataBean.getSamplePairing()%>"/>
151<input type="hidden"name="parameter:timeCourse" value="<%= inputDataBean.getTimeCourse()%>"/>
152<input type="hidden"name="parameter:timePoints" value="<%= inputDataBean.getTimePoints()%>"/>
153<input type="hidden"name="parameter:proceed" value="<%= inputDataBean.getProceed()%>"/>
154
155<input type="hidden"name="parameter:fileList" value=""/>
156<input type="hidden"name="parameter:subjectList" value=""/>
157<input type="hidden"name="parameter:tissueList" value=""/>
158<input type="hidden"name="parameter:combinationList" value=""/>
159
160
161
162<h1>Tab2MAGE Import Wizard -- Select Your Data File</h1>
163
164<p>
165<!--  table with the input form -->
166<table cellpadding="15">
167
168  <!-- file upload -->
169  <tr>
170    <td class="boldText">File:</td>
171
172    <td class="input">
173    <table class="noBorder" border="0" cellspacing="0" cellpadding="5">
174      <tr class="noBorder" >
175     
176        <td style="vertical-align: middle;border-style: none;"><input type="text" name="path" size="35" value=""></td>
177       
178        <td  style="vertical-align: middle;border-style: none;">
179        <div class="buttons"
180          onmouseover="this.className='buttons_hover';"
181          onmouseout="this.className='buttons';"
182          onclick="browseOnClick()">
183        <div class="buttons_inner">
184
185        <table class="noBorder" cellspacing="0" cellpadding="0">
186          <tr class="noBorder">
187            <td style="border-style: none;">&nbsp;&nbsp;<img src="/base/images/browse.png" border="0"></td>
188            <td style="border-style: none;">Browse&hellip;</td>
189          </tr>
190        </table>
191
192        </div>
193        </div>
194        </td>
195       
196      </tr>
197    </table>
198    </td>
199
200    <td>Please select the zip file on your local disk that contains the data files for import.
201   All files must be of the same data format (e.g. Genepix or Affymetrix etc.).
202   <p>
203   The file must include a Tab2MAGE file relating to your raw data files and this must be named "tab2mage.txt".
204   </td>
205  </tr>
206
207</table>
208
209<p>
210
211  <table align="center" class="noBorder" cellspacing="5"  cellpadding="5">
212  <tr class="noBorder">
213    <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;">Submit</td></tr></table></div></div></td>
214    <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>
215  </table>
216
217
218</form>
219
220</body>
221</html>
Note: See TracBrowser for help on using the repository browser.