1 | <%-- $Id: view_rawbioassay.jsp 7604 2019-02-25 12:19:50Z nicklas $ |
---|
2 | ------------------------------------------------------------------ |
---|
3 | Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg, Martin Svensson |
---|
4 | Copyright (C) 2007 Martin Svensson |
---|
5 | |
---|
6 | This file is part of BASE - BioArray Software Environment. |
---|
7 | Available at http://base.thep.lu.se/ |
---|
8 | |
---|
9 | BASE is free software; you can redistribute it and/or |
---|
10 | modify it under the terms of the GNU General Public License |
---|
11 | as published by the Free Software Foundation; either version 3 |
---|
12 | of the License, or (at your option) any later version. |
---|
13 | |
---|
14 | BASE is distributed in the hope that it will be useful, |
---|
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
17 | GNU General Public License for more details. |
---|
18 | |
---|
19 | You should have received a copy of the GNU General Public License |
---|
20 | along with BASE. If not, see <http://www.gnu.org/licenses/>. |
---|
21 | ------------------------------------------------------------------ |
---|
22 | |
---|
23 | @author Nicklas |
---|
24 | @version 2.0 |
---|
25 | --%> |
---|
26 | <%@ page pageEncoding="UTF-8" session="false" |
---|
27 | buffer="500kb" |
---|
28 | import="net.sf.basedb.core.SessionControl" |
---|
29 | import="net.sf.basedb.core.DbControl" |
---|
30 | import="net.sf.basedb.core.SystemItems" |
---|
31 | import="net.sf.basedb.core.Item" |
---|
32 | import="net.sf.basedb.core.ItemContext" |
---|
33 | import="net.sf.basedb.core.Permission" |
---|
34 | import="net.sf.basedb.core.AnnotationType" |
---|
35 | import="net.sf.basedb.core.AnnotationSet" |
---|
36 | import="net.sf.basedb.core.ExtendedProperties" |
---|
37 | import="net.sf.basedb.core.ExtendedProperty" |
---|
38 | import="net.sf.basedb.core.RawBioAssay" |
---|
39 | import="net.sf.basedb.core.Experiment" |
---|
40 | import="net.sf.basedb.core.RawDataType" |
---|
41 | import="net.sf.basedb.core.SpotImages" |
---|
42 | import="net.sf.basedb.core.Protocol" |
---|
43 | import="net.sf.basedb.core.Software" |
---|
44 | import="net.sf.basedb.core.ArrayDesign" |
---|
45 | import="net.sf.basedb.core.Job" |
---|
46 | import="net.sf.basedb.core.File" |
---|
47 | import="net.sf.basedb.core.User" |
---|
48 | import="net.sf.basedb.core.Group" |
---|
49 | import="net.sf.basedb.core.ItemQuery" |
---|
50 | import="net.sf.basedb.core.ItemResultIterator" |
---|
51 | import="net.sf.basedb.core.ItemResultList" |
---|
52 | import="net.sf.basedb.core.Include" |
---|
53 | import="net.sf.basedb.core.MultiPermissions" |
---|
54 | import="net.sf.basedb.core.PermissionDeniedException" |
---|
55 | import="net.sf.basedb.core.ParameterInfo" |
---|
56 | import="net.sf.basedb.core.BasicItem" |
---|
57 | import="net.sf.basedb.core.Nameable" |
---|
58 | import="net.sf.basedb.core.PluginDefinition" |
---|
59 | import="net.sf.basedb.core.PluginConfiguration" |
---|
60 | import="net.sf.basedb.core.plugin.GuiContext" |
---|
61 | import="net.sf.basedb.core.plugin.Plugin" |
---|
62 | import="net.sf.basedb.core.Project" |
---|
63 | import="net.sf.basedb.core.query.Orders" |
---|
64 | import="net.sf.basedb.core.query.Hql" |
---|
65 | import="net.sf.basedb.util.formatter.Formatter" |
---|
66 | import="net.sf.basedb.clients.web.Base" |
---|
67 | import="net.sf.basedb.clients.web.ChangeHistoryUtil" |
---|
68 | import="net.sf.basedb.clients.web.PermissionUtil" |
---|
69 | import="net.sf.basedb.clients.web.util.HTML" |
---|
70 | import="net.sf.basedb.util.Values" |
---|
71 | import="net.sf.basedb.util.formatter.Formatter" |
---|
72 | import="net.sf.basedb.clients.web.formatter.FormatterFactory" |
---|
73 | import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
---|
74 | import="net.sf.basedb.clients.web.extensions.JspContext" |
---|
75 | import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer" |
---|
76 | import="net.sf.basedb.clients.web.extensions.toolbar.ButtonAction" |
---|
77 | import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil" |
---|
78 | import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
---|
79 | import="java.util.Collections" |
---|
80 | import="java.util.Date" |
---|
81 | import="java.util.Map" |
---|
82 | import="java.util.Set" |
---|
83 | import="java.util.List" |
---|
84 | import="java.util.Date" |
---|
85 | %> |
---|
86 | <%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
---|
87 | <%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %> |
---|
88 | <%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
---|
89 | <%@ taglib prefix="p" uri="/WEB-INF/path.tld" %> |
---|
90 | <%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
---|
91 | <%! |
---|
92 | private static final Item itemType = Item.RAWBIOASSAY; |
---|
93 | private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.ITEM); |
---|
94 | %> |
---|
95 | <% |
---|
96 | final String root = request.getContextPath()+"/"; |
---|
97 | final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
---|
98 | final String ID = sc.getId(); |
---|
99 | final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
---|
100 | final int itemId = cc.getId(); |
---|
101 | final String tab = Values.getString(request.getParameter("tab"), "properties"); |
---|
102 | final float scale = Base.getScale(sc); |
---|
103 | final DbControl dc = sc.newDbControl(); |
---|
104 | try |
---|
105 | { |
---|
106 | Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext); |
---|
107 | |
---|
108 | String title = null; |
---|
109 | RawBioAssay rawBioAssay = RawBioAssay.getById(dc, itemId); |
---|
110 | RawDataType rawDataType = null; |
---|
111 | try |
---|
112 | { |
---|
113 | rawDataType = rawBioAssay.getRawDataType(); |
---|
114 | } |
---|
115 | catch (Throwable t) |
---|
116 | {} |
---|
117 | |
---|
118 | Job job = null; |
---|
119 | boolean readJob = true; |
---|
120 | PluginDefinition plugin = null; |
---|
121 | boolean readPlugin = true; |
---|
122 | PluginConfiguration configuration = null; |
---|
123 | boolean readConfiguration = true; |
---|
124 | |
---|
125 | try |
---|
126 | { |
---|
127 | job = rawBioAssay.getJob(); |
---|
128 | } |
---|
129 | catch (PermissionDeniedException ex) |
---|
130 | { |
---|
131 | readJob = false; |
---|
132 | readPlugin = false; |
---|
133 | readConfiguration = false; |
---|
134 | } |
---|
135 | if (job != null) |
---|
136 | { |
---|
137 | try |
---|
138 | { |
---|
139 | plugin = job.getPluginDefinition(); |
---|
140 | } |
---|
141 | catch (PermissionDeniedException ex) |
---|
142 | { |
---|
143 | readPlugin = false; |
---|
144 | } |
---|
145 | try |
---|
146 | { |
---|
147 | configuration = job.getPluginConfiguration(); |
---|
148 | } |
---|
149 | catch (PermissionDeniedException ex) |
---|
150 | { |
---|
151 | readConfiguration = false; |
---|
152 | } |
---|
153 | } |
---|
154 | |
---|
155 | |
---|
156 | final Formatter<Date> dateTimeFormatter = FormatterFactory.getDateTimeFormatter(sc); |
---|
157 | Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); |
---|
158 | final boolean writePermission = rawBioAssay.hasPermission(Permission.WRITE); |
---|
159 | final boolean deletePermission = rawBioAssay.hasPermission(Permission.DELETE); |
---|
160 | final boolean sharePermission = rawBioAssay.hasPermission(Permission.SET_PERMISSION); |
---|
161 | final boolean setOwnerPermission = rawBioAssay.hasPermission(Permission.SET_OWNER); |
---|
162 | final boolean isRemoved = rawBioAssay.isRemoved(); |
---|
163 | final boolean isUsed = isRemoved && rawBioAssay.isUsed(); |
---|
164 | final boolean deletePermanentlyPermission = deletePermission && !isUsed; |
---|
165 | final boolean isOwner = rawBioAssay.isOwner(); |
---|
166 | JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, rawBioAssay); |
---|
167 | ExtensionsInvoker<ButtonAction> invoker = ToolbarUtil.useExtensions(jspContext); |
---|
168 | %> |
---|
169 | <base:page title="<%=title%>" id="view-page"> |
---|
170 | <base:head scripts="table.js,tabcontrol-2.js,~bioassays.js" styles="table.css,toolbar.css,headertabcontrol.css,path.css"> |
---|
171 | <ext:scripts context="<%=jspContext%>" /> |
---|
172 | <ext:stylesheets context="<%=jspContext%>" /> |
---|
173 | </base:head> |
---|
174 | <base:body> |
---|
175 | <p:path><p:pathelement |
---|
176 | title="Raw bioassays" href="<%="index.jsp?ID="+ID%>" |
---|
177 | /><p:pathelement title="<%=HTML.encodeTags(rawBioAssay.getName())%>" |
---|
178 | /></p:path> |
---|
179 | <div id="page-data" data-item-id="<%=itemId%>"></div> |
---|
180 | |
---|
181 | <t:tabcontrol |
---|
182 | id="main" |
---|
183 | subclass="content mastertabcontrol" |
---|
184 | active="<%=tab%>"> |
---|
185 | <t:tab id="properties" title="Properties"> |
---|
186 | <div> |
---|
187 | <table class="fullform"> |
---|
188 | <tr> |
---|
189 | <th class="itemstatus"> |
---|
190 | <base:icon |
---|
191 | image="shared.png" |
---|
192 | visible="<%=rawBioAssay.isShared()%>" |
---|
193 | tooltip="This item is shared to other users, groups and/or projects" |
---|
194 | /> |
---|
195 | <base:icon |
---|
196 | id="btnDeletePermanently" |
---|
197 | image="deleted.png" |
---|
198 | tooltip="This item has been flagged for deletion. Click to delete it now." |
---|
199 | enabled="<%=deletePermanentlyPermission %>" |
---|
200 | visible="<%=isRemoved%>" |
---|
201 | /> |
---|
202 | <base:icon |
---|
203 | id="btnUsingItems" |
---|
204 | image="used.png" |
---|
205 | tooltip="This item is used by other items and can't be permanently deleted. Show the items that are using this one" |
---|
206 | visible="<%=isRemoved && isUsed%>" /> |
---|
207 | </th> |
---|
208 | <td style="padding: 0px;"> |
---|
209 | <tbl:toolbar subclass="bottomborder bg-filled-50"> |
---|
210 | <tbl:button |
---|
211 | id="btnEdit" |
---|
212 | disabled="<%=!writePermission%>" |
---|
213 | image="edit.png" |
---|
214 | title="Edit…" |
---|
215 | tooltip="<%=writePermission ? "Edit this raw bioassay" : "You do not have permission to edit this raw bioassay"%>" |
---|
216 | /> |
---|
217 | <tbl:button |
---|
218 | id="btnDelete" |
---|
219 | disabled="<%=!deletePermission%>" |
---|
220 | image="delete.png" |
---|
221 | title="Delete" |
---|
222 | visible="<%=!rawBioAssay.isRemoved()%>" |
---|
223 | tooltip="<%=deletePermission ? "Delete this raw bioassay" : "You do not have permission to delete this rawbioassay"%>" |
---|
224 | /> |
---|
225 | <tbl:button |
---|
226 | id="btnRestore" |
---|
227 | disabled="<%=!writePermission%>" |
---|
228 | image="restore.png" |
---|
229 | title="Restore" |
---|
230 | visible="<%=rawBioAssay.isRemoved()%>" |
---|
231 | tooltip="<%=writePermission ? "Restore this raw bioassay" : "You do not have permission to restore this rawbioassay"%>" |
---|
232 | /> |
---|
233 | <tbl:button |
---|
234 | id="btnShare" |
---|
235 | disabled="<%=!sharePermission%>" |
---|
236 | image="share.png" |
---|
237 | title="Share…" |
---|
238 | tooltip="<%=sharePermission ? "Share this raw bioassay to other user, groups and projects" : "You do not have permission to share this raw bioassay"%>" |
---|
239 | /> |
---|
240 | <tbl:button |
---|
241 | id="btnSetOwner" |
---|
242 | disabled="<%=!setOwnerPermission%>" |
---|
243 | image="take_ownership.png" |
---|
244 | title="Set owner…" |
---|
245 | tooltip="<%=setOwnerPermission ? "Change owner of this item" : "You do not have permission to change ownership of this item"%>" |
---|
246 | /> |
---|
247 | <tbl:button |
---|
248 | id="btnImport" |
---|
249 | image="import.png" |
---|
250 | data-plugin-type="IMPORT" |
---|
251 | title="Import…" |
---|
252 | tooltip="Import data" |
---|
253 | visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" |
---|
254 | /> |
---|
255 | <tbl:button |
---|
256 | id="btnExport" |
---|
257 | image="export.png" |
---|
258 | data-plugin-type="EXPORT" |
---|
259 | title="Export…" |
---|
260 | tooltip="Export data" |
---|
261 | visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" |
---|
262 | /> |
---|
263 | <tbl:button |
---|
264 | id="btnRunPlugin" |
---|
265 | image="runplugin.png" |
---|
266 | data-plugin-type="OTHER" |
---|
267 | title="Run plugin…" |
---|
268 | tooltip="Run a plugin" |
---|
269 | visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" |
---|
270 | /> |
---|
271 | <tbl:button |
---|
272 | id="btnEditSpotImages" |
---|
273 | image="runplugin.png" |
---|
274 | title="Create spot images…" |
---|
275 | visible="<%=writePermission && rawBioAssay.getNumDbSpots() > 0%>" |
---|
276 | /> |
---|
277 | <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" |
---|
278 | wrapper="<%=new PrefixSuffixRenderer<ButtonAction>(jspContext, "<td>", "</td>") %>"/> |
---|
279 | <tbl:button |
---|
280 | image="help.png" |
---|
281 | subclass="auto-init" |
---|
282 | data-auto-init="help" |
---|
283 | data-help-id="rawbioassay.view.properties" |
---|
284 | title="Help…" |
---|
285 | tooltip="Get help about this page" |
---|
286 | /> |
---|
287 | </tbl:toolbar> |
---|
288 | </td> |
---|
289 | </tr> |
---|
290 | </table> |
---|
291 | <table style="width: 100%; height: 20em;" class="bottomborder"> |
---|
292 | <tr> |
---|
293 | <td style="width: 50%; height: 100%;"> |
---|
294 | <table class="fullform" > |
---|
295 | <tr> |
---|
296 | <th>Name</th> |
---|
297 | <td><%=HTML.encodeTags(rawBioAssay.getName())%></td> |
---|
298 | </tr> |
---|
299 | <tr> |
---|
300 | <th>Registered</th> |
---|
301 | <td><%=dateFormatter.format(rawBioAssay.getEntryDate())%></td> |
---|
302 | </tr> |
---|
303 | <tr> |
---|
304 | <th>Platform</th> |
---|
305 | <td><base:propertyvalue item="<%=rawBioAssay%>" property="platform" /></td> |
---|
306 | </tr> |
---|
307 | <tr> |
---|
308 | <th>Variant</th> |
---|
309 | <td><base:propertyvalue item="<%=rawBioAssay%>" property="variant" /></td> |
---|
310 | </tr> |
---|
311 | <tr> |
---|
312 | <th>Raw data type</th> |
---|
313 | <td><base:catch><%=HTML.encodeTags(rawBioAssay.getRawDataType().getName())%></base:catch></td> |
---|
314 | </tr> |
---|
315 | <tr> |
---|
316 | <th>Spots</th> |
---|
317 | <td><%=rawBioAssay.hasData() ? "yes (db: " + rawBioAssay.getNumDbSpots() + |
---|
318 | "; file: " + rawBioAssay.getNumFileSpots() + ")" : "no"%></td> |
---|
319 | </tr> |
---|
320 | <tr> |
---|
321 | <th>Parent bioassay</th> |
---|
322 | <td><base:propertyvalue item="<%=rawBioAssay%>" property="parentBioAssay" /></td> |
---|
323 | </tr> |
---|
324 | <tr> |
---|
325 | <th>Parent extract</th> |
---|
326 | <td><base:propertyvalue item="<%=rawBioAssay%>" property="parentExtract" /></td> |
---|
327 | </tr> |
---|
328 | <tr> |
---|
329 | <th>Protocol</th> |
---|
330 | <td><base:propertyvalue item="<%=rawBioAssay%>" property="protocol" /></td> |
---|
331 | </tr> |
---|
332 | <tr> |
---|
333 | <th>Software</th> |
---|
334 | <td><base:propertyvalue item="<%=rawBioAssay%>" property="software" /></td> |
---|
335 | </tr> |
---|
336 | <tr> |
---|
337 | <th>Array design</th> |
---|
338 | <td><base:propertyvalue item="<%=rawBioAssay%>" property="arrayDesign" /></td> |
---|
339 | </tr> |
---|
340 | <tr> |
---|
341 | <th>Owner</th> |
---|
342 | <td><base:propertyvalue item="<%=rawBioAssay%>" property="owner" /></td> |
---|
343 | </tr> |
---|
344 | <tr class="dynamic"> |
---|
345 | <th>Description</th> |
---|
346 | <td><%=HTML.niceFormat(rawBioAssay.getDescription())%></td> |
---|
347 | </tr> |
---|
348 | </table> |
---|
349 | </td> |
---|
350 | <td style="width: 50%; height: 100%;" class="leftborder"> |
---|
351 | <table class="fullform"> |
---|
352 | <tr> |
---|
353 | <th>Job</th> |
---|
354 | <td colspan="3"><%=Base.getLinkedName(ID, job, !readJob, true)%></td> |
---|
355 | </tr> |
---|
356 | <tr> |
---|
357 | <th>Plugin</th> |
---|
358 | <td colspan="3"> |
---|
359 | <base:propertyvalue item="<%=rawBioAssay%>" property="job.pluginDefinition" nulltext="<i>External</i>" /> |
---|
360 | <%=job != null && job.getPluginVersion() != null ? "(" + HTML.encodeTags(job.getPluginVersion()) + ")" : ""%> |
---|
361 | </td> |
---|
362 | </tr> |
---|
363 | <% |
---|
364 | if (configuration != null) |
---|
365 | { |
---|
366 | %> |
---|
367 | <tr> |
---|
368 | <th>Configuration / file format</th> |
---|
369 | <td colspan="3"><%=Base.getLinkedName(ID, configuration, !readConfiguration, true)%></td> |
---|
370 | </tr> |
---|
371 | <% |
---|
372 | } |
---|
373 | if (job != null) |
---|
374 | { |
---|
375 | %> |
---|
376 | <tr> |
---|
377 | <th>Type</th> |
---|
378 | <td><base:propertyvalue item="<%=job%>" property="itemSubtype" /></td> |
---|
379 | </tr> |
---|
380 | <tr> |
---|
381 | <th>Started</th> |
---|
382 | <td> |
---|
383 | <%=dateTimeFormatter.format(job.getStarted())%> |
---|
384 | </td> |
---|
385 | </tr> |
---|
386 | <tr> |
---|
387 | <th>Ended</th> |
---|
388 | <td> |
---|
389 | <%=dateTimeFormatter.format(job.getEnded())%> |
---|
390 | </td> |
---|
391 | </tr> |
---|
392 | <% |
---|
393 | if (job.getServer() != null) |
---|
394 | { |
---|
395 | %> |
---|
396 | <tr> |
---|
397 | <th>Server</th> |
---|
398 | <td> |
---|
399 | <%=HTML.encodeTags(job.getServerAndNode())%> |
---|
400 | </td> |
---|
401 | </tr> |
---|
402 | <% |
---|
403 | } |
---|
404 | for (String name : job.getParameterNames()) |
---|
405 | { |
---|
406 | StringBuilder sb = new StringBuilder(); |
---|
407 | String displayValue = ""; |
---|
408 | String description = ""; |
---|
409 | try |
---|
410 | { |
---|
411 | ParameterInfo pi = job.getParameterInfo(name); |
---|
412 | if (pi.getLabel() != null) name = HTML.encodeTags(pi.getLabel()); |
---|
413 | description = HTML.encodeTags(pi.getDescription()); |
---|
414 | List<?> values = pi.getValuesOrMask(); |
---|
415 | int i = 0; |
---|
416 | for (Object value : values) |
---|
417 | { |
---|
418 | if (value != null) |
---|
419 | { |
---|
420 | if (i > 0) sb.append(", "); |
---|
421 | i++; |
---|
422 | if (value instanceof BasicItem) |
---|
423 | { |
---|
424 | BasicItem item = (BasicItem)value; |
---|
425 | String itemName = ""; |
---|
426 | if (item instanceof File) |
---|
427 | { |
---|
428 | itemName = ((File)item).getPath().toString(); |
---|
429 | } |
---|
430 | else if (item instanceof Nameable) |
---|
431 | { |
---|
432 | itemName = ((Nameable)item).getName(); |
---|
433 | } |
---|
434 | else |
---|
435 | { |
---|
436 | itemName = item.toString(); |
---|
437 | } |
---|
438 | sb.append(Base.getLink(ID, HTML.encodeTags(itemName), |
---|
439 | item.getType(), item.getId(), item.hasPermission(Permission.WRITE))); |
---|
440 | } |
---|
441 | else if (value instanceof Date) |
---|
442 | { |
---|
443 | sb.append(dateFormatter.format((Date)value)); |
---|
444 | } |
---|
445 | else |
---|
446 | { |
---|
447 | sb.append(HTML.encodeTags(value.toString())); |
---|
448 | } |
---|
449 | } |
---|
450 | } |
---|
451 | displayValue = sb.toString(); |
---|
452 | } |
---|
453 | catch (Throwable ex) |
---|
454 | { |
---|
455 | displayValue = "<i>ERROR: "+ex.getMessage()+"</i>"; |
---|
456 | } |
---|
457 | %> |
---|
458 | <tr> |
---|
459 | <th><span title="<%=description%>"><%=name%></span></th> |
---|
460 | <td> |
---|
461 | <%=displayValue%> |
---|
462 | </td> |
---|
463 | </tr> |
---|
464 | <% |
---|
465 | } |
---|
466 | } |
---|
467 | if (rawBioAssay.hasSpotImages()) |
---|
468 | { |
---|
469 | SpotImages spi = rawBioAssay.getSpotImages(); |
---|
470 | %> |
---|
471 | <tbody class="sectionheader"> |
---|
472 | <tr> |
---|
473 | <th colspan="4">Spot images</th> |
---|
474 | </tr> |
---|
475 | </tbody> |
---|
476 | <tr> |
---|
477 | <th>X scale</th> |
---|
478 | <td><%=spi.getXScale()%></td> |
---|
479 | <th class="leftborder">Spot size</th> |
---|
480 | <td><%=spi.getSpotsize()%></td> |
---|
481 | </tr> |
---|
482 | <tr> |
---|
483 | <th>Y scale</th> |
---|
484 | <td><%=spi.getYScale()%></td> |
---|
485 | <th class="leftborder">Gamma correction</th> |
---|
486 | <td><%=spi.getGamma()%></td> |
---|
487 | </tr> |
---|
488 | <tr> |
---|
489 | <th>X offset</th> |
---|
490 | <td><%=spi.getXOffset()%></td> |
---|
491 | <th class="leftborder">Quality</th> |
---|
492 | <td><%=spi.getQuality()%></td> |
---|
493 | </tr> |
---|
494 | <tr> |
---|
495 | <th>Y offset</th> |
---|
496 | <td><%=spi.getYOffset()%></td> |
---|
497 | <th class="leftborder"></th> |
---|
498 | <td></td> |
---|
499 | </tr> |
---|
500 | <tr> |
---|
501 | <th class="topborder">Red image file</th> |
---|
502 | <td colspan="3" class="topborder"><base:propertyvalue item="<%=spi%>" property="redImageFile" /></td> |
---|
503 | </tr> |
---|
504 | <tr> |
---|
505 | <th>Green image file</th> |
---|
506 | <td colspan="3"><base:propertyvalue item="<%=spi%>" property="greenImageFile" /></td> |
---|
507 | </tr> |
---|
508 | <tr> |
---|
509 | <th>Blue image file</th> |
---|
510 | <td colspan="3"><base:propertyvalue item="<%=spi%>" property="blueImageFile" /></td> |
---|
511 | </tr> |
---|
512 | <tr> |
---|
513 | <th>Spot images file</th> |
---|
514 | <td colspan="3"><base:propertyvalue item="<%=spi%>" property="spotImagesFile" /></td> |
---|
515 | </tr> |
---|
516 | <% |
---|
517 | } |
---|
518 | %> |
---|
519 | <tr class="dynamic"> |
---|
520 | <th></th> |
---|
521 | <td colspan="3"></td> |
---|
522 | </tr> |
---|
523 | </table> |
---|
524 | </td> |
---|
525 | </tr> |
---|
526 | </table> |
---|
527 | </div> |
---|
528 | |
---|
529 | <jsp:include page="../../common/datafiles/list_files.jsp"> |
---|
530 | <jsp:param name="item_type" value="<%=itemType.name()%>" /> |
---|
531 | <jsp:param name="item_id" value="<%=itemId%>" /> |
---|
532 | <jsp:param name="ID" value="<%=ID%>" /> |
---|
533 | </jsp:include> |
---|
534 | |
---|
535 | <% |
---|
536 | Set<String> names = rawBioAssay.getHeaderNames(); |
---|
537 | %> |
---|
538 | <base:section |
---|
539 | id="headers" |
---|
540 | title="<%="Raw data headers (" + (names == null ? 0 : names.size()) + ")"%>" |
---|
541 | context="<%=cc%>" |
---|
542 | > |
---|
543 | <% |
---|
544 | if (names == null || names.size() == 0) |
---|
545 | { |
---|
546 | %> |
---|
547 | <div class="messagecontainer note"> |
---|
548 | None. |
---|
549 | </div> |
---|
550 | <% |
---|
551 | } |
---|
552 | else |
---|
553 | { |
---|
554 | %> |
---|
555 | <table class="fullform fullborder"> |
---|
556 | <% |
---|
557 | boolean needsTr = true; |
---|
558 | if (names != null) |
---|
559 | { |
---|
560 | for (String name : names) |
---|
561 | { |
---|
562 | %> |
---|
563 | <%=needsTr ? "<tr><th>" : "<th class=\"leftborder\">" %> |
---|
564 | <%=HTML.encodeTags(name)%></th> |
---|
565 | <td><%=HTML.encodeTags(rawBioAssay.getHeader(name))%></td> |
---|
566 | <%=needsTr ? "" : "</tr>"%> |
---|
567 | <% |
---|
568 | needsTr = !needsTr; |
---|
569 | } |
---|
570 | %> |
---|
571 | <%=needsTr ? "" : "<th class=\"leftborder\"></th><td></td></tr>"%> |
---|
572 | <% |
---|
573 | } |
---|
574 | %> |
---|
575 | </table> |
---|
576 | <% |
---|
577 | } |
---|
578 | %> |
---|
579 | </base:section> |
---|
580 | <% |
---|
581 | ItemQuery<Experiment> experimentQuery = rawBioAssay.getExperiments(); |
---|
582 | experimentQuery.include(Include.ALL); |
---|
583 | experimentQuery.order(Orders.asc(Hql.property("name"))); |
---|
584 | ItemResultList<Experiment> experiments = experimentQuery.list(dc); |
---|
585 | %> |
---|
586 | <base:section |
---|
587 | id="experiments" |
---|
588 | title="<%="Experiments (" + experiments.size() + ")"%>" |
---|
589 | context="<%=cc%>" |
---|
590 | > |
---|
591 | <% |
---|
592 | if (experiments.size() == 0) |
---|
593 | { |
---|
594 | %> |
---|
595 | <div class="messagecontainer note"> |
---|
596 | This raw bioassay isn't used in any experiments |
---|
597 | (or, you don't have permission to view them). |
---|
598 | </div> |
---|
599 | <% |
---|
600 | } |
---|
601 | else |
---|
602 | { |
---|
603 | %> |
---|
604 | <tbl:table |
---|
605 | id="tbl.experiments" |
---|
606 | columns="all" |
---|
607 | > |
---|
608 | <tbl:columndef |
---|
609 | id="name" |
---|
610 | title="Name" |
---|
611 | /> |
---|
612 | <tbl:columndef |
---|
613 | id="description" |
---|
614 | title="Description" |
---|
615 | /> |
---|
616 | <tbl:data> |
---|
617 | <tbl:headers> |
---|
618 | <tbl:headerrow> |
---|
619 | <tbl:columnheaders /> |
---|
620 | </tbl:headerrow> |
---|
621 | </tbl:headers> |
---|
622 | <tbl:rows> |
---|
623 | <% |
---|
624 | for (Experiment item : experiments) |
---|
625 | { |
---|
626 | %> |
---|
627 | <tbl:row> |
---|
628 | <tbl:cell column="name"><base:icon |
---|
629 | image="deleted.png" |
---|
630 | tooltip="This item has been scheduled for deletion" |
---|
631 | visible="<%=item.isRemoved()%>" |
---|
632 | /><%=Base.getLinkedName(ID, item, false, true)%></tbl:cell> |
---|
633 | <tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell> |
---|
634 | </tbl:row> |
---|
635 | <% |
---|
636 | } |
---|
637 | %> |
---|
638 | </tbl:rows> |
---|
639 | </tbl:data> |
---|
640 | </tbl:table> |
---|
641 | <% |
---|
642 | } |
---|
643 | %> |
---|
644 | </base:section> |
---|
645 | |
---|
646 | <jsp:include page="../../common/anytoany/list_anytoany.jsp"> |
---|
647 | <jsp:param name="ID" value="<%=ID%>" /> |
---|
648 | <jsp:param name="item_type" value="<%=itemType.name()%>" /> |
---|
649 | <jsp:param name="item_id" value="<%=itemId%>" /> |
---|
650 | <jsp:param name="title" value="Other items related to this sample" /> |
---|
651 | </jsp:include> |
---|
652 | <jsp:include page="../../common/share/list_share.jsp"> |
---|
653 | <jsp:param name="ID" value="<%=ID%>" /> |
---|
654 | <jsp:param name="item_type" value="<%=itemType.name()%>" /> |
---|
655 | <jsp:param name="item_id" value="<%=itemId%>" /> |
---|
656 | <jsp:param name="title" value="Shared to" /> |
---|
657 | </jsp:include> |
---|
658 | </t:tab> |
---|
659 | |
---|
660 | <t:tab id="annotations" title="Annotations & parameters" |
---|
661 | tooltip="View annotation values and protocol parameters" clazz="white"> |
---|
662 | <jsp:include page="../../common/annotations/list_frameset.jsp"> |
---|
663 | <jsp:param name="item_type" value="<%=itemType.name()%>" /> |
---|
664 | <jsp:param name="item_id" value="<%=itemId%>" /> |
---|
665 | <jsp:param name="ID" value="<%=ID%>" /> |
---|
666 | </jsp:include> |
---|
667 | </t:tab> |
---|
668 | |
---|
669 | <t:tab id="rawdata" title="Raw data" visible="<%=rawBioAssay.getNumDbSpots() > 0%>" /> |
---|
670 | <t:tab id="overview" title="Overview" |
---|
671 | tooltip="Display a tree overview of related items"> |
---|
672 | <jsp:include page="../../common/overview/overview.jsp"> |
---|
673 | <jsp:param name="item_type" value="<%=itemType.name()%>" /> |
---|
674 | <jsp:param name="item_id" value="<%=itemId%>" /> |
---|
675 | <jsp:param name="ID" value="<%=ID%>" /> |
---|
676 | </jsp:include> |
---|
677 | </t:tab> |
---|
678 | <t:tab id="history" title="History" |
---|
679 | tooltip="Displays a log with the history of this item" |
---|
680 | visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>"> |
---|
681 | <jsp:include page="../../common/history/frameset.jsp"> |
---|
682 | <jsp:param name="item_type" value="<%=itemType.name()%>" /> |
---|
683 | <jsp:param name="item_id" value="<%=itemId%>" /> |
---|
684 | <jsp:param name="ID" value="<%=ID%>" /> |
---|
685 | </jsp:include> |
---|
686 | </t:tab> |
---|
687 | </t:tabcontrol> |
---|
688 | |
---|
689 | </base:body> |
---|
690 | </base:page> |
---|
691 | <% |
---|
692 | } |
---|
693 | finally |
---|
694 | { |
---|
695 | if (dc != null) dc.close(); |
---|
696 | } |
---|
697 | |
---|
698 | %> |
---|