2102 |
22 Mar 06 |
nicklas |
1 |
<%-- $Id$ |
2102 |
22 Mar 06 |
nicklas |
2 |
------------------------------------------------------------------ |
5425 |
23 Sep 10 |
nicklas |
Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg |
3675 |
16 Aug 07 |
jari |
Copyright (C) 2007 Johan Enell |
2102 |
22 Mar 06 |
nicklas |
5 |
|
2304 |
22 May 06 |
jari |
6 |
This file is part of BASE - BioArray Software Environment. |
2304 |
22 May 06 |
jari |
7 |
Available at http://base.thep.lu.se/ |
2102 |
22 Mar 06 |
nicklas |
8 |
|
2102 |
22 Mar 06 |
nicklas |
9 |
BASE is free software; you can redistribute it and/or |
2102 |
22 Mar 06 |
nicklas |
10 |
modify it under the terms of the GNU General Public License |
4476 |
05 Sep 08 |
jari |
11 |
as published by the Free Software Foundation; either version 3 |
2102 |
22 Mar 06 |
nicklas |
12 |
of the License, or (at your option) any later version. |
2102 |
22 Mar 06 |
nicklas |
13 |
|
2102 |
22 Mar 06 |
nicklas |
14 |
BASE is distributed in the hope that it will be useful, |
2102 |
22 Mar 06 |
nicklas |
15 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
2102 |
22 Mar 06 |
nicklas |
16 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2102 |
22 Mar 06 |
nicklas |
17 |
GNU General Public License for more details. |
2102 |
22 Mar 06 |
nicklas |
18 |
|
2102 |
22 Mar 06 |
nicklas |
19 |
You should have received a copy of the GNU General Public License |
4511 |
11 Sep 08 |
jari |
20 |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
2102 |
22 Mar 06 |
nicklas |
21 |
------------------------------------------------------------------ |
2102 |
22 Mar 06 |
nicklas |
22 |
|
2102 |
22 Mar 06 |
nicklas |
23 |
@author Nicklas |
2102 |
22 Mar 06 |
nicklas |
24 |
@version 2.0 |
2102 |
22 Mar 06 |
nicklas |
25 |
--%> |
7604 |
25 Feb 19 |
nicklas |
26 |
<%@page import="net.sf.basedb.clients.web.extensions.plot.OverviewPlotAction"%> |
5426 |
24 Sep 10 |
nicklas |
27 |
<%@ page pageEncoding="UTF-8" session="false" |
2102 |
22 Mar 06 |
nicklas |
28 |
import="net.sf.basedb.core.SessionControl" |
2102 |
22 Mar 06 |
nicklas |
29 |
import="net.sf.basedb.core.DbControl" |
2102 |
22 Mar 06 |
nicklas |
30 |
import="net.sf.basedb.core.Item" |
2678 |
28 Sep 06 |
nicklas |
31 |
import="net.sf.basedb.core.Type" |
2102 |
22 Mar 06 |
nicklas |
32 |
import="net.sf.basedb.core.ItemContext" |
2102 |
22 Mar 06 |
nicklas |
33 |
import="net.sf.basedb.core.Permission" |
2102 |
22 Mar 06 |
nicklas |
34 |
import="net.sf.basedb.core.Experiment" |
2102 |
22 Mar 06 |
nicklas |
35 |
import="net.sf.basedb.core.BioAssaySet" |
2102 |
22 Mar 06 |
nicklas |
36 |
import="net.sf.basedb.core.BioAssay" |
2102 |
22 Mar 06 |
nicklas |
37 |
import="net.sf.basedb.core.RawDataType" |
2102 |
22 Mar 06 |
nicklas |
38 |
import="net.sf.basedb.core.BaseException" |
2102 |
22 Mar 06 |
nicklas |
39 |
import="net.sf.basedb.core.DynamicResultIterator" |
2102 |
22 Mar 06 |
nicklas |
40 |
import="net.sf.basedb.core.PluginDefinition" |
2491 |
08 Aug 06 |
nicklas |
41 |
import="net.sf.basedb.core.Formula" |
4916 |
30 Apr 09 |
nicklas |
42 |
import="net.sf.basedb.core.IntensityTransform" |
2102 |
22 Mar 06 |
nicklas |
43 |
import="net.sf.basedb.core.plugin.GuiContext" |
2102 |
22 Mar 06 |
nicklas |
44 |
import="net.sf.basedb.core.plugin.Plugin" |
7603 |
22 Feb 19 |
nicklas |
45 |
import="net.sf.basedb.core.query.SqlQuery" |
2102 |
22 Mar 06 |
nicklas |
46 |
import="net.sf.basedb.core.query.SqlResult" |
2678 |
28 Sep 06 |
nicklas |
47 |
import="net.sf.basedb.util.Enumeration" |
2733 |
16 Oct 06 |
nicklas |
48 |
import="net.sf.basedb.util.ColorGenerator" |
4857 |
27 Mar 09 |
nicklas |
49 |
import="net.sf.basedb.util.formatter.LookupFormatter" |
2102 |
22 Mar 06 |
nicklas |
50 |
import="net.sf.basedb.clients.web.Base" |
2102 |
22 Mar 06 |
nicklas |
51 |
import="net.sf.basedb.clients.web.ModeInfo" |
2102 |
22 Mar 06 |
nicklas |
52 |
import="net.sf.basedb.clients.web.DynamicUtil" |
2733 |
16 Oct 06 |
nicklas |
53 |
import="net.sf.basedb.clients.web.WebException" |
2102 |
22 Mar 06 |
nicklas |
54 |
import="net.sf.basedb.clients.web.util.HTML" |
2753 |
20 Oct 06 |
nicklas |
55 |
import="net.sf.basedb.util.Values" |
2102 |
22 Mar 06 |
nicklas |
56 |
import="net.sf.basedb.clients.web.taglib.table.TableColumn" |
4871 |
01 Apr 09 |
nicklas |
57 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
4871 |
01 Apr 09 |
nicklas |
58 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
4871 |
01 Apr 09 |
nicklas |
59 |
import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer" |
7604 |
25 Feb 19 |
nicklas |
60 |
import="net.sf.basedb.clients.web.extensions.toolbar.ButtonAction" |
4871 |
01 Apr 09 |
nicklas |
61 |
import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil" |
4871 |
01 Apr 09 |
nicklas |
62 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
2102 |
22 Mar 06 |
nicklas |
63 |
import="java.util.Map" |
2678 |
28 Sep 06 |
nicklas |
64 |
import="java.util.HashMap" |
2102 |
22 Mar 06 |
nicklas |
65 |
import="java.util.List" |
2102 |
22 Mar 06 |
nicklas |
66 |
import="java.util.LinkedList" |
2102 |
22 Mar 06 |
nicklas |
67 |
import="java.util.ArrayList" |
2102 |
22 Mar 06 |
nicklas |
68 |
import="java.util.Set" |
2102 |
22 Mar 06 |
nicklas |
69 |
import="java.util.HashSet" |
2102 |
22 Mar 06 |
nicklas |
70 |
import="java.util.Arrays" |
2733 |
16 Oct 06 |
nicklas |
71 |
import="java.awt.Color" |
2102 |
22 Mar 06 |
nicklas |
72 |
%> |
2102 |
22 Mar 06 |
nicklas |
73 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
2102 |
22 Mar 06 |
nicklas |
74 |
<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
2102 |
22 Mar 06 |
nicklas |
75 |
<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %> |
2102 |
22 Mar 06 |
nicklas |
76 |
<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %> |
4871 |
01 Apr 09 |
nicklas |
77 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
2102 |
22 Mar 06 |
nicklas |
78 |
<%! |
2174 |
21 Apr 06 |
nicklas |
79 |
private static final Item itemType = Item.SPOTDATA; |
2174 |
21 Apr 06 |
nicklas |
80 |
private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.LIST); |
2102 |
22 Mar 06 |
nicklas |
81 |
%> |
2102 |
22 Mar 06 |
nicklas |
82 |
<% |
2102 |
22 Mar 06 |
nicklas |
83 |
final int bioAssayId = Values.getInt(request.getParameter("bioassay_id")); |
2678 |
28 Sep 06 |
nicklas |
84 |
final int bioAssaySetId = Values.getInt(request.getParameter("bioassayset_id")); |
2102 |
22 Mar 06 |
nicklas |
85 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
2102 |
22 Mar 06 |
nicklas |
86 |
final String ID = sc.getId(); |
2102 |
22 Mar 06 |
nicklas |
87 |
|
2102 |
22 Mar 06 |
nicklas |
88 |
final ModeInfo mode = ModeInfo.get(request.getParameter("mode")); |
2102 |
22 Mar 06 |
nicklas |
89 |
final String callback = request.getParameter("callback"); |
2102 |
22 Mar 06 |
nicklas |
90 |
final String title = mode.generateTitle("spot data", "spot data"); |
7954 |
12 May 21 |
nicklas |
91 |
final DbControl dc = sc.newDbControl(":List "+itemType); |
2102 |
22 Mar 06 |
nicklas |
92 |
DynamicResultIterator spotData = null; |
2102 |
22 Mar 06 |
nicklas |
93 |
try |
2102 |
22 Mar 06 |
nicklas |
94 |
{ |
2678 |
28 Sep 06 |
nicklas |
95 |
final BioAssay bioAssay = bioAssayId == 0 ? null : BioAssay.getById(dc, bioAssayId); |
2678 |
28 Sep 06 |
nicklas |
96 |
final BioAssaySet bioAssaySet = bioAssay != null ? bioAssay.getBioAssaySet() : BioAssaySet.getById(dc, bioAssaySetId); |
2678 |
28 Sep 06 |
nicklas |
97 |
final Experiment experiment = bioAssaySet.getExperiment(); |
2678 |
28 Sep 06 |
nicklas |
98 |
final int experimentId = experiment.getId(); |
2678 |
28 Sep 06 |
nicklas |
99 |
final RawDataType rawDataType = bioAssaySet.getRawDataType(); |
4916 |
30 Apr 09 |
nicklas |
100 |
final IntensityTransform transform = bioAssaySet.getIntensityTransform(); |
2678 |
28 Sep 06 |
nicklas |
101 |
|
2174 |
21 Apr 06 |
nicklas |
102 |
final String subContext = rawDataType.getId(); |
2102 |
22 Mar 06 |
nicklas |
103 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, subContext, null, null); |
2102 |
22 Mar 06 |
nicklas |
104 |
Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext); |
2102 |
22 Mar 06 |
nicklas |
105 |
|
2102 |
22 Mar 06 |
nicklas |
106 |
List<TableColumn> columns = new LinkedList<TableColumn>(); |
4916 |
30 Apr 09 |
nicklas |
107 |
DynamicUtil.addSpotColumns(columns, dc, rawDataType.getChannels(), transform); |
4917 |
30 Apr 09 |
nicklas |
108 |
DynamicUtil.addFormulaColumns(columns, dc, rawDataType, Formula.Type.COLUMN_EXPRESSION, |
5438 |
04 Oct 10 |
nicklas |
109 |
transform, "frm.", "[Formula] ", true); |
2664 |
26 Sep 06 |
nicklas |
110 |
DynamicUtil.addExtraColumns(columns, dc, bioAssaySet, "ev", "#", "[Xtra] "); |
2733 |
16 Oct 06 |
nicklas |
111 |
DynamicUtil.addRawDataColumns(columns, dc, rawDataType, "raw.", "$", "[Raw] "); |
5879 |
18 Nov 11 |
nicklas |
112 |
DynamicUtil.addReporterColumns(columns, dc, experiment.getVirtualDb().getReporterCloneTemplate(), "rep.", "@", "[Rep] "); |
2813 |
27 Oct 06 |
nicklas |
113 |
DynamicUtil.SelectedInfo selected = DynamicUtil.getSelectedColumns(cc, columns, false); |
6315 |
06 Sep 13 |
nicklas |
114 |
|
6315 |
06 Sep 13 |
nicklas |
115 |
int externalIdColumn = selected.selectedIds.indexOf("rep.externalId") + 1; |
6315 |
06 Sep 13 |
nicklas |
116 |
int reporterIdColumn = selected.selectedIds.indexOf("rep.id") + 1; |
6315 |
06 Sep 13 |
nicklas |
117 |
if (reporterIdColumn <= 0 && externalIdColumn > 0) |
6315 |
06 Sep 13 |
nicklas |
118 |
{ |
6315 |
06 Sep 13 |
nicklas |
119 |
// Force selecting reporter id column if external id is selected |
6315 |
06 Sep 13 |
nicklas |
120 |
selected.selectedIds.add("rep.id"); |
6315 |
06 Sep 13 |
nicklas |
121 |
selected.selectedProperties.add("@id"); |
6315 |
06 Sep 13 |
nicklas |
122 |
reporterIdColumn = selected.selectedIds.size(); |
6315 |
06 Sep 13 |
nicklas |
123 |
} |
2678 |
28 Sep 06 |
nicklas |
124 |
if (bioAssay == null && cc.getSetting("columns").indexOf("COLUMN") >= 0) |
2678 |
28 Sep 06 |
nicklas |
125 |
{ |
2678 |
28 Sep 06 |
nicklas |
126 |
selected.selectedIds.add("COLUMN"); |
2678 |
28 Sep 06 |
nicklas |
127 |
selected.selectedProperties.add("COLUMN"); |
2678 |
28 Sep 06 |
nicklas |
128 |
} |
2102 |
22 Mar 06 |
nicklas |
129 |
try |
2102 |
22 Mar 06 |
nicklas |
130 |
{ |
7603 |
22 Feb 19 |
nicklas |
131 |
final SqlQuery query = bioAssay != null ? bioAssay.getSpotData() : bioAssaySet.getSpotData(); |
2664 |
26 Sep 06 |
nicklas |
132 |
cc.configureQuery(dc, query, selected.selectedProperties); |
5881 |
21 Nov 11 |
nicklas |
133 |
query.setFailSafe(true); |
2102 |
22 Mar 06 |
nicklas |
134 |
spotData = query.iterate(dc); |
2102 |
22 Mar 06 |
nicklas |
135 |
} |
2102 |
22 Mar 06 |
nicklas |
136 |
catch (Throwable t) |
2102 |
22 Mar 06 |
nicklas |
137 |
{ |
2102 |
22 Mar 06 |
nicklas |
138 |
cc.setMessage(t.getMessage()); |
4928 |
13 May 09 |
nicklas |
139 |
t.printStackTrace(); |
2102 |
22 Mar 06 |
nicklas |
140 |
} |
2733 |
16 Oct 06 |
nicklas |
141 |
|
2102 |
22 Mar 06 |
nicklas |
142 |
int numListed = 0; |
4872 |
02 Apr 09 |
nicklas |
143 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, |
4872 |
02 Apr 09 |
nicklas |
144 |
guiContext, bioAssay == null ? bioAssaySet : bioAssay); |
7604 |
25 Feb 19 |
nicklas |
145 |
ExtensionsInvoker<ButtonAction> invoker = ToolbarUtil.useExtensions(jspContext); |
7604 |
25 Feb 19 |
nicklas |
146 |
ExtensionsInvoker<OverviewPlotAction> overviewPlotInvoker = bioAssay != null ? |
7605 |
26 Feb 19 |
nicklas |
147 |
null : ExtensionsControl.useExtensions(jspContext, "net.sf.basedb.clients.web.bioassayset.overviewplots"); |
2102 |
22 Mar 06 |
nicklas |
148 |
%> |
2102 |
22 Mar 06 |
nicklas |
149 |
<base:page title="<%=title%>"> |
6315 |
06 Sep 13 |
nicklas |
150 |
<base:head scripts="table.js,tabcontrol-2.js,~spotdata.js" styles="table.css,toolbar.css,headertabcontrol.css,path.css"> |
4871 |
01 Apr 09 |
nicklas |
151 |
<ext:scripts context="<%=jspContext%>" /> |
4871 |
01 Apr 09 |
nicklas |
152 |
<ext:stylesheets context="<%=jspContext%>" /> |
7943 |
04 May 21 |
nicklas |
153 |
<style> |
7943 |
04 May 21 |
nicklas |
154 |
.row-index > div |
7943 |
04 May 21 |
nicklas |
155 |
{ |
7943 |
04 May 21 |
nicklas |
156 |
grid-template-columns: 1fr !important; |
7943 |
04 May 21 |
nicklas |
157 |
} |
7943 |
04 May 21 |
nicklas |
158 |
.row-index .index |
7943 |
04 May 21 |
nicklas |
159 |
{ |
7943 |
04 May 21 |
nicklas |
160 |
padding-right: 3px; |
7943 |
04 May 21 |
nicklas |
161 |
} |
7943 |
04 May 21 |
nicklas |
162 |
</style> |
2102 |
22 Mar 06 |
nicklas |
163 |
</base:head> |
2102 |
22 Mar 06 |
nicklas |
164 |
<base:body> |
2102 |
22 Mar 06 |
nicklas |
165 |
<p:path> |
5952 |
10 Feb 12 |
nicklas |
166 |
<p:pathelement |
5952 |
10 Feb 12 |
nicklas |
167 |
title="Experiments" href="<%="../index.jsp?ID="+ID%>" |
5952 |
10 Feb 12 |
nicklas |
168 |
/><p:pathelement title="<%=HTML.encodeTags(experiment.getName())%>" |
6143 |
20 Sep 12 |
nicklas |
169 |
href="<%="../bioassaysets/index.jsp?ID="+ID+"&experiment_id="+experiment.getId()%>" |
5952 |
10 Feb 12 |
nicklas |
170 |
/><% |
2678 |
28 Sep 06 |
nicklas |
171 |
if (bioAssay == null) |
2678 |
28 Sep 06 |
nicklas |
172 |
{ |
5952 |
10 Feb 12 |
nicklas |
173 |
%><p:pathelement title="<%=HTML.encodeTags(bioAssaySet.getName())%>" |
5952 |
10 Feb 12 |
nicklas |
174 |
/><% |
2678 |
28 Sep 06 |
nicklas |
175 |
} |
2678 |
28 Sep 06 |
nicklas |
176 |
else |
2678 |
28 Sep 06 |
nicklas |
177 |
{ |
5952 |
10 Feb 12 |
nicklas |
178 |
%><p:pathelement title="<%=HTML.encodeTags(bioAssaySet.getName())%>" |
6143 |
20 Sep 12 |
nicklas |
179 |
href="<%="../bioassays/index.jsp?ID="+ID+"&bioassayset_id="+bioAssaySet.getId()%>" |
5952 |
10 Feb 12 |
nicklas |
180 |
/><p:pathelement title="<%=HTML.encodeTags(bioAssay.getName())%>" |
5952 |
10 Feb 12 |
nicklas |
181 |
/><% |
2678 |
28 Sep 06 |
nicklas |
182 |
} |
5952 |
10 Feb 12 |
nicklas |
183 |
%></p:path> |
2102 |
22 Mar 06 |
nicklas |
184 |
|
5952 |
10 Feb 12 |
nicklas |
185 |
<t:tabcontrol |
5952 |
10 Feb 12 |
nicklas |
186 |
id="main" |
5952 |
10 Feb 12 |
nicklas |
187 |
subclass="mastertabcontrol content" |
6315 |
06 Sep 13 |
nicklas |
188 |
active="spotdata"> |
6315 |
06 Sep 13 |
nicklas |
189 |
<t:tab id="bioassayset.properties" title="Properties" visible="<%=bioAssay == null%>"/> |
6315 |
06 Sep 13 |
nicklas |
190 |
<t:tab id="bioassay.properties" title="Properties" visible="<%=bioAssay != null%>"/> |
2892 |
10 Nov 06 |
nicklas |
191 |
|
6315 |
06 Sep 13 |
nicklas |
192 |
<t:tab id="bioassayset.annotations" title="Annotations" |
6315 |
06 Sep 13 |
nicklas |
193 |
tooltip="View annotation values" visible="<%=bioAssay == null%>" /> |
6315 |
06 Sep 13 |
nicklas |
194 |
<t:tab id="bioassay.annotations" title="Annotations" |
2892 |
10 Nov 06 |
nicklas |
195 |
tooltip="View annotation values" visible="<%=bioAssay != null%>" /> |
2892 |
10 Nov 06 |
nicklas |
196 |
|
2678 |
28 Sep 06 |
nicklas |
197 |
<t:tab id="bioassays" visible="<%=bioAssay == null%>" title="BioAssays" /> |
2102 |
22 Mar 06 |
nicklas |
198 |
<t:tab id="spotdata" title="Spot data" > |
2102 |
22 Mar 06 |
nicklas |
199 |
<tbl:table |
2102 |
22 Mar 06 |
nicklas |
200 |
id="spotdata" |
2102 |
22 Mar 06 |
nicklas |
201 |
columns="<%=cc.getSetting("columns")%>" |
2102 |
22 Mar 06 |
nicklas |
202 |
sortby="<%=cc.getSortProperty()%>" |
2102 |
22 Mar 06 |
nicklas |
203 |
direction="<%=cc.getSortDirection()%>" |
2102 |
22 Mar 06 |
nicklas |
204 |
action="index.jsp" |
2102 |
22 Mar 06 |
nicklas |
205 |
sc="<%=sc%>" |
2102 |
22 Mar 06 |
nicklas |
206 |
item="<%=itemType%>" |
2102 |
22 Mar 06 |
nicklas |
207 |
subcontext="<%=subContext%>" |
6700 |
30 Jan 15 |
nicklas |
208 |
filterrows="<%=cc.getFilterRows()%>" |
5952 |
10 Feb 12 |
nicklas |
209 |
subclass="fulltable" |
7982 |
14 Jun 21 |
nicklas |
210 |
stickyheaders="<%=cc.getSetting("columns.sticky", "rep.externalId")%>" |
2102 |
22 Mar 06 |
nicklas |
211 |
> |
2102 |
22 Mar 06 |
nicklas |
212 |
<tbl:hidden |
2102 |
22 Mar 06 |
nicklas |
213 |
name="mode" |
2102 |
22 Mar 06 |
nicklas |
214 |
value="<%=mode.getName()%>" |
2102 |
22 Mar 06 |
nicklas |
215 |
/> |
2102 |
22 Mar 06 |
nicklas |
216 |
<tbl:hidden |
2678 |
28 Sep 06 |
nicklas |
217 |
name="bioassayset_id" |
2678 |
28 Sep 06 |
nicklas |
218 |
value="<%=String.valueOf(bioAssaySetId)%>" |
2678 |
28 Sep 06 |
nicklas |
219 |
/> |
2678 |
28 Sep 06 |
nicklas |
220 |
<tbl:hidden |
2102 |
22 Mar 06 |
nicklas |
221 |
name="bioassay_id" |
2102 |
22 Mar 06 |
nicklas |
222 |
value="<%=String.valueOf(bioAssayId)%>" |
2102 |
22 Mar 06 |
nicklas |
223 |
/> |
2102 |
22 Mar 06 |
nicklas |
224 |
<tbl:hidden |
2102 |
22 Mar 06 |
nicklas |
225 |
name="callback" |
2102 |
22 Mar 06 |
nicklas |
226 |
value="<%=callback%>" |
2102 |
22 Mar 06 |
nicklas |
227 |
skip="<%=callback == null%>" |
2102 |
22 Mar 06 |
nicklas |
228 |
/> |
2102 |
22 Mar 06 |
nicklas |
229 |
<% |
2102 |
22 Mar 06 |
nicklas |
230 |
for (TableColumn tc : columns) |
2102 |
22 Mar 06 |
nicklas |
231 |
{ |
2102 |
22 Mar 06 |
nicklas |
232 |
%> |
2102 |
22 Mar 06 |
nicklas |
233 |
<tbl:columndef |
2102 |
22 Mar 06 |
nicklas |
234 |
id="<%=tc.getId()%>" |
2102 |
22 Mar 06 |
nicklas |
235 |
property="<%=tc.getProperty()%>" |
4916 |
30 Apr 09 |
nicklas |
236 |
tooltip="<%=tc.getDescription()%>" |
2102 |
22 Mar 06 |
nicklas |
237 |
datatype="<%=tc.getDatatype().getStringValue()%>" |
4371 |
03 Jul 08 |
nicklas |
238 |
title="<%=HTML.encodeTags(tc.getTitle())%>" |
2102 |
22 Mar 06 |
nicklas |
239 |
sortable="<%=tc.getSortable()%>" |
2102 |
22 Mar 06 |
nicklas |
240 |
filterable="<%=tc.getFilterable()%>" |
2102 |
22 Mar 06 |
nicklas |
241 |
exportable="<%=tc.getExportable()%>" |
2102 |
22 Mar 06 |
nicklas |
242 |
show="<%=tc.getShow()%>" |
2733 |
16 Oct 06 |
nicklas |
243 |
formatter="<%=tc.getFormatter()%>" |
2102 |
22 Mar 06 |
nicklas |
244 |
/> |
2102 |
22 Mar 06 |
nicklas |
245 |
<% |
2102 |
22 Mar 06 |
nicklas |
246 |
} |
2102 |
22 Mar 06 |
nicklas |
247 |
%> |
2678 |
28 Sep 06 |
nicklas |
248 |
<% |
2678 |
28 Sep 06 |
nicklas |
249 |
if (bioAssay == null) |
2678 |
28 Sep 06 |
nicklas |
250 |
{ |
4857 |
27 Mar 09 |
nicklas |
251 |
Map<Number, String> bioAssayMap = new HashMap<Number, String>(); |
2678 |
28 Sep 06 |
nicklas |
252 |
Enumeration<String, String> bioAssayEnum = new Enumeration<String, String>(); |
2678 |
28 Sep 06 |
nicklas |
253 |
for (BioAssay ba : bioAssaySet.getBioAssays().list(dc)) |
2678 |
28 Sep 06 |
nicklas |
254 |
{ |
4857 |
27 Mar 09 |
nicklas |
255 |
short columnNo = ba.getDataCubeColumnNo(); |
4857 |
27 Mar 09 |
nicklas |
256 |
String linkedBioAssay = Base.getLinkedName(ID, ba, false, true); |
4857 |
27 Mar 09 |
nicklas |
257 |
// Safety measure, since JDBC driver seems to return 'short' as 'int' |
4857 |
27 Mar 09 |
nicklas |
258 |
bioAssayMap.put(columnNo, linkedBioAssay); |
4857 |
27 Mar 09 |
nicklas |
259 |
bioAssayMap.put((int)columnNo, linkedBioAssay); |
2678 |
28 Sep 06 |
nicklas |
260 |
bioAssayEnum.add(String.valueOf(columnNo), HTML.encodeTags(ba.getName())); |
2678 |
28 Sep 06 |
nicklas |
261 |
} |
2678 |
28 Sep 06 |
nicklas |
262 |
%> |
2678 |
28 Sep 06 |
nicklas |
263 |
<tbl:columndef |
2678 |
28 Sep 06 |
nicklas |
264 |
id="COLUMN" |
2678 |
28 Sep 06 |
nicklas |
265 |
property="COLUMN" |
2678 |
28 Sep 06 |
nicklas |
266 |
datatype="int" |
2678 |
28 Sep 06 |
nicklas |
267 |
title="Bioassay" |
2678 |
28 Sep 06 |
nicklas |
268 |
sortable="true" |
2678 |
28 Sep 06 |
nicklas |
269 |
filterable="true" |
2678 |
28 Sep 06 |
nicklas |
270 |
exportable="true" |
2678 |
28 Sep 06 |
nicklas |
271 |
enumeration="<%=bioAssayEnum%>" |
4857 |
27 Mar 09 |
nicklas |
272 |
formatter="<%=new LookupFormatter<Number>(bioAssayMap)%>" |
2678 |
28 Sep 06 |
nicklas |
273 |
/> |
2678 |
28 Sep 06 |
nicklas |
274 |
<% |
2678 |
28 Sep 06 |
nicklas |
275 |
} |
2678 |
28 Sep 06 |
nicklas |
276 |
%> |
4302 |
19 May 08 |
nicklas |
277 |
<tbl:columndef |
4302 |
19 May 08 |
nicklas |
278 |
id="reporterList" |
5425 |
23 Sep 10 |
nicklas |
279 |
property="£reporterList" |
4302 |
19 May 08 |
nicklas |
280 |
datatype="int" |
4302 |
19 May 08 |
nicklas |
281 |
title="Reporter list" |
4302 |
19 May 08 |
nicklas |
282 |
filterable="true" |
4302 |
19 May 08 |
nicklas |
283 |
enumeration="<%=Base.getReporterListsEnum(dc)%>" |
4302 |
19 May 08 |
nicklas |
284 |
multiple="false" |
4302 |
19 May 08 |
nicklas |
285 |
/> |
6604 |
18 Nov 14 |
nicklas |
286 |
<div class="panelgroup bg-filled-50 bottomborder"> |
5952 |
10 Feb 12 |
nicklas |
287 |
<tbl:toolbar |
5952 |
10 Feb 12 |
nicklas |
288 |
subclass="bottomborder" |
5952 |
10 Feb 12 |
nicklas |
289 |
visible="<%=mode.hasToolbar()%>" |
5952 |
10 Feb 12 |
nicklas |
290 |
> |
5952 |
10 Feb 12 |
nicklas |
291 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
292 |
id="btnColumns" |
5952 |
10 Feb 12 |
nicklas |
293 |
image="columns.png" |
5952 |
10 Feb 12 |
nicklas |
294 |
title="Columns…" |
5952 |
10 Feb 12 |
nicklas |
295 |
tooltip="Show, hide and re-order columns" |
5952 |
10 Feb 12 |
nicklas |
296 |
/> |
5952 |
10 Feb 12 |
nicklas |
297 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
298 |
id="btnNewReporterList" |
5952 |
10 Feb 12 |
nicklas |
299 |
image="add.png" |
5952 |
10 Feb 12 |
nicklas |
300 |
title="New reporter list…" |
5952 |
10 Feb 12 |
nicklas |
301 |
tooltip="Create a new reporter list from matching spots" |
5952 |
10 Feb 12 |
nicklas |
302 |
visible="<%=sc.hasPermission(Permission.CREATE, Item.REPORTERLIST)%>" |
5952 |
10 Feb 12 |
nicklas |
303 |
/> |
5952 |
10 Feb 12 |
nicklas |
304 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
305 |
id="btnExport" |
6315 |
06 Sep 13 |
nicklas |
306 |
data-plugin-type="EXPORT" |
5952 |
10 Feb 12 |
nicklas |
307 |
image="export.png" |
5952 |
10 Feb 12 |
nicklas |
308 |
title="Export…" |
5952 |
10 Feb 12 |
nicklas |
309 |
tooltip="Export data" |
5952 |
10 Feb 12 |
nicklas |
310 |
visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" |
5952 |
10 Feb 12 |
nicklas |
311 |
/> |
5952 |
10 Feb 12 |
nicklas |
312 |
<ext:render extensions="<%=invoker%>" context="<%=jspContext%>" |
7604 |
25 Feb 19 |
nicklas |
313 |
wrapper="<%=new PrefixSuffixRenderer<ButtonAction>(jspContext, "<td>", "</td>") %>"/> |
5952 |
10 Feb 12 |
nicklas |
314 |
</tbl:toolbar> |
5952 |
10 Feb 12 |
nicklas |
315 |
<tbl:panel> |
6182 |
23 Oct 12 |
nicklas |
316 |
<tbl:presetselector /> |
5952 |
10 Feb 12 |
nicklas |
317 |
<tbl:navigator |
5952 |
10 Feb 12 |
nicklas |
318 |
page="<%=cc.getPage()%>" |
5952 |
10 Feb 12 |
nicklas |
319 |
rowsperpage="<%=cc.getRowsPerPage()%>" |
5952 |
10 Feb 12 |
nicklas |
320 |
totalrows="<%=spotData == null ? 0 : spotData.getTotalCount()%>" |
5952 |
10 Feb 12 |
nicklas |
321 |
visible="<%=mode.hasNavigator()%>" |
5952 |
10 Feb 12 |
nicklas |
322 |
/> |
5952 |
10 Feb 12 |
nicklas |
323 |
</tbl:panel> |
5952 |
10 Feb 12 |
nicklas |
324 |
</div> |
2102 |
22 Mar 06 |
nicklas |
325 |
<tbl:data> |
5949 |
08 Feb 12 |
nicklas |
326 |
<tbl:headers> |
5949 |
08 Feb 12 |
nicklas |
327 |
<tbl:headerrow> |
7943 |
04 May 21 |
nicklas |
328 |
<tbl:header clazz="row-index bg-filled-100" /> |
5949 |
08 Feb 12 |
nicklas |
329 |
<tbl:columnheaders /> |
5949 |
08 Feb 12 |
nicklas |
330 |
</tbl:headerrow> |
6700 |
30 Jan 15 |
nicklas |
331 |
<% |
6700 |
30 Jan 15 |
nicklas |
332 |
int numFilters = cc.getNumPropertyFilters(); |
6700 |
30 Jan 15 |
nicklas |
333 |
int numRows = cc.getFilterRows(); |
6700 |
30 Jan 15 |
nicklas |
334 |
for (int filterNo = 0; filterNo < numRows; filterNo++) |
6700 |
30 Jan 15 |
nicklas |
335 |
{ |
6700 |
30 Jan 15 |
nicklas |
336 |
boolean lastRow = filterNo == numRows-1; |
6700 |
30 Jan 15 |
nicklas |
337 |
%> |
6700 |
30 Jan 15 |
nicklas |
338 |
<tbl:headerrow> |
7943 |
04 May 21 |
nicklas |
339 |
<tbl:header subclass="row-index bg-filled-100"> |
7943 |
04 May 21 |
nicklas |
340 |
<div class="index-<%=mode.getName()%>"> |
7943 |
04 May 21 |
nicklas |
341 |
<div class="icons"> |
7943 |
04 May 21 |
nicklas |
342 |
<base:icon |
7943 |
04 May 21 |
nicklas |
343 |
subclass="link table-filter-row-action" |
7943 |
04 May 21 |
nicklas |
344 |
image="add.png" |
7943 |
04 May 21 |
nicklas |
345 |
tooltip="Add extra filter row" |
7943 |
04 May 21 |
nicklas |
346 |
visible="<%=lastRow%>" |
7943 |
04 May 21 |
nicklas |
347 |
/><base:icon |
7943 |
04 May 21 |
nicklas |
348 |
subclass="link table-filter-row-action" |
7943 |
04 May 21 |
nicklas |
349 |
image="remove.png" |
7943 |
04 May 21 |
nicklas |
350 |
tooltip="Remove this filter row" |
7943 |
04 May 21 |
nicklas |
351 |
visible="<%=numRows > 1 || numFilters > 0 %>" |
7943 |
04 May 21 |
nicklas |
352 |
data-remove-row="<%=filterNo%>" |
7943 |
04 May 21 |
nicklas |
353 |
/> |
7943 |
04 May 21 |
nicklas |
354 |
</div> |
7943 |
04 May 21 |
nicklas |
355 |
</div> |
6700 |
30 Jan 15 |
nicklas |
356 |
</tbl:header> |
6700 |
30 Jan 15 |
nicklas |
357 |
<tbl:propertyfilter row="<%=filterNo%>" /> |
6700 |
30 Jan 15 |
nicklas |
358 |
</tbl:headerrow> |
6700 |
30 Jan 15 |
nicklas |
359 |
<% |
6700 |
30 Jan 15 |
nicklas |
360 |
} |
6700 |
30 Jan 15 |
nicklas |
361 |
%> |
7913 |
22 Feb 21 |
nicklas |
362 |
<tbl:columnsubtitles /> |
5949 |
08 Feb 12 |
nicklas |
363 |
</tbl:headers> |
5949 |
08 Feb 12 |
nicklas |
364 |
<tbl:rows> |
2102 |
22 Mar 06 |
nicklas |
365 |
<% |
5952 |
10 Feb 12 |
nicklas |
366 |
if (cc.getMessage() != null) |
5952 |
10 Feb 12 |
nicklas |
367 |
{ |
5952 |
10 Feb 12 |
nicklas |
368 |
%> |
6604 |
18 Nov 14 |
nicklas |
369 |
<tbl:panel subclass="bg-filled-50"> |
5952 |
10 Feb 12 |
nicklas |
370 |
<div class="messagecontainer error"><%=cc.getMessage()%></div> |
5952 |
10 Feb 12 |
nicklas |
371 |
</tbl:panel> |
5952 |
10 Feb 12 |
nicklas |
372 |
<% |
5952 |
10 Feb 12 |
nicklas |
373 |
cc.setMessage(null); |
5952 |
10 Feb 12 |
nicklas |
374 |
} |
2102 |
22 Mar 06 |
nicklas |
375 |
int index = cc.getPage()*cc.getRowsPerPage(); |
2102 |
22 Mar 06 |
nicklas |
376 |
int selectedItemId = cc.getId(); |
2102 |
22 Mar 06 |
nicklas |
377 |
if (spotData != null) |
2102 |
22 Mar 06 |
nicklas |
378 |
{ |
6315 |
06 Sep 13 |
nicklas |
379 |
boolean writeReporterPermission = sc.hasPermission(Permission.WRITE, Item.REPORTER); |
6315 |
06 Sep 13 |
nicklas |
380 |
String tooltip = "View this item" + (writeReporterPermission ? " (use CTRL, ALT or SHIFT to edit)" : ""); |
2102 |
22 Mar 06 |
nicklas |
381 |
while (spotData.hasNext()) |
2102 |
22 Mar 06 |
nicklas |
382 |
{ |
2102 |
22 Mar 06 |
nicklas |
383 |
SqlResult item = spotData.next(); |
2102 |
22 Mar 06 |
nicklas |
384 |
index++; |
2102 |
22 Mar 06 |
nicklas |
385 |
numListed++; |
2102 |
22 Mar 06 |
nicklas |
386 |
%> |
2102 |
22 Mar 06 |
nicklas |
387 |
<tbl:row> |
7943 |
04 May 21 |
nicklas |
388 |
<tbl:header clazz="row-index bg-filled-100"> |
7943 |
04 May 21 |
nicklas |
389 |
<div class="index-<%=mode.getName()%>"> |
7943 |
04 May 21 |
nicklas |
390 |
<div class="index <%=index>999?"index-smaller":""%>"><%=index%></div> |
7943 |
04 May 21 |
nicklas |
391 |
</div> |
7943 |
04 May 21 |
nicklas |
392 |
</tbl:header> |
2102 |
22 Mar 06 |
nicklas |
393 |
<% |
2102 |
22 Mar 06 |
nicklas |
394 |
int i = 1; |
2102 |
22 Mar 06 |
nicklas |
395 |
for (String columnId : selected.selectedIds) |
2102 |
22 Mar 06 |
nicklas |
396 |
{ |
6315 |
06 Sep 13 |
nicklas |
397 |
if (i == externalIdColumn) |
6315 |
06 Sep 13 |
nicklas |
398 |
{ |
6315 |
06 Sep 13 |
nicklas |
399 |
%> |
6315 |
06 Sep 13 |
nicklas |
400 |
<tbl:cell column="<%=columnId%>"><div |
6315 |
06 Sep 13 |
nicklas |
401 |
class="link auto-init" |
6315 |
06 Sep 13 |
nicklas |
402 |
data-auto-init="item-link" |
6315 |
06 Sep 13 |
nicklas |
403 |
data-item-id="<%=item.getInt(reporterIdColumn)%>" |
6315 |
06 Sep 13 |
nicklas |
404 |
data-item-type="REPORTER" |
6315 |
06 Sep 13 |
nicklas |
405 |
data-no-edit="<%=writeReporterPermission ? 0 : 1 %>" |
6315 |
06 Sep 13 |
nicklas |
406 |
tabindex="0" |
6315 |
06 Sep 13 |
nicklas |
407 |
title="<%=tooltip%>"><%=HTML.encodeTags(item.getString(i++))%></div></tbl:cell> |
6315 |
06 Sep 13 |
nicklas |
408 |
<% |
6315 |
06 Sep 13 |
nicklas |
409 |
} |
6315 |
06 Sep 13 |
nicklas |
410 |
else |
6315 |
06 Sep 13 |
nicklas |
411 |
{ |
6315 |
06 Sep 13 |
nicklas |
412 |
%> |
6315 |
06 Sep 13 |
nicklas |
413 |
<tbl:cell column="<%=columnId%>" value="<%=item.getObject(i++)%>" /> |
6315 |
06 Sep 13 |
nicklas |
414 |
<% |
6315 |
06 Sep 13 |
nicklas |
415 |
} |
2102 |
22 Mar 06 |
nicklas |
416 |
} |
2102 |
22 Mar 06 |
nicklas |
417 |
%> |
2102 |
22 Mar 06 |
nicklas |
418 |
</tbl:row> |
2102 |
22 Mar 06 |
nicklas |
419 |
<% |
2102 |
22 Mar 06 |
nicklas |
420 |
} |
2102 |
22 Mar 06 |
nicklas |
421 |
} |
5952 |
10 Feb 12 |
nicklas |
422 |
if (numListed == 0) |
5952 |
10 Feb 12 |
nicklas |
423 |
{ |
5952 |
10 Feb 12 |
nicklas |
424 |
%> |
6604 |
18 Nov 14 |
nicklas |
425 |
<tbl:panel subclass="bg-filled-50"> |
5952 |
10 Feb 12 |
nicklas |
426 |
<div class="messagecontainer note"> |
5952 |
10 Feb 12 |
nicklas |
427 |
<%=spotData == null || spotData.getTotalCount() == 0 ? "No spot data were found" : "No spot data on this page. Please select another page!" %> |
5952 |
10 Feb 12 |
nicklas |
428 |
</div> |
5952 |
10 Feb 12 |
nicklas |
429 |
</tbl:panel> |
5952 |
10 Feb 12 |
nicklas |
430 |
<% |
5952 |
10 Feb 12 |
nicklas |
431 |
} |
2102 |
22 Mar 06 |
nicklas |
432 |
%> |
2102 |
22 Mar 06 |
nicklas |
433 |
</tbl:rows> |
2102 |
22 Mar 06 |
nicklas |
434 |
</tbl:data> |
2102 |
22 Mar 06 |
nicklas |
435 |
</tbl:table> |
2102 |
22 Mar 06 |
nicklas |
436 |
</t:tab> |
2678 |
28 Sep 06 |
nicklas |
437 |
|
6315 |
06 Sep 13 |
nicklas |
438 |
<t:tab id="bioassayset.overviewplots" title="Overview plots" |
4908 |
28 Apr 09 |
nicklas |
439 |
visible="<%=overviewPlotInvoker != null && overviewPlotInvoker.getNumExtensions() > 0%>" |
2678 |
28 Sep 06 |
nicklas |
440 |
/> |
2102 |
22 Mar 06 |
nicklas |
441 |
</t:tabcontrol> |
2102 |
22 Mar 06 |
nicklas |
442 |
|
5952 |
10 Feb 12 |
nicklas |
443 |
<base:buttongroup> |
6315 |
06 Sep 13 |
nicklas |
444 |
<base:button id="btnOk" title="Ok" visible="<%=mode.hasOkButton()%>" /> |
6315 |
06 Sep 13 |
nicklas |
445 |
<base:button id="close" title="Cancel" visible="<%=mode.hasCancelButton()%>" /> |
6315 |
06 Sep 13 |
nicklas |
446 |
<base:button id="close" title="Close" visible="<%=mode.hasCloseButton()%>" /> |
5952 |
10 Feb 12 |
nicklas |
447 |
</base:buttongroup> |
5952 |
10 Feb 12 |
nicklas |
448 |
|
2102 |
22 Mar 06 |
nicklas |
449 |
</base:body> |
2102 |
22 Mar 06 |
nicklas |
450 |
</base:page> |
2102 |
22 Mar 06 |
nicklas |
451 |
<% |
2102 |
22 Mar 06 |
nicklas |
452 |
} |
2102 |
22 Mar 06 |
nicklas |
453 |
finally |
2102 |
22 Mar 06 |
nicklas |
454 |
{ |
2102 |
22 Mar 06 |
nicklas |
455 |
if (dc != null) dc.close(); |
2102 |
22 Mar 06 |
nicklas |
456 |
} |
2102 |
22 Mar 06 |
nicklas |
457 |
%> |