2487 |
04 Aug 06 |
nicklas |
1 |
<%-- $Id$ |
2487 |
04 Aug 06 |
nicklas |
2 |
------------------------------------------------------------------ |
3675 |
16 Aug 07 |
jari |
Copyright (C) 2006 Johan Enell, Nicklas Nordborg |
3675 |
16 Aug 07 |
jari |
Copyright (C) 2007 Nicklas Nordborg |
2487 |
04 Aug 06 |
nicklas |
5 |
|
2487 |
04 Aug 06 |
nicklas |
6 |
This file is part of BASE - BioArray Software Environment. |
2487 |
04 Aug 06 |
nicklas |
7 |
Available at http://base.thep.lu.se/ |
2487 |
04 Aug 06 |
nicklas |
8 |
|
2487 |
04 Aug 06 |
nicklas |
9 |
BASE is free software; you can redistribute it and/or |
2487 |
04 Aug 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 |
2487 |
04 Aug 06 |
nicklas |
12 |
of the License, or (at your option) any later version. |
2487 |
04 Aug 06 |
nicklas |
13 |
|
2487 |
04 Aug 06 |
nicklas |
14 |
BASE is distributed in the hope that it will be useful, |
2487 |
04 Aug 06 |
nicklas |
15 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
2487 |
04 Aug 06 |
nicklas |
16 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2487 |
04 Aug 06 |
nicklas |
17 |
GNU General Public License for more details. |
2487 |
04 Aug 06 |
nicklas |
18 |
|
2487 |
04 Aug 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/>. |
2487 |
04 Aug 06 |
nicklas |
21 |
------------------------------------------------------------------ |
2487 |
04 Aug 06 |
nicklas |
22 |
|
2487 |
04 Aug 06 |
nicklas |
23 |
@author Nicklas |
2487 |
04 Aug 06 |
nicklas |
24 |
@version 2.0 |
2487 |
04 Aug 06 |
nicklas |
25 |
--%> |
5426 |
24 Sep 10 |
nicklas |
26 |
<%@ page pageEncoding="UTF-8" session="false" |
2487 |
04 Aug 06 |
nicklas |
27 |
import="net.sf.basedb.core.SessionControl" |
2487 |
04 Aug 06 |
nicklas |
28 |
import="net.sf.basedb.core.DbControl" |
2487 |
04 Aug 06 |
nicklas |
29 |
import="net.sf.basedb.core.Item" |
2487 |
04 Aug 06 |
nicklas |
30 |
import="net.sf.basedb.core.ItemContext" |
2514 |
11 Aug 06 |
nicklas |
31 |
import="net.sf.basedb.core.PropertyFilter" |
2490 |
08 Aug 06 |
nicklas |
32 |
import="net.sf.basedb.core.Include" |
2487 |
04 Aug 06 |
nicklas |
33 |
import="net.sf.basedb.core.BioAssaySet" |
2490 |
08 Aug 06 |
nicklas |
34 |
import="net.sf.basedb.core.BioAssay" |
2487 |
04 Aug 06 |
nicklas |
35 |
import="net.sf.basedb.core.Experiment" |
2487 |
04 Aug 06 |
nicklas |
36 |
import="net.sf.basedb.core.RawDataType" |
2490 |
08 Aug 06 |
nicklas |
37 |
import="net.sf.basedb.core.RawBioAssay" |
2490 |
08 Aug 06 |
nicklas |
38 |
import="net.sf.basedb.core.RawDataUtil" |
2487 |
04 Aug 06 |
nicklas |
39 |
import="net.sf.basedb.core.ExtendedProperties" |
2487 |
04 Aug 06 |
nicklas |
40 |
import="net.sf.basedb.core.ExtendedProperty" |
2490 |
08 Aug 06 |
nicklas |
41 |
import="net.sf.basedb.core.AnnotationType" |
2490 |
08 Aug 06 |
nicklas |
42 |
import="net.sf.basedb.core.Annotation" |
2490 |
08 Aug 06 |
nicklas |
43 |
import="net.sf.basedb.core.Formula" |
4916 |
30 Apr 09 |
nicklas |
44 |
import="net.sf.basedb.core.IntensityTransform" |
2490 |
08 Aug 06 |
nicklas |
45 |
import="net.sf.basedb.core.ItemQuery" |
2502 |
09 Aug 06 |
nicklas |
46 |
import="net.sf.basedb.core.ItemResultList" |
2487 |
04 Aug 06 |
nicklas |
47 |
import="net.sf.basedb.core.DynamicSpotQuery" |
2487 |
04 Aug 06 |
nicklas |
48 |
import="net.sf.basedb.core.DynamicResultIterator" |
2487 |
04 Aug 06 |
nicklas |
49 |
import="net.sf.basedb.core.VirtualColumn" |
2490 |
08 Aug 06 |
nicklas |
50 |
import="net.sf.basedb.core.Type" |
2487 |
04 Aug 06 |
nicklas |
51 |
import="net.sf.basedb.core.data.ReporterData" |
2490 |
08 Aug 06 |
nicklas |
52 |
import="net.sf.basedb.core.data.RawData" |
2487 |
04 Aug 06 |
nicklas |
53 |
import="net.sf.basedb.core.query.Restrictions" |
2487 |
04 Aug 06 |
nicklas |
54 |
import="net.sf.basedb.core.query.Expressions" |
2487 |
04 Aug 06 |
nicklas |
55 |
import="net.sf.basedb.core.query.Dynamic" |
2487 |
04 Aug 06 |
nicklas |
56 |
import="net.sf.basedb.core.query.Orders" |
2487 |
04 Aug 06 |
nicklas |
57 |
import="net.sf.basedb.core.query.Selects" |
2487 |
04 Aug 06 |
nicklas |
58 |
import="net.sf.basedb.core.query.Aggregations" |
2502 |
09 Aug 06 |
nicklas |
59 |
import="net.sf.basedb.core.query.Hql" |
2487 |
04 Aug 06 |
nicklas |
60 |
import="net.sf.basedb.core.query.JoinType" |
2487 |
04 Aug 06 |
nicklas |
61 |
import="net.sf.basedb.core.query.SqlResult" |
2668 |
27 Sep 06 |
nicklas |
62 |
import="net.sf.basedb.util.Values" |
2487 |
04 Aug 06 |
nicklas |
63 |
import="net.sf.basedb.clients.web.Base" |
2487 |
04 Aug 06 |
nicklas |
64 |
import="net.sf.basedb.clients.web.DynamicUtil" |
2487 |
04 Aug 06 |
nicklas |
65 |
import="net.sf.basedb.clients.web.ExperimentExplorer" |
2514 |
11 Aug 06 |
nicklas |
66 |
import="net.sf.basedb.clients.web.ExperimentExplorer.AnnotationSummary" |
2514 |
11 Aug 06 |
nicklas |
67 |
import="net.sf.basedb.clients.web.ExperimentExplorer.AnnotationGroup" |
2487 |
04 Aug 06 |
nicklas |
68 |
import="net.sf.basedb.clients.web.WebException" |
2487 |
04 Aug 06 |
nicklas |
69 |
import="net.sf.basedb.clients.web.util.HTML" |
2942 |
22 Nov 06 |
nicklas |
70 |
import="net.sf.basedb.util.formatter.Formatter" |
2733 |
16 Oct 06 |
nicklas |
71 |
import="net.sf.basedb.clients.web.formatter.FormatterFactory" |
2487 |
04 Aug 06 |
nicklas |
72 |
import="net.sf.basedb.clients.web.taglib.table.TableColumn" |
2487 |
04 Aug 06 |
nicklas |
73 |
import="java.util.Date" |
2487 |
04 Aug 06 |
nicklas |
74 |
import="java.util.List" |
3520 |
20 Jun 07 |
nicklas |
75 |
import="java.util.ArrayList" |
2487 |
04 Aug 06 |
nicklas |
76 |
import="java.util.LinkedList" |
2514 |
11 Aug 06 |
nicklas |
77 |
import="java.util.Collection" |
2813 |
27 Oct 06 |
nicklas |
78 |
import="java.util.Arrays" |
5105 |
28 Sep 09 |
nicklas |
79 |
import="java.util.Set" |
5105 |
28 Sep 09 |
nicklas |
80 |
import="java.util.Map" |
5105 |
28 Sep 09 |
nicklas |
81 |
import="java.util.HashMap" |
6700 |
30 Jan 15 |
nicklas |
82 |
import="java.util.TreeMap" |
6185 |
29 Oct 12 |
nicklas |
83 |
import="org.json.simple.JSONObject" |
6185 |
29 Oct 12 |
nicklas |
84 |
import="org.json.simple.JSONArray" |
2487 |
04 Aug 06 |
nicklas |
85 |
%> |
2487 |
04 Aug 06 |
nicklas |
86 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
2487 |
04 Aug 06 |
nicklas |
87 |
<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %> |
2487 |
04 Aug 06 |
nicklas |
88 |
<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
2487 |
04 Aug 06 |
nicklas |
89 |
<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %> |
2487 |
04 Aug 06 |
nicklas |
90 |
<%! |
2487 |
04 Aug 06 |
nicklas |
91 |
private static final Item itemType = Item.SPOTDATA; |
5940 |
31 Jan 12 |
nicklas |
92 |
private static final String defaultReporterColumns = "filter,externalId,symbol"; |
2487 |
04 Aug 06 |
nicklas |
93 |
%> |
2487 |
04 Aug 06 |
nicklas |
94 |
<% |
2487 |
04 Aug 06 |
nicklas |
95 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
2487 |
04 Aug 06 |
nicklas |
96 |
final String ID = sc.getId(); |
2487 |
04 Aug 06 |
nicklas |
97 |
final float scale = Base.getScale(sc); |
2487 |
04 Aug 06 |
nicklas |
98 |
final String root = request.getContextPath(); |
2487 |
04 Aug 06 |
nicklas |
99 |
|
2487 |
04 Aug 06 |
nicklas |
100 |
final int bioAssaySetId = Values.getInt(request.getParameter("bioassayset_id")); |
7954 |
12 May 21 |
nicklas |
101 |
final DbControl dc = sc.newDbControl(":Experiment explorer"); |
2502 |
09 Aug 06 |
nicklas |
102 |
DynamicResultIterator spotData = null; |
2487 |
04 Aug 06 |
nicklas |
103 |
try |
2487 |
04 Aug 06 |
nicklas |
104 |
{ |
5940 |
31 Jan 12 |
nicklas |
105 |
Formatter<Date> dateTimeFormatter = FormatterFactory.getDateTimeFormatter(sc); |
5940 |
31 Jan 12 |
nicklas |
106 |
Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); |
2487 |
04 Aug 06 |
nicklas |
107 |
String title = null; |
2487 |
04 Aug 06 |
nicklas |
108 |
final BioAssaySet bioAssaySet = BioAssaySet.getById(dc, bioAssaySetId); |
2487 |
04 Aug 06 |
nicklas |
109 |
final Experiment experiment = bioAssaySet.getExperiment(); |
2487 |
04 Aug 06 |
nicklas |
110 |
final RawDataType rawDataType = experiment.getRawDataType(); |
2514 |
11 Aug 06 |
nicklas |
111 |
final int channels = rawDataType.getChannels(); |
2514 |
11 Aug 06 |
nicklas |
112 |
final boolean hasRatio = channels == 2; |
2993 |
01 Dec 06 |
nicklas |
113 |
final int maxRawMappings = bioAssaySet.getMaxRawMappingsForSpot(); |
4916 |
30 Apr 09 |
nicklas |
114 |
final IntensityTransform transform = bioAssaySet.getIntensityTransform(); |
2487 |
04 Aug 06 |
nicklas |
115 |
|
2487 |
04 Aug 06 |
nicklas |
116 |
final ExperimentExplorer explorer = ExperimentExplorer.getExplorer(bioAssaySet); |
2487 |
04 Aug 06 |
nicklas |
117 |
final ItemContext cc = explorer.getAndSetSpotContext(sc, pageContext); |
2490 |
08 Aug 06 |
nicklas |
118 |
final ItemContext reporterContext = explorer.getAndSetReporterContext(sc, null); |
2487 |
04 Aug 06 |
nicklas |
119 |
final String subContext = cc.getSubContext(); |
2490 |
08 Aug 06 |
nicklas |
120 |
|
5885 |
22 Nov 11 |
nicklas |
121 |
List<TableColumn> reporterColumns = new LinkedList<TableColumn>(); |
5885 |
22 Nov 11 |
nicklas |
122 |
DynamicUtil.addReporterColumns(reporterColumns, dc, experiment.getVirtualDb().getReporterCloneTemplate(), "", "@", ""); |
5885 |
22 Nov 11 |
nicklas |
123 |
|
5885 |
22 Nov 11 |
nicklas |
124 |
List<TableColumn> spotColumns = new LinkedList<TableColumn>(); |
5885 |
22 Nov 11 |
nicklas |
125 |
DynamicUtil.addFormulaColumns(spotColumns, dc, rawDataType, Formula.Type.COLUMN_EXPRESSION, |
4917 |
30 Apr 09 |
nicklas |
126 |
transform, "frm.", "", maxRawMappings == 1); |
5885 |
22 Nov 11 |
nicklas |
127 |
DynamicUtil.addExtraColumns(spotColumns, dc, bioAssaySet, "ev", "#", "[Xtra] "); |
2993 |
01 Dec 06 |
nicklas |
128 |
if (maxRawMappings == 1) |
2993 |
01 Dec 06 |
nicklas |
129 |
{ |
5885 |
22 Nov 11 |
nicklas |
130 |
DynamicUtil.addRawDataColumns(spotColumns, dc, rawDataType, "raw.", "$", "[Raw] "); |
2993 |
01 Dec 06 |
nicklas |
131 |
} |
2490 |
08 Aug 06 |
nicklas |
132 |
|
2487 |
04 Aug 06 |
nicklas |
133 |
final int matchingReporters = explorer.getMatchingReporters(dc); |
2796 |
24 Oct 06 |
nicklas |
134 |
int reporterIndex = explorer.getReporterIndex(); |
2796 |
24 Oct 06 |
nicklas |
135 |
if (reporterIndex >= matchingReporters) reporterIndex = matchingReporters - 1; |
4808 |
13 Mar 09 |
nicklas |
136 |
final ReporterData reporter = matchingReporters == 0 ? |
4808 |
13 Mar 09 |
nicklas |
137 |
null : explorer.getReporter(dc, reporterIndex); |
2796 |
24 Oct 06 |
nicklas |
138 |
|
4808 |
13 Mar 09 |
nicklas |
139 |
final int matchingPositions = matchingReporters == 0 ? |
4808 |
13 Mar 09 |
nicklas |
140 |
0 : explorer.getNumPositions(dc, reporterIndex); |
4808 |
13 Mar 09 |
nicklas |
141 |
|
2796 |
24 Oct 06 |
nicklas |
142 |
int positionIndex = explorer.getPositionIndex(); |
2796 |
24 Oct 06 |
nicklas |
143 |
if (positionIndex >= matchingPositions) positionIndex = matchingPositions - 1; |
2535 |
16 Aug 06 |
nicklas |
144 |
final boolean isAveraging = positionIndex == ExperimentExplorer.SPOT_AVG; |
2487 |
04 Aug 06 |
nicklas |
145 |
|
2892 |
10 Nov 06 |
nicklas |
146 |
final List<AnnotationType> annotationTypes = explorer.getAnnotationTypes(dc, true); |
5105 |
28 Sep 09 |
nicklas |
147 |
final Set<Integer> tmp = explorer.getAnnotationTypeIds(); |
5105 |
28 Sep 09 |
nicklas |
148 |
final Map<AnnotationType, AnnotationSummary> selectedAnnotationTypes = |
5105 |
28 Sep 09 |
nicklas |
149 |
new HashMap<AnnotationType, AnnotationSummary>(tmp.size()); |
5105 |
28 Sep 09 |
nicklas |
150 |
for (Integer atId : tmp) |
5105 |
28 Sep 09 |
nicklas |
151 |
{ |
5105 |
28 Sep 09 |
nicklas |
152 |
try |
5105 |
28 Sep 09 |
nicklas |
153 |
{ |
5105 |
28 Sep 09 |
nicklas |
154 |
selectedAnnotationTypes.put(AnnotationType.getById(dc, atId), null); |
5105 |
28 Sep 09 |
nicklas |
155 |
} |
5105 |
28 Sep 09 |
nicklas |
156 |
catch (Throwable t) |
5105 |
28 Sep 09 |
nicklas |
157 |
{} |
5105 |
28 Sep 09 |
nicklas |
158 |
} |
2502 |
09 Aug 06 |
nicklas |
159 |
|
6185 |
29 Oct 12 |
nicklas |
160 |
JSONArray jsonAnnotationTypes = new JSONArray(); |
6185 |
29 Oct 12 |
nicklas |
161 |
if (annotationTypes != null) |
6185 |
29 Oct 12 |
nicklas |
162 |
{ |
6185 |
29 Oct 12 |
nicklas |
163 |
for (AnnotationType at : annotationTypes) |
6185 |
29 Oct 12 |
nicklas |
164 |
{ |
6185 |
29 Oct 12 |
nicklas |
165 |
JSONObject jsonAt = new JSONObject(); |
6185 |
29 Oct 12 |
nicklas |
166 |
jsonAt.put("key", at.getId()); |
6185 |
29 Oct 12 |
nicklas |
167 |
jsonAt.put("value", at.getName()); |
6185 |
29 Oct 12 |
nicklas |
168 |
jsonAt.put("checked", selectedAnnotationTypes.containsKey(at)); |
6185 |
29 Oct 12 |
nicklas |
169 |
jsonAnnotationTypes.add(jsonAt); |
6185 |
29 Oct 12 |
nicklas |
170 |
} |
6185 |
29 Oct 12 |
nicklas |
171 |
} |
6185 |
29 Oct 12 |
nicklas |
172 |
|
5885 |
22 Nov 11 |
nicklas |
173 |
DynamicUtil.SelectedInfo selected = DynamicUtil.getSelectedColumns(cc, spotColumns, isAveraging); |
2813 |
27 Oct 06 |
nicklas |
174 |
|
3520 |
20 Jun 07 |
nicklas |
175 |
List<String> sortProperties = null; |
2813 |
27 Oct 06 |
nicklas |
176 |
if (isAveraging && cc.getSortProperty() != null) |
2813 |
27 Oct 06 |
nicklas |
177 |
{ |
2813 |
27 Oct 06 |
nicklas |
178 |
// We must check that we are not sorting on a non-averagable property |
3520 |
20 Jun 07 |
nicklas |
179 |
sortProperties = new ArrayList<String>(Arrays.asList(cc.getSortProperty().split(","))); |
5885 |
22 Nov 11 |
nicklas |
180 |
for (TableColumn tc : spotColumns) |
2813 |
27 Oct 06 |
nicklas |
181 |
{ |
2813 |
27 Oct 06 |
nicklas |
182 |
if (!tc.isAveragable()) sortProperties.remove(tc.getProperty()); |
2813 |
27 Oct 06 |
nicklas |
183 |
} |
3520 |
20 Jun 07 |
nicklas |
184 |
cc.setSortProperty(Values.getString(sortProperties, ",", true)); |
2813 |
27 Oct 06 |
nicklas |
185 |
} |
2813 |
27 Oct 06 |
nicklas |
186 |
|
2531 |
16 Aug 06 |
nicklas |
187 |
if (matchingReporters > 0) |
2502 |
09 Aug 06 |
nicklas |
188 |
{ |
5105 |
28 Sep 09 |
nicklas |
189 |
for (Map.Entry<AnnotationType, AnnotationSummary> entry : selectedAnnotationTypes.entrySet()) |
2531 |
16 Aug 06 |
nicklas |
190 |
{ |
5105 |
28 Sep 09 |
nicklas |
191 |
entry.setValue(explorer.getAnnotationSummary(dc, entry.getKey())); |
2531 |
16 Aug 06 |
nicklas |
192 |
} |
2531 |
16 Aug 06 |
nicklas |
193 |
try |
2531 |
16 Aug 06 |
nicklas |
194 |
{ |
4808 |
13 Mar 09 |
nicklas |
195 |
DynamicSpotQuery spotQuery = explorer.getSpotQuery(dc, reporterIndex, positionIndex, selected.selectedColumns); |
2531 |
16 Aug 06 |
nicklas |
196 |
spotData = spotQuery.iterate(dc); |
2531 |
16 Aug 06 |
nicklas |
197 |
} |
2531 |
16 Aug 06 |
nicklas |
198 |
catch (Throwable t) |
2531 |
16 Aug 06 |
nicklas |
199 |
{ |
2531 |
16 Aug 06 |
nicklas |
200 |
cc.setMessage(t.getMessage()); |
5711 |
30 Aug 11 |
nicklas |
201 |
t.printStackTrace(); |
2531 |
16 Aug 06 |
nicklas |
202 |
} |
2502 |
09 Aug 06 |
nicklas |
203 |
} |
2487 |
04 Aug 06 |
nicklas |
204 |
%> |
2487 |
04 Aug 06 |
nicklas |
205 |
<base:page title="<%=title%>"> |
6315 |
06 Sep 13 |
nicklas |
206 |
<base:head scripts="table.js,tabcontrol-2.js,~view.js" styles="table.css,toolbar.css,headertabcontrol.css,path.css,explorer.css"> |
5940 |
31 Jan 12 |
nicklas |
207 |
<style> |
5940 |
31 Jan 12 |
nicklas |
208 |
.special td.cell:first-of-type |
5940 |
31 Jan 12 |
nicklas |
209 |
{ |
6621 |
24 Nov 14 |
nicklas |
210 |
border-right-width: 1px; |
5940 |
31 Jan 12 |
nicklas |
211 |
} |
5940 |
31 Jan 12 |
nicklas |
212 |
</style> |
2487 |
04 Aug 06 |
nicklas |
213 |
</base:head> |
2487 |
04 Aug 06 |
nicklas |
214 |
<base:body> |
5940 |
31 Jan 12 |
nicklas |
215 |
<p:path><p:pathelement title="Experiments" href="<%="../../index.jsp?ID="+ID%>" |
5940 |
31 Jan 12 |
nicklas |
216 |
/><p:pathelement title="<%=HTML.encodeTags(experiment.getName())%>" |
6143 |
20 Sep 12 |
nicklas |
217 |
href="<%="../../bioassaysets/index.jsp?ID="+ID+"&experiment_id="+experiment.getId()%>" |
5940 |
31 Jan 12 |
nicklas |
218 |
/><p:pathelement title="<%=HTML.encodeTags(bioAssaySet.getName())%>" |
6143 |
20 Sep 12 |
nicklas |
219 |
href="<%="../../bioassaysets/index.jsp?ID="+ID+"&cmd=ViewItem&item_id="+bioAssaySetId%>" |
5940 |
31 Jan 12 |
nicklas |
220 |
/><p:pathelement title="Explorer" /></p:path> |
2487 |
04 Aug 06 |
nicklas |
221 |
|
6612 |
21 Nov 14 |
nicklas |
222 |
<div id="page-data" class="data-container" |
6612 |
21 Nov 14 |
nicklas |
223 |
data-bioassayset-id="<%=bioAssaySetId %>" |
6612 |
21 Nov 14 |
nicklas |
224 |
></div> |
6612 |
21 Nov 14 |
nicklas |
225 |
|
5940 |
31 Jan 12 |
nicklas |
226 |
<t:tabcontrol |
5940 |
31 Jan 12 |
nicklas |
227 |
id="explorer" |
5940 |
31 Jan 12 |
nicklas |
228 |
subclass="content mastertabcontrol" |
5940 |
31 Jan 12 |
nicklas |
229 |
remember="false" active="view"> |
2487 |
04 Aug 06 |
nicklas |
230 |
<t:tab id="search" title="Reporter search" /> |
2487 |
04 Aug 06 |
nicklas |
231 |
|
2487 |
04 Aug 06 |
nicklas |
232 |
<t:tab id="view" title="Reporter view"> |
2514 |
11 Aug 06 |
nicklas |
233 |
<% |
6700 |
30 Jan 15 |
nicklas |
234 |
Map<Integer, List<PropertyFilter>> filters = new TreeMap<Integer, List<PropertyFilter>>(); |
6833 |
07 Apr 15 |
nicklas |
235 |
if (reporterContext.getNumPropertyFilters() > 0) |
6700 |
30 Jan 15 |
nicklas |
236 |
{ |
6833 |
07 Apr 15 |
nicklas |
237 |
for (PropertyFilter filter : reporterContext.getPropertyFilters()) |
6700 |
30 Jan 15 |
nicklas |
238 |
{ |
6833 |
07 Apr 15 |
nicklas |
239 |
List<PropertyFilter> rowFilters = filters.get(filter.getRowIndex()); |
6833 |
07 Apr 15 |
nicklas |
240 |
if (rowFilters == null) |
6833 |
07 Apr 15 |
nicklas |
241 |
{ |
6833 |
07 Apr 15 |
nicklas |
242 |
rowFilters = new ArrayList<PropertyFilter>(); |
6833 |
07 Apr 15 |
nicklas |
243 |
filters.put(filter.getRowIndex(), rowFilters); |
6833 |
07 Apr 15 |
nicklas |
244 |
} |
6833 |
07 Apr 15 |
nicklas |
245 |
rowFilters.add(filter); |
6700 |
30 Jan 15 |
nicklas |
246 |
} |
6700 |
30 Jan 15 |
nicklas |
247 |
} |
6700 |
30 Jan 15 |
nicklas |
248 |
StringBuilder filter = new StringBuilder(); |
6700 |
30 Jan 15 |
nicklas |
249 |
for (List<PropertyFilter> rowFilter : filters.values()) |
6700 |
30 Jan 15 |
nicklas |
250 |
{ |
6700 |
30 Jan 15 |
nicklas |
251 |
if (filter.length() > 0) filter.append(" OR "); |
6700 |
30 Jan 15 |
nicklas |
252 |
StringBuilder sb = new StringBuilder(); |
6700 |
30 Jan 15 |
nicklas |
253 |
for (PropertyFilter pf : rowFilter) |
6700 |
30 Jan 15 |
nicklas |
254 |
{ |
6700 |
30 Jan 15 |
nicklas |
255 |
if (sb.length() > 0) sb.append(" AND "); |
6700 |
30 Jan 15 |
nicklas |
256 |
sb.append(pf.getProperty()+" "+pf.getOperator()+" "+pf.getValue()); |
6700 |
30 Jan 15 |
nicklas |
257 |
} |
6700 |
30 Jan 15 |
nicklas |
258 |
filter.append(sb.toString().replaceAll("@|£", "")); |
6700 |
30 Jan 15 |
nicklas |
259 |
} |
5940 |
31 Jan 12 |
nicklas |
260 |
if (reporter == null) |
5111 |
30 Sep 09 |
nicklas |
261 |
{ |
5111 |
30 Sep 09 |
nicklas |
262 |
%> |
5940 |
31 Jan 12 |
nicklas |
263 |
<table class="fullform bottomborder"> |
5940 |
31 Jan 12 |
nicklas |
264 |
<tr> |
5940 |
31 Jan 12 |
nicklas |
265 |
<th>Filter</th> |
6700 |
30 Jan 15 |
nicklas |
266 |
<td><%=HTML.encodeTags(filter.toString())%></td> |
5940 |
31 Jan 12 |
nicklas |
267 |
</tr> |
5940 |
31 Jan 12 |
nicklas |
268 |
<tr> |
5940 |
31 Jan 12 |
nicklas |
269 |
<th class="subprompt"></th> |
5940 |
31 Jan 12 |
nicklas |
270 |
<td> |
5940 |
31 Jan 12 |
nicklas |
271 |
<div class="messagecontainer note"> |
5940 |
31 Jan 12 |
nicklas |
272 |
No reporters found. |
5940 |
31 Jan 12 |
nicklas |
273 |
</div> |
5940 |
31 Jan 12 |
nicklas |
274 |
</td> |
5940 |
31 Jan 12 |
nicklas |
275 |
</table> |
5940 |
31 Jan 12 |
nicklas |
276 |
<% |
5940 |
31 Jan 12 |
nicklas |
277 |
} |
5940 |
31 Jan 12 |
nicklas |
278 |
else |
5940 |
31 Jan 12 |
nicklas |
279 |
{ |
5940 |
31 Jan 12 |
nicklas |
280 |
%> |
5111 |
30 Sep 09 |
nicklas |
281 |
<form name="reporterIndex" action="index.jsp" method="post"> |
5111 |
30 Sep 09 |
nicklas |
282 |
<input type="hidden" name="ID" value="<%=ID%>"> |
5111 |
30 Sep 09 |
nicklas |
283 |
<input type="hidden" name="bioassayset_id" value="<%=bioAssaySetId%>"> |
5111 |
30 Sep 09 |
nicklas |
284 |
<input type="hidden" name="cmd" value="SetReporterIndex"> |
5940 |
31 Jan 12 |
nicklas |
285 |
|
6605 |
18 Nov 14 |
nicklas |
286 |
<tbl:toolbar subclass="bottomborder bg-filled-50"> |
6612 |
21 Nov 14 |
nicklas |
287 |
<tbl:label subclass="bg-filled-100" style="padding: 0px 2px 0px 6px;"> |
5940 |
31 Jan 12 |
nicklas |
288 |
Current reporter |
6315 |
06 Sep 13 |
nicklas |
289 |
<input name="newReporterIndex" id="newReporterIndex" |
6315 |
06 Sep 13 |
nicklas |
290 |
type="text" class="text" |
6315 |
06 Sep 13 |
nicklas |
291 |
value="<%=reporterIndex+1%>" data-max-index="<%=matchingReporters%>" |
5959 |
14 Feb 12 |
nicklas |
292 |
style="width: 6em;" maxlength="8" title="Enter a number between 1 and <%=matchingReporters%>"> |
5940 |
31 Jan 12 |
nicklas |
293 |
of <%=matchingReporters %> |
5940 |
31 Jan 12 |
nicklas |
294 |
<% |
5940 |
31 Jan 12 |
nicklas |
295 |
if (reporterIndex == 0 || matchingReporters == 0) |
5940 |
31 Jan 12 |
nicklas |
296 |
{ |
5940 |
31 Jan 12 |
nicklas |
297 |
%> |
5946 |
03 Feb 12 |
nicklas |
298 |
<base:icon image="first.png" enabled="false" /> |
5946 |
03 Feb 12 |
nicklas |
299 |
<base:icon image="previous.png" enabled="false" /> |
5940 |
31 Jan 12 |
nicklas |
300 |
<% |
5940 |
31 Jan 12 |
nicklas |
301 |
} |
5940 |
31 Jan 12 |
nicklas |
302 |
else |
5940 |
31 Jan 12 |
nicklas |
303 |
{ |
5940 |
31 Jan 12 |
nicklas |
304 |
%> |
6143 |
20 Sep 12 |
nicklas |
305 |
<a href="index.jsp?ID=<%=ID%>&cmd=SetReporterIndex&bioassayset_id=<%=bioAssaySetId%>&reporterIndex=0" |
5946 |
03 Feb 12 |
nicklas |
306 |
title="Go the first reporter"><base:icon image="first.png" /></a> |
6143 |
20 Sep 12 |
nicklas |
307 |
<a href="index.jsp?ID=<%=ID%>&cmd=SetReporterIndex&bioassayset_id=<%=bioAssaySetId%>&reporterIndex=<%=reporterIndex-1%>" |
5946 |
03 Feb 12 |
nicklas |
308 |
title="Go the previous reporter"><base:icon image="previous.png" /></a> |
5940 |
31 Jan 12 |
nicklas |
309 |
<% |
5940 |
31 Jan 12 |
nicklas |
310 |
} |
5940 |
31 Jan 12 |
nicklas |
311 |
%> |
5940 |
31 Jan 12 |
nicklas |
312 |
|
5940 |
31 Jan 12 |
nicklas |
313 |
<% |
5940 |
31 Jan 12 |
nicklas |
314 |
if (reporterIndex == matchingReporters - 1 || matchingReporters == 0) |
5940 |
31 Jan 12 |
nicklas |
315 |
{ |
5940 |
31 Jan 12 |
nicklas |
316 |
%> |
5946 |
03 Feb 12 |
nicklas |
317 |
<base:icon image="next.png" enabled="false" /> |
5946 |
03 Feb 12 |
nicklas |
318 |
<base:icon image="last.png" enabled="false" /> |
5940 |
31 Jan 12 |
nicklas |
319 |
<% |
5940 |
31 Jan 12 |
nicklas |
320 |
} |
5940 |
31 Jan 12 |
nicklas |
321 |
else |
5940 |
31 Jan 12 |
nicklas |
322 |
{ |
5940 |
31 Jan 12 |
nicklas |
323 |
%> |
6143 |
20 Sep 12 |
nicklas |
324 |
<a href="index.jsp?ID=<%=ID%>&cmd=SetReporterIndex&bioassayset_id=<%=bioAssaySetId%>&reporterIndex=<%=reporterIndex+1%>" |
5946 |
03 Feb 12 |
nicklas |
325 |
title="Go the next reporter"><base:icon image="next.png" /></a> |
6143 |
20 Sep 12 |
nicklas |
326 |
<a href="index.jsp?ID=<%=ID%>&cmd=SetReporterIndex&bioassayset_id=<%=bioAssaySetId%>&reporterIndex=<%=matchingReporters-1%>" |
5946 |
03 Feb 12 |
nicklas |
327 |
title="Go the last reporter"><base:icon image="last.png" /></a> |
5940 |
31 Jan 12 |
nicklas |
328 |
<% |
5940 |
31 Jan 12 |
nicklas |
329 |
} |
5940 |
31 Jan 12 |
nicklas |
330 |
%> |
5940 |
31 Jan 12 |
nicklas |
331 |
</tbl:label> |
5111 |
30 Sep 09 |
nicklas |
332 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
333 |
id="btnReporterColumns" |
5945 |
02 Feb 12 |
nicklas |
334 |
image="columns.png" |
5111 |
30 Sep 09 |
nicklas |
335 |
title="Columns…" |
5111 |
30 Sep 09 |
nicklas |
336 |
tooltip="Show, hide and re-order reporter columns" |
5111 |
30 Sep 09 |
nicklas |
337 |
/> |
5111 |
30 Sep 09 |
nicklas |
338 |
</tbl:toolbar> |
5940 |
31 Jan 12 |
nicklas |
339 |
</form> |
5111 |
30 Sep 09 |
nicklas |
340 |
|
5940 |
31 Jan 12 |
nicklas |
341 |
<tbl:table |
5940 |
31 Jan 12 |
nicklas |
342 |
id="reporter" |
5940 |
31 Jan 12 |
nicklas |
343 |
columns="<%="filter,"+Values.getString(cc.getSetting("reporter-columns"), defaultReporterColumns)%>" |
5940 |
31 Jan 12 |
nicklas |
344 |
action="index.jsp" |
5940 |
31 Jan 12 |
nicklas |
345 |
sc="<%=sc%>" |
5940 |
31 Jan 12 |
nicklas |
346 |
item="<%=itemType%>" |
5940 |
31 Jan 12 |
nicklas |
347 |
subcontext="<%=subContext%>" |
5940 |
31 Jan 12 |
nicklas |
348 |
subclass="bottomborder" |
5940 |
31 Jan 12 |
nicklas |
349 |
> |
5940 |
31 Jan 12 |
nicklas |
350 |
<tbl:hidden |
5940 |
31 Jan 12 |
nicklas |
351 |
name="bioassayset_id" |
5940 |
31 Jan 12 |
nicklas |
352 |
value="<%=String.valueOf(bioAssaySetId)%>" |
5885 |
22 Nov 11 |
nicklas |
353 |
/> |
5940 |
31 Jan 12 |
nicklas |
354 |
<tbl:columndef |
5940 |
31 Jan 12 |
nicklas |
355 |
id="filter" |
5940 |
31 Jan 12 |
nicklas |
356 |
title="Filter" |
5940 |
31 Jan 12 |
nicklas |
357 |
show="always" |
5940 |
31 Jan 12 |
nicklas |
358 |
/> |
5885 |
22 Nov 11 |
nicklas |
359 |
<% |
5940 |
31 Jan 12 |
nicklas |
360 |
for (TableColumn tc : reporterColumns) |
5111 |
30 Sep 09 |
nicklas |
361 |
{ |
5940 |
31 Jan 12 |
nicklas |
362 |
%> |
5940 |
31 Jan 12 |
nicklas |
363 |
<tbl:columndef |
5940 |
31 Jan 12 |
nicklas |
364 |
id="<%=tc.getId()%>" |
5940 |
31 Jan 12 |
nicklas |
365 |
title="<%=HTML.encodeTags(tc.getTitle())%>" |
5940 |
31 Jan 12 |
nicklas |
366 |
formatter="<%=tc.getFormatter()%>" |
5940 |
31 Jan 12 |
nicklas |
367 |
show="<%=reporter == null ? "never" : "auto" %>" |
5940 |
31 Jan 12 |
nicklas |
368 |
/> |
5940 |
31 Jan 12 |
nicklas |
369 |
<% |
5940 |
31 Jan 12 |
nicklas |
370 |
} |
5940 |
31 Jan 12 |
nicklas |
371 |
List<ExtendedProperty> reporterProperties = ExtendedProperties.getProperties("ReporterData"); |
5940 |
31 Jan 12 |
nicklas |
372 |
%> |
5940 |
31 Jan 12 |
nicklas |
373 |
<tbl:form width="2" clazz="fullform special"> |
6700 |
30 Jan 15 |
nicklas |
374 |
<tbl:cell column="filter"><%=HTML.encodeTags(filter.toString())%></tbl:cell> |
5940 |
31 Jan 12 |
nicklas |
375 |
<tbl:cell column="id"><%=reporter.getId()%></tbl:cell> |
5940 |
31 Jan 12 |
nicklas |
376 |
<tbl:cell column="version"><%=reporter.getVersion()%></tbl:cell> |
5940 |
31 Jan 12 |
nicklas |
377 |
<tbl:cell column="name"><%=Base.getLink(ID, reporter.getName(), Item.REPORTER, reporter.getId(), true)%></tbl:cell> |
5940 |
31 Jan 12 |
nicklas |
378 |
<tbl:cell column="externalId"><%=Base.getLink(ID, reporter.getExternalId(), Item.REPORTER, reporter.getId(), true)%></tbl:cell> |
5940 |
31 Jan 12 |
nicklas |
379 |
<tbl:cell column="symbol"><%=HTML.encodeTags(reporter.getSymbol())%></tbl:cell> |
5940 |
31 Jan 12 |
nicklas |
380 |
<tbl:cell column="lastUpdate"><%=dateTimeFormatter.format(reporter.getLastUpdate())%></tbl:cell> |
5940 |
31 Jan 12 |
nicklas |
381 |
<tbl:cell column="lastSource"><%=HTML.encodeTags(reporter.getLastSource())%></tbl:cell> |
5940 |
31 Jan 12 |
nicklas |
382 |
<tbl:cell column="entryDate"><%=dateFormatter.format(reporter.getEntryDate()) %></tbl:cell> |
5940 |
31 Jan 12 |
nicklas |
383 |
<tbl:cell column="type"><base:propertyvalue dbcontrol="<%=dc%>" item="<%=reporter%>" property="reporterType" /></tbl:cell> |
5940 |
31 Jan 12 |
nicklas |
384 |
<tbl:cell column="description"><%=HTML.niceFormat(reporter.getDescription())%></tbl:cell> |
5940 |
31 Jan 12 |
nicklas |
385 |
<% |
5940 |
31 Jan 12 |
nicklas |
386 |
if (reporterProperties != null) |
2487 |
04 Aug 06 |
nicklas |
387 |
{ |
5940 |
31 Jan 12 |
nicklas |
388 |
for (ExtendedProperty ep : reporterProperties) |
5940 |
31 Jan 12 |
nicklas |
389 |
{ |
5940 |
31 Jan 12 |
nicklas |
390 |
String name = ep.getName(); |
5940 |
31 Jan 12 |
nicklas |
391 |
%> |
5940 |
31 Jan 12 |
nicklas |
392 |
<tbl:cell column="<%=ep.getName()%>"><tbl:cellvalue value="<%=reporter.getExtended(name)%>" /></tbl:cell> |
5940 |
31 Jan 12 |
nicklas |
393 |
<% |
5940 |
31 Jan 12 |
nicklas |
394 |
} |
2487 |
04 Aug 06 |
nicklas |
395 |
} |
5940 |
31 Jan 12 |
nicklas |
396 |
%> |
5940 |
31 Jan 12 |
nicklas |
397 |
</tbl:form> |
5940 |
31 Jan 12 |
nicklas |
398 |
</tbl:table> |
5940 |
31 Jan 12 |
nicklas |
399 |
|
5106 |
29 Sep 09 |
nicklas |
400 |
<base:section |
5106 |
29 Sep 09 |
nicklas |
401 |
id="annotation" |
5106 |
29 Sep 09 |
nicklas |
402 |
title="<%="Annotation summary (" + selectedAnnotationTypes.size() + " selected)"%>" |
5106 |
29 Sep 09 |
nicklas |
403 |
context="<%=cc%>" |
5940 |
31 Jan 12 |
nicklas |
404 |
style="border-bottom: 0px;" |
5106 |
29 Sep 09 |
nicklas |
405 |
> |
6162 |
10 Oct 12 |
nicklas |
406 |
<form name="annotationSummary" action="index.jsp" method="POST"> |
5111 |
30 Sep 09 |
nicklas |
407 |
<input type="hidden" name="ID" value="<%=ID%>"> |
5111 |
30 Sep 09 |
nicklas |
408 |
<input type="hidden" name="bioassayset_id" value="<%=bioAssaySetId%>"> |
5111 |
30 Sep 09 |
nicklas |
409 |
<input type="hidden" name="cmd" value="SetAnnotationType"> |
6185 |
29 Oct 12 |
nicklas |
410 |
<div class="multiselect auto-init" style="width: 25em;" data-auto-init="multiselect" |
6185 |
29 Oct 12 |
nicklas |
411 |
data-multiple="1" data-options="<%=HTML.encodeTags(jsonAnnotationTypes.toJSONString())%>"> |
5959 |
14 Feb 12 |
nicklas |
412 |
<table> |
5959 |
14 Feb 12 |
nicklas |
413 |
<tr> |
6612 |
21 Nov 14 |
nicklas |
414 |
<td> |
6612 |
21 Nov 14 |
nicklas |
415 |
<input type="hidden" class="multiselect-hidden" name="annotationtype_id" value=""> |
6612 |
21 Nov 14 |
nicklas |
416 |
<input type="text" class="text multiselect-display" name="display:annotationTypes" title="Click to select experimental factor" style="width: calc(100% - 7px);"></td> |
6143 |
20 Sep 12 |
nicklas |
417 |
<td class="dropdown"> |
6185 |
29 Oct 12 |
nicklas |
418 |
<base:icon image="mini_scroll_down.png" /> |
5959 |
14 Feb 12 |
nicklas |
419 |
</td> |
5959 |
14 Feb 12 |
nicklas |
420 |
</tr> |
5959 |
14 Feb 12 |
nicklas |
421 |
</table> |
5959 |
14 Feb 12 |
nicklas |
422 |
</div> |
5940 |
31 Jan 12 |
nicklas |
423 |
<% |
5106 |
29 Sep 09 |
nicklas |
424 |
for (Map.Entry<AnnotationType, AnnotationSummary> entry : selectedAnnotationTypes.entrySet()) |
5106 |
29 Sep 09 |
nicklas |
425 |
{ |
5106 |
29 Sep 09 |
nicklas |
426 |
AnnotationType at = entry.getKey(); |
5106 |
29 Sep 09 |
nicklas |
427 |
AnnotationSummary summary = entry.getValue(); |
5106 |
29 Sep 09 |
nicklas |
428 |
%> |
5940 |
31 Jan 12 |
nicklas |
429 |
<table class="annotationsummary"> |
5106 |
29 Sep 09 |
nicklas |
430 |
<tr> |
6612 |
21 Nov 14 |
nicklas |
431 |
<td class="summaryheader bg-filled-100"><%=Base.getLinkedName(ID, at, false, true)%></td> |
6612 |
21 Nov 14 |
nicklas |
432 |
<td class="plotheader bg-filled-100"><base:icon |
6315 |
06 Sep 13 |
nicklas |
433 |
subclass="link auto-init" |
6315 |
06 Sep 13 |
nicklas |
434 |
data-auto-init="annotation-plot" |
6315 |
06 Sep 13 |
nicklas |
435 |
data-annotation-type="<%=at.getId()%>" |
5946 |
03 Feb 12 |
nicklas |
436 |
image="plotter.png" |
5138 |
16 Oct 09 |
nicklas |
437 |
tooltip="Box plot for selected spot data per annotation group" |
5138 |
16 Oct 09 |
nicklas |
438 |
/></td> |
5106 |
29 Sep 09 |
nicklas |
439 |
<% |
5106 |
29 Sep 09 |
nicklas |
440 |
for (AnnotationGroup ag : summary.getAnnotationGroups()) |
5106 |
29 Sep 09 |
nicklas |
441 |
{ |
5106 |
29 Sep 09 |
nicklas |
442 |
%> |
5940 |
31 Jan 12 |
nicklas |
443 |
<td class="groupheader" style="background: <%=ag.getColor()%>;"> |
5106 |
29 Sep 09 |
nicklas |
444 |
<%=ag.getTitle()%> |
5106 |
29 Sep 09 |
nicklas |
445 |
</td> |
5106 |
29 Sep 09 |
nicklas |
446 |
<% |
5106 |
29 Sep 09 |
nicklas |
447 |
} |
5106 |
29 Sep 09 |
nicklas |
448 |
%> |
5106 |
29 Sep 09 |
nicklas |
449 |
</tr> |
5106 |
29 Sep 09 |
nicklas |
450 |
<% |
5106 |
29 Sep 09 |
nicklas |
451 |
for (int ch = 1; ch <= channels; ++ch) |
5106 |
29 Sep 09 |
nicklas |
452 |
{ |
5106 |
29 Sep 09 |
nicklas |
453 |
%> |
5106 |
29 Sep 09 |
nicklas |
454 |
<tr> |
6612 |
21 Nov 14 |
nicklas |
455 |
<td colspan="2" class="bg-filled-100">Mean ch <%=ch%> int.</td> |
5106 |
29 Sep 09 |
nicklas |
456 |
<% |
5106 |
29 Sep 09 |
nicklas |
457 |
for (AnnotationGroup ag : summary.getAnnotationGroups()) |
5106 |
29 Sep 09 |
nicklas |
458 |
{ |
5106 |
29 Sep 09 |
nicklas |
459 |
%> |
5140 |
19 Oct 09 |
nicklas |
460 |
<td class="value" style="background: <%=ag.getColor()%>;" |
5140 |
19 Oct 09 |
nicklas |
461 |
id="mean.<%=at.getId()%>.<%=ag.getId()%>.ch<%=ch%>"></td> |
5106 |
29 Sep 09 |
nicklas |
462 |
<% |
5106 |
29 Sep 09 |
nicklas |
463 |
} |
5106 |
29 Sep 09 |
nicklas |
464 |
%> |
5106 |
29 Sep 09 |
nicklas |
465 |
</tr> |
5106 |
29 Sep 09 |
nicklas |
466 |
<% |
5106 |
29 Sep 09 |
nicklas |
467 |
} |
5106 |
29 Sep 09 |
nicklas |
468 |
if (hasRatio) |
5106 |
29 Sep 09 |
nicklas |
469 |
{ |
5106 |
29 Sep 09 |
nicklas |
470 |
%> |
5106 |
29 Sep 09 |
nicklas |
471 |
<tr> |
6612 |
21 Nov 14 |
nicklas |
472 |
<td colspan="2" class="bg-filled-100" title="The geometric mean of the ratios">G. mean ratio</td> |
5106 |
29 Sep 09 |
nicklas |
473 |
<% |
5106 |
29 Sep 09 |
nicklas |
474 |
for (AnnotationGroup ag : summary.getAnnotationGroups()) |
5106 |
29 Sep 09 |
nicklas |
475 |
{ |
5106 |
29 Sep 09 |
nicklas |
476 |
%> |
5140 |
19 Oct 09 |
nicklas |
477 |
<td class="value" style="background: <%=ag.getColor()%>;" |
5140 |
19 Oct 09 |
nicklas |
478 |
id="gmean.<%=at.getId()%>.<%=ag.getId()%>"></td> |
5106 |
29 Sep 09 |
nicklas |
479 |
<% |
5106 |
29 Sep 09 |
nicklas |
480 |
} |
5106 |
29 Sep 09 |
nicklas |
481 |
%> |
5106 |
29 Sep 09 |
nicklas |
482 |
</tr> |
5106 |
29 Sep 09 |
nicklas |
483 |
<tr> |
6612 |
21 Nov 14 |
nicklas |
484 |
<td colspan="2" class="bg-filled-100" title="Standard deviation of log2 ratios">log2ratio SD</td> |
5106 |
29 Sep 09 |
nicklas |
485 |
<% |
5106 |
29 Sep 09 |
nicklas |
486 |
for (AnnotationGroup ag : summary.getAnnotationGroups()) |
5106 |
29 Sep 09 |
nicklas |
487 |
{ |
5106 |
29 Sep 09 |
nicklas |
488 |
%> |
5140 |
19 Oct 09 |
nicklas |
489 |
<td class="value" style="background: <%=ag.getColor()%>;" |
5140 |
19 Oct 09 |
nicklas |
490 |
id="sd.<%=at.getId()%>.<%=ag.getId()%>"></td> |
5106 |
29 Sep 09 |
nicklas |
491 |
<% |
5106 |
29 Sep 09 |
nicklas |
492 |
} |
5106 |
29 Sep 09 |
nicklas |
493 |
%> |
5106 |
29 Sep 09 |
nicklas |
494 |
</tr> |
5106 |
29 Sep 09 |
nicklas |
495 |
<% |
5139 |
19 Oct 09 |
nicklas |
496 |
} |
5139 |
19 Oct 09 |
nicklas |
497 |
%> |
5139 |
19 Oct 09 |
nicklas |
498 |
<tr> |
6612 |
21 Nov 14 |
nicklas |
499 |
<td colspan="2" class="bg-filled-100" title="The number of spots falling in this group">Count</td> |
5139 |
19 Oct 09 |
nicklas |
500 |
<% |
5139 |
19 Oct 09 |
nicklas |
501 |
for (AnnotationGroup ag : summary.getAnnotationGroups()) |
5139 |
19 Oct 09 |
nicklas |
502 |
{ |
5107 |
29 Sep 09 |
nicklas |
503 |
%> |
5140 |
19 Oct 09 |
nicklas |
504 |
<td class="value" style="background: <%=ag.getColor()%>;" |
5140 |
19 Oct 09 |
nicklas |
505 |
id="count.<%=at.getId()%>.<%=ag.getId()%>"></td> |
5107 |
29 Sep 09 |
nicklas |
506 |
<% |
5106 |
29 Sep 09 |
nicklas |
507 |
} |
5106 |
29 Sep 09 |
nicklas |
508 |
%> |
5139 |
19 Oct 09 |
nicklas |
509 |
</tr> |
5106 |
29 Sep 09 |
nicklas |
510 |
</table> |
5940 |
31 Jan 12 |
nicklas |
511 |
<% |
5106 |
29 Sep 09 |
nicklas |
512 |
} |
5106 |
29 Sep 09 |
nicklas |
513 |
%> |
5940 |
31 Jan 12 |
nicklas |
514 |
</form> |
5106 |
29 Sep 09 |
nicklas |
515 |
</base:section> |
2502 |
09 Aug 06 |
nicklas |
516 |
<% |
2502 |
09 Aug 06 |
nicklas |
517 |
if (cc.getMessage() != null) |
2502 |
09 Aug 06 |
nicklas |
518 |
{ |
2502 |
09 Aug 06 |
nicklas |
519 |
%> |
5940 |
31 Jan 12 |
nicklas |
520 |
<div class="messagecontainer error"><%=HTML.encodeTags(cc.getMessage())%></div> |
2502 |
09 Aug 06 |
nicklas |
521 |
<% |
2502 |
09 Aug 06 |
nicklas |
522 |
cc.setMessage(null); |
2502 |
09 Aug 06 |
nicklas |
523 |
} |
2502 |
09 Aug 06 |
nicklas |
524 |
%> |
2531 |
16 Aug 06 |
nicklas |
525 |
<% |
2531 |
16 Aug 06 |
nicklas |
526 |
if (spotData != null) |
2531 |
16 Aug 06 |
nicklas |
527 |
{ |
2733 |
16 Oct 06 |
nicklas |
528 |
Formatter<Number> numberFormatter = FormatterFactory.getNumberFormatter(sc); |
2531 |
16 Aug 06 |
nicklas |
529 |
%> |
5940 |
31 Jan 12 |
nicklas |
530 |
<form name="spotIndex" action="index.jsp" method="post"> |
5940 |
31 Jan 12 |
nicklas |
531 |
<input type="hidden" name="ID" value="<%=ID%>"> |
5940 |
31 Jan 12 |
nicklas |
532 |
<input type="hidden" name="bioassayset_id" value="<%=bioAssaySetId%>"> |
5940 |
31 Jan 12 |
nicklas |
533 |
<input type="hidden" name="cmd" value="SetSpotIndex"> |
6612 |
21 Nov 14 |
nicklas |
534 |
<tbl:toolbar subclass="topborder bg-filled-50"> |
6612 |
21 Nov 14 |
nicklas |
535 |
<tbl:label subclass="bg-filled-100" style="padding: 0px 2px 0px 6px;"> |
5940 |
31 Jan 12 |
nicklas |
536 |
Current spot |
6315 |
06 Sep 13 |
nicklas |
537 |
<input name="newSpotIndex" id="newSpotIndex" |
6315 |
06 Sep 13 |
nicklas |
538 |
data-max-index="<%=matchingPositions%>" |
6315 |
06 Sep 13 |
nicklas |
539 |
type="text" class="text" value="<%=positionIndex == -1 ? "all" : positionIndex == -2 ? "avg" : String.valueOf(positionIndex+1)%>" |
5940 |
31 Jan 12 |
nicklas |
540 |
size="6" maxlength="8" title="Enter a number between 1 and <%=matchingPositions%>"> |
5940 |
31 Jan 12 |
nicklas |
541 |
of <%=matchingPositions%> |
5940 |
31 Jan 12 |
nicklas |
542 |
<% |
6315 |
06 Sep 13 |
nicklas |
543 |
if (positionIndex == 0) |
5940 |
31 Jan 12 |
nicklas |
544 |
{ |
5940 |
31 Jan 12 |
nicklas |
545 |
%> |
5946 |
03 Feb 12 |
nicklas |
546 |
<base:icon image="first.png" enabled="false" /> |
5940 |
31 Jan 12 |
nicklas |
547 |
<% |
5940 |
31 Jan 12 |
nicklas |
548 |
} |
5940 |
31 Jan 12 |
nicklas |
549 |
else |
5940 |
31 Jan 12 |
nicklas |
550 |
{ |
5940 |
31 Jan 12 |
nicklas |
551 |
%> |
6143 |
20 Sep 12 |
nicklas |
552 |
<a href="index.jsp?ID=<%=ID%>&cmd=SetSpotIndex&bioassayset_id=<%=bioAssaySetId%>&spotIndex=0" |
5946 |
03 Feb 12 |
nicklas |
553 |
title="Go the first position"><base:icon image="first.png" /></a> |
6315 |
06 Sep 13 |
nicklas |
554 |
<% |
6315 |
06 Sep 13 |
nicklas |
555 |
} |
6315 |
06 Sep 13 |
nicklas |
556 |
if (positionIndex <= 0) |
6315 |
06 Sep 13 |
nicklas |
557 |
{ |
6315 |
06 Sep 13 |
nicklas |
558 |
%> |
6315 |
06 Sep 13 |
nicklas |
559 |
<base:icon image="previous.png" enabled="false" /> |
6315 |
06 Sep 13 |
nicklas |
560 |
<% |
6315 |
06 Sep 13 |
nicklas |
561 |
} |
6315 |
06 Sep 13 |
nicklas |
562 |
else |
6315 |
06 Sep 13 |
nicklas |
563 |
{ |
6315 |
06 Sep 13 |
nicklas |
564 |
%> |
6143 |
20 Sep 12 |
nicklas |
565 |
<a href="index.jsp?ID=<%=ID%>&cmd=SetSpotIndex&bioassayset_id=<%=bioAssaySetId%>&spotIndex=<%=positionIndex-1%>" |
5946 |
03 Feb 12 |
nicklas |
566 |
title="Go the previous position"><base:icon image="previous.png" /></a> |
5940 |
31 Jan 12 |
nicklas |
567 |
<% |
5940 |
31 Jan 12 |
nicklas |
568 |
} |
5940 |
31 Jan 12 |
nicklas |
569 |
%> |
5940 |
31 Jan 12 |
nicklas |
570 |
|
5940 |
31 Jan 12 |
nicklas |
571 |
<% |
5940 |
31 Jan 12 |
nicklas |
572 |
if (positionIndex == matchingPositions - 1 || positionIndex < 0) |
5940 |
31 Jan 12 |
nicklas |
573 |
{ |
5940 |
31 Jan 12 |
nicklas |
574 |
%> |
5946 |
03 Feb 12 |
nicklas |
575 |
<base:icon image="next.png" enabled="false" /> |
5940 |
31 Jan 12 |
nicklas |
576 |
<% |
5940 |
31 Jan 12 |
nicklas |
577 |
} |
5940 |
31 Jan 12 |
nicklas |
578 |
else |
5940 |
31 Jan 12 |
nicklas |
579 |
{ |
5940 |
31 Jan 12 |
nicklas |
580 |
%> |
6143 |
20 Sep 12 |
nicklas |
581 |
<a href="index.jsp?ID=<%=ID%>&cmd=SetSpotIndex&bioassayset_id=<%=bioAssaySetId%>&spotIndex=<%=positionIndex+1%>" |
5946 |
03 Feb 12 |
nicklas |
582 |
title="Go the next position"><base:icon image="next.png" /></a> |
5940 |
31 Jan 12 |
nicklas |
583 |
<% |
5940 |
31 Jan 12 |
nicklas |
584 |
} |
5940 |
31 Jan 12 |
nicklas |
585 |
if (positionIndex == matchingPositions - 1) |
5940 |
31 Jan 12 |
nicklas |
586 |
{ |
5940 |
31 Jan 12 |
nicklas |
587 |
%> |
5946 |
03 Feb 12 |
nicklas |
588 |
<base:icon image="last.png" enabled="false" /> |
5940 |
31 Jan 12 |
nicklas |
589 |
<% |
5940 |
31 Jan 12 |
nicklas |
590 |
} |
5940 |
31 Jan 12 |
nicklas |
591 |
else |
5940 |
31 Jan 12 |
nicklas |
592 |
{ |
5940 |
31 Jan 12 |
nicklas |
593 |
%> |
6143 |
20 Sep 12 |
nicklas |
594 |
<a href="index.jsp?ID=<%=ID%>&cmd=SetSpotIndex&bioassayset_id=<%=bioAssaySetId%>&spotIndex=<%=matchingPositions-1%>" |
5946 |
03 Feb 12 |
nicklas |
595 |
title="Go the last position"><base:icon image="last.png" /></a> |
5940 |
31 Jan 12 |
nicklas |
596 |
<% |
5940 |
31 Jan 12 |
nicklas |
597 |
} |
5940 |
31 Jan 12 |
nicklas |
598 |
%> |
6143 |
20 Sep 12 |
nicklas |
599 |
[ <a href="index.jsp?ID=<%=ID%>&cmd=SetSpotIndex&bioassayset_id=<%=bioAssaySetId%>&spotIndex=-1" |
5940 |
31 Jan 12 |
nicklas |
600 |
title="Show all positions">all</a> |
6143 |
20 Sep 12 |
nicklas |
601 |
| <a href="index.jsp?ID=<%=ID%>&cmd=SetSpotIndex&bioassayset_id=<%=bioAssaySetId%>&spotIndex=-2" |
5940 |
31 Jan 12 |
nicklas |
602 |
title="Calculate average values for each bioassay">avg</a> |
5940 |
31 Jan 12 |
nicklas |
603 |
] |
5940 |
31 Jan 12 |
nicklas |
604 |
</tbl:label> |
2487 |
04 Aug 06 |
nicklas |
605 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
606 |
id="btnSpotColumns" |
5945 |
02 Feb 12 |
nicklas |
607 |
image="columns.png" |
2487 |
04 Aug 06 |
nicklas |
608 |
title="Columns…" |
2487 |
04 Aug 06 |
nicklas |
609 |
tooltip="Show, hide and re-order columns" |
2487 |
04 Aug 06 |
nicklas |
610 |
/> |
5114 |
02 Oct 09 |
nicklas |
611 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
612 |
id="btnAssayPlot" |
5946 |
03 Feb 12 |
nicklas |
613 |
image="plotter.png" |
5114 |
02 Oct 09 |
nicklas |
614 |
title="Plot…" |
5114 |
02 Oct 09 |
nicklas |
615 |
tooltip="Plot selected data from this table" |
5114 |
02 Oct 09 |
nicklas |
616 |
/> |
2487 |
04 Aug 06 |
nicklas |
617 |
</tbl:toolbar> |
5940 |
31 Jan 12 |
nicklas |
618 |
</form> |
5940 |
31 Jan 12 |
nicklas |
619 |
<tbl:table |
5940 |
31 Jan 12 |
nicklas |
620 |
id="spotdata" |
5940 |
31 Jan 12 |
nicklas |
621 |
columns="<%=cc.getSetting("columns")%>" |
5940 |
31 Jan 12 |
nicklas |
622 |
sortby="<%=cc.getSortProperty()%>" |
5940 |
31 Jan 12 |
nicklas |
623 |
direction="<%=cc.getSortDirection()%>" |
5940 |
31 Jan 12 |
nicklas |
624 |
action="index.jsp" |
5940 |
31 Jan 12 |
nicklas |
625 |
sc="<%=sc%>" |
5940 |
31 Jan 12 |
nicklas |
626 |
item="<%=itemType%>" |
5940 |
31 Jan 12 |
nicklas |
627 |
subcontext="<%=subContext%>" |
5940 |
31 Jan 12 |
nicklas |
628 |
> |
5940 |
31 Jan 12 |
nicklas |
629 |
<tbl:hidden |
5940 |
31 Jan 12 |
nicklas |
630 |
name="bioassayset_id" |
5940 |
31 Jan 12 |
nicklas |
631 |
value="<%=String.valueOf(bioAssaySetId)%>" |
5940 |
31 Jan 12 |
nicklas |
632 |
/> |
6315 |
06 Sep 13 |
nicklas |
633 |
<tbl:hidden |
6315 |
06 Sep 13 |
nicklas |
634 |
name="reporter_index" |
6315 |
06 Sep 13 |
nicklas |
635 |
value="<%=String.valueOf(reporterIndex)%>" |
6315 |
06 Sep 13 |
nicklas |
636 |
/> |
6315 |
06 Sep 13 |
nicklas |
637 |
<tbl:hidden |
6315 |
06 Sep 13 |
nicklas |
638 |
name="position_index" |
6315 |
06 Sep 13 |
nicklas |
639 |
value="<%=String.valueOf(positionIndex)%>" |
6315 |
06 Sep 13 |
nicklas |
640 |
/> |
2531 |
16 Aug 06 |
nicklas |
641 |
<% |
5940 |
31 Jan 12 |
nicklas |
642 |
for (AnnotationType at : selectedAnnotationTypes.keySet()) |
2502 |
09 Aug 06 |
nicklas |
643 |
{ |
5940 |
31 Jan 12 |
nicklas |
644 |
%> |
5940 |
31 Jan 12 |
nicklas |
645 |
<tbl:columndef |
5940 |
31 Jan 12 |
nicklas |
646 |
id="<%="annotation." + at.getId()%>" |
5940 |
31 Jan 12 |
nicklas |
647 |
title="<%=HTML.encodeTags(at.getName()) %>" |
5940 |
31 Jan 12 |
nicklas |
648 |
show="always" |
5940 |
31 Jan 12 |
nicklas |
649 |
/> |
5940 |
31 Jan 12 |
nicklas |
650 |
<% |
5940 |
31 Jan 12 |
nicklas |
651 |
} |
5940 |
31 Jan 12 |
nicklas |
652 |
%> |
5940 |
31 Jan 12 |
nicklas |
653 |
<tbl:columndef |
5940 |
31 Jan 12 |
nicklas |
654 |
id="bioassay" |
5940 |
31 Jan 12 |
nicklas |
655 |
property="COLUMN" |
5940 |
31 Jan 12 |
nicklas |
656 |
title="Bioassay" |
5940 |
31 Jan 12 |
nicklas |
657 |
show="always" |
5940 |
31 Jan 12 |
nicklas |
658 |
sortable="true" |
5940 |
31 Jan 12 |
nicklas |
659 |
/> |
5940 |
31 Jan 12 |
nicklas |
660 |
<tbl:columndef |
5940 |
31 Jan 12 |
nicklas |
661 |
id="position" |
5940 |
31 Jan 12 |
nicklas |
662 |
property="POSITION" |
5940 |
31 Jan 12 |
nicklas |
663 |
title="Position" |
5940 |
31 Jan 12 |
nicklas |
664 |
show="<%=isAveraging ? "never" : "always" %>" |
5940 |
31 Jan 12 |
nicklas |
665 |
sortable="true" |
5940 |
31 Jan 12 |
nicklas |
666 |
/> |
5940 |
31 Jan 12 |
nicklas |
667 |
<tbl:columndef |
5940 |
31 Jan 12 |
nicklas |
668 |
id="count" |
5940 |
31 Jan 12 |
nicklas |
669 |
title="Count" |
5940 |
31 Jan 12 |
nicklas |
670 |
show="<%=isAveraging ? "always" : "never" %>" |
5940 |
31 Jan 12 |
nicklas |
671 |
/> |
5940 |
31 Jan 12 |
nicklas |
672 |
<% |
5940 |
31 Jan 12 |
nicklas |
673 |
for (int ch = 1; ch <= channels; ++ch) |
5940 |
31 Jan 12 |
nicklas |
674 |
{ |
5940 |
31 Jan 12 |
nicklas |
675 |
%> |
5940 |
31 Jan 12 |
nicklas |
676 |
<tbl:columndef |
5940 |
31 Jan 12 |
nicklas |
677 |
id="<%="ch"+ch%>" |
5940 |
31 Jan 12 |
nicklas |
678 |
property="<%="%"+ch%>" |
5940 |
31 Jan 12 |
nicklas |
679 |
datatype="float" |
5940 |
31 Jan 12 |
nicklas |
680 |
title="<%="Ch " + ch%>" |
5940 |
31 Jan 12 |
nicklas |
681 |
tooltip="<%=transform.isTransformed() ? transform.toString() : null %>" |
5940 |
31 Jan 12 |
nicklas |
682 |
sortable="true" |
5940 |
31 Jan 12 |
nicklas |
683 |
filterable="true" |
5940 |
31 Jan 12 |
nicklas |
684 |
exportable="true" |
5940 |
31 Jan 12 |
nicklas |
685 |
formatter="<%=numberFormatter%>" |
5940 |
31 Jan 12 |
nicklas |
686 |
/> |
5940 |
31 Jan 12 |
nicklas |
687 |
<% |
5940 |
31 Jan 12 |
nicklas |
688 |
} |
5940 |
31 Jan 12 |
nicklas |
689 |
%> |
5940 |
31 Jan 12 |
nicklas |
690 |
<% |
5940 |
31 Jan 12 |
nicklas |
691 |
for (TableColumn tc : spotColumns) |
5940 |
31 Jan 12 |
nicklas |
692 |
{ |
5940 |
31 Jan 12 |
nicklas |
693 |
%> |
5940 |
31 Jan 12 |
nicklas |
694 |
<tbl:columndef |
5940 |
31 Jan 12 |
nicklas |
695 |
id="<%=tc.getId()%>" |
5940 |
31 Jan 12 |
nicklas |
696 |
property="<%=tc.getProperty()%>" |
5940 |
31 Jan 12 |
nicklas |
697 |
datatype="<%=tc.getDatatype().getStringValue()%>" |
5940 |
31 Jan 12 |
nicklas |
698 |
title="<%=HTML.encodeTags(tc.getTitle())%>" |
5940 |
31 Jan 12 |
nicklas |
699 |
sortable="<%=tc.getSortable()%>" |
5940 |
31 Jan 12 |
nicklas |
700 |
filterable="<%=tc.getFilterable()%>" |
5940 |
31 Jan 12 |
nicklas |
701 |
exportable="<%=tc.getExportable()%>" |
5940 |
31 Jan 12 |
nicklas |
702 |
show="<%=!isAveraging || tc.isAveragable() ? tc.getShow() : "never"%>" |
5940 |
31 Jan 12 |
nicklas |
703 |
formatter="<%=tc.getFormatter()%>" |
5940 |
31 Jan 12 |
nicklas |
704 |
/> |
5940 |
31 Jan 12 |
nicklas |
705 |
<% |
5940 |
31 Jan 12 |
nicklas |
706 |
} |
5940 |
31 Jan 12 |
nicklas |
707 |
%> |
5940 |
31 Jan 12 |
nicklas |
708 |
<tbl:data style="border-left: 0px; border-right: 0px;"> |
5940 |
31 Jan 12 |
nicklas |
709 |
<tbl:headers> |
5959 |
14 Feb 12 |
nicklas |
710 |
<tbl:headerrow> |
5940 |
31 Jan 12 |
nicklas |
711 |
<tbl:columnheaders /> |
5959 |
14 Feb 12 |
nicklas |
712 |
</tbl:headerrow> |
5940 |
31 Jan 12 |
nicklas |
713 |
</tbl:headers> |
5940 |
31 Jan 12 |
nicklas |
714 |
<tbl:rows> |
5940 |
31 Jan 12 |
nicklas |
715 |
<% |
5940 |
31 Jan 12 |
nicklas |
716 |
int index = 0; |
5940 |
31 Jan 12 |
nicklas |
717 |
float[] intensity = new float[channels+1]; |
5940 |
31 Jan 12 |
nicklas |
718 |
while (spotData.hasNext()) |
5105 |
28 Sep 09 |
nicklas |
719 |
{ |
5940 |
31 Jan 12 |
nicklas |
720 |
SqlResult item = spotData.next(); |
5940 |
31 Jan 12 |
nicklas |
721 |
index++; |
5940 |
31 Jan 12 |
nicklas |
722 |
BioAssay bioAssay = explorer.getBioAssay(dc, item.getShort(1)); |
5940 |
31 Jan 12 |
nicklas |
723 |
for (int ch = 1; ch <= channels; ++ch) |
2490 |
08 Aug 06 |
nicklas |
724 |
{ |
5940 |
31 Jan 12 |
nicklas |
725 |
intensity[ch] = item.getFloat(2+ch); |
5940 |
31 Jan 12 |
nicklas |
726 |
} |
5940 |
31 Jan 12 |
nicklas |
727 |
%> |
5940 |
31 Jan 12 |
nicklas |
728 |
<tbl:row> |
5940 |
31 Jan 12 |
nicklas |
729 |
<% |
5940 |
31 Jan 12 |
nicklas |
730 |
for (Map.Entry<AnnotationType, AnnotationSummary> entry : selectedAnnotationTypes.entrySet()) |
2514 |
11 Aug 06 |
nicklas |
731 |
{ |
5940 |
31 Jan 12 |
nicklas |
732 |
AnnotationType at = entry.getKey(); |
5940 |
31 Jan 12 |
nicklas |
733 |
AnnotationGroup annotationGroup = entry.getValue().getAnnotationGroup(bioAssay.getDataCubeColumnNo()); |
5940 |
31 Jan 12 |
nicklas |
734 |
String allValues = annotationGroup.getTitle(); |
5940 |
31 Jan 12 |
nicklas |
735 |
if (hasRatio) |
5940 |
31 Jan 12 |
nicklas |
736 |
{ |
5940 |
31 Jan 12 |
nicklas |
737 |
float logRatio = (float)(Math.log(transform.unTransform(intensity[1]) / transform.unTransform(intensity[2]))); |
5940 |
31 Jan 12 |
nicklas |
738 |
annotationGroup.addStatistics("logratio", logRatio); |
5940 |
31 Jan 12 |
nicklas |
739 |
annotationGroup.addStatistics("logratio2", logRatio * logRatio); |
5940 |
31 Jan 12 |
nicklas |
740 |
} |
5940 |
31 Jan 12 |
nicklas |
741 |
for (int ch = 1; ch <= channels; ++ch) |
5940 |
31 Jan 12 |
nicklas |
742 |
{ |
5940 |
31 Jan 12 |
nicklas |
743 |
annotationGroup.addValue(ch, (float)transform.unTransform(intensity[ch])); |
5940 |
31 Jan 12 |
nicklas |
744 |
} |
5940 |
31 Jan 12 |
nicklas |
745 |
%> |
5940 |
31 Jan 12 |
nicklas |
746 |
<tbl:cell column="<%="annotation."+at.getId()%>" style="<%="background: "+annotationGroup.getColor()+";"%>"> |
5940 |
31 Jan 12 |
nicklas |
747 |
<%=allValues%> |
5940 |
31 Jan 12 |
nicklas |
748 |
</tbl:cell> |
5940 |
31 Jan 12 |
nicklas |
749 |
<% |
4916 |
30 Apr 09 |
nicklas |
750 |
} |
5940 |
31 Jan 12 |
nicklas |
751 |
%> |
5940 |
31 Jan 12 |
nicklas |
752 |
<tbl:cell column="bioassay"><%=Base.getLinkedName(ID, bioAssay, false, true)%></tbl:cell> |
5940 |
31 Jan 12 |
nicklas |
753 |
<tbl:cell column="position"><%=item.getInt(2)%></tbl:cell> |
5940 |
31 Jan 12 |
nicklas |
754 |
<tbl:cell column="count"><%=item.getInt(2)%></tbl:cell> |
5940 |
31 Jan 12 |
nicklas |
755 |
<% |
5105 |
28 Sep 09 |
nicklas |
756 |
for (int ch = 1; ch <= channels; ++ch) |
5105 |
28 Sep 09 |
nicklas |
757 |
{ |
5940 |
31 Jan 12 |
nicklas |
758 |
%> |
5940 |
31 Jan 12 |
nicklas |
759 |
<tbl:cell column="<%="ch" + ch%>" value="<%=intensity[ch]%>" /> |
5940 |
31 Jan 12 |
nicklas |
760 |
<% |
5105 |
28 Sep 09 |
nicklas |
761 |
} |
4916 |
30 Apr 09 |
nicklas |
762 |
%> |
2502 |
09 Aug 06 |
nicklas |
763 |
<% |
5940 |
31 Jan 12 |
nicklas |
764 |
int colIndex = 3 + channels; |
5940 |
31 Jan 12 |
nicklas |
765 |
for (String columnId : selected.selectedIds) |
5940 |
31 Jan 12 |
nicklas |
766 |
{ |
5940 |
31 Jan 12 |
nicklas |
767 |
%> |
5940 |
31 Jan 12 |
nicklas |
768 |
<tbl:cell column="<%=columnId%>" value="<%=item.getObject(colIndex++)%>" /> |
5940 |
31 Jan 12 |
nicklas |
769 |
<% |
5940 |
31 Jan 12 |
nicklas |
770 |
} |
2514 |
11 Aug 06 |
nicklas |
771 |
%> |
5940 |
31 Jan 12 |
nicklas |
772 |
</tbl:row> |
2514 |
11 Aug 06 |
nicklas |
773 |
<% |
5940 |
31 Jan 12 |
nicklas |
774 |
} |
5940 |
31 Jan 12 |
nicklas |
775 |
%> |
5940 |
31 Jan 12 |
nicklas |
776 |
</tbl:rows> |
5940 |
31 Jan 12 |
nicklas |
777 |
</tbl:data> |
2487 |
04 Aug 06 |
nicklas |
778 |
</tbl:table> |
2514 |
11 Aug 06 |
nicklas |
779 |
<% |
2531 |
16 Aug 06 |
nicklas |
780 |
} |
2531 |
16 Aug 06 |
nicklas |
781 |
%> |
6315 |
06 Sep 13 |
nicklas |
782 |
<% |
6315 |
06 Sep 13 |
nicklas |
783 |
JSONArray jsonAnnotationSummary = new JSONArray(); |
6315 |
06 Sep 13 |
nicklas |
784 |
for (Map.Entry<AnnotationType, AnnotationSummary> entry : selectedAnnotationTypes.entrySet()) |
2514 |
11 Aug 06 |
nicklas |
785 |
{ |
6315 |
06 Sep 13 |
nicklas |
786 |
AnnotationType at = entry.getKey(); |
6315 |
06 Sep 13 |
nicklas |
787 |
AnnotationSummary summary = entry.getValue(); |
6315 |
06 Sep 13 |
nicklas |
788 |
if (summary != null) |
2514 |
11 Aug 06 |
nicklas |
789 |
{ |
6315 |
06 Sep 13 |
nicklas |
790 |
JSONObject jsonAnnotationType = new JSONObject(); |
6315 |
06 Sep 13 |
nicklas |
791 |
jsonAnnotationType.put("id", at.getId()); |
6315 |
06 Sep 13 |
nicklas |
792 |
jsonAnnotationSummary.add(jsonAnnotationType); |
6315 |
06 Sep 13 |
nicklas |
793 |
|
6315 |
06 Sep 13 |
nicklas |
794 |
JSONArray jsonGroups = new JSONArray(); |
6315 |
06 Sep 13 |
nicklas |
795 |
jsonAnnotationType.put("groups", jsonGroups); |
6315 |
06 Sep 13 |
nicklas |
796 |
|
6315 |
06 Sep 13 |
nicklas |
797 |
for (AnnotationGroup ag : summary.getAnnotationGroups()) |
2514 |
11 Aug 06 |
nicklas |
798 |
{ |
6315 |
06 Sep 13 |
nicklas |
799 |
JSONObject jsonGroup = new JSONObject(); |
6315 |
06 Sep 13 |
nicklas |
800 |
jsonGroups.add(jsonGroup); |
6315 |
06 Sep 13 |
nicklas |
801 |
jsonGroup.put("id", ag.getId()); |
6315 |
06 Sep 13 |
nicklas |
802 |
jsonGroup.put("count", ag.getCount(1)); |
6315 |
06 Sep 13 |
nicklas |
803 |
|
6315 |
06 Sep 13 |
nicklas |
804 |
JSONArray jsonCh = new JSONArray(); |
6315 |
06 Sep 13 |
nicklas |
805 |
jsonGroup.put("mean", jsonCh); |
6315 |
06 Sep 13 |
nicklas |
806 |
for (int ch = 1; ch <= channels; ++ch) |
5322 |
22 Apr 10 |
nicklas |
807 |
{ |
6315 |
06 Sep 13 |
nicklas |
808 |
jsonCh.add(Values.formatNumber(ag.getMean(ch), 2)); |
5322 |
22 Apr 10 |
nicklas |
809 |
} |
6315 |
06 Sep 13 |
nicklas |
810 |
if (hasRatio) |
6315 |
06 Sep 13 |
nicklas |
811 |
{ |
6315 |
06 Sep 13 |
nicklas |
812 |
float r = ag.getStatistics("logratio"); |
6315 |
06 Sep 13 |
nicklas |
813 |
int count = ag.getCount(1); |
6315 |
06 Sep 13 |
nicklas |
814 |
float gMean = count > 0 ? (float)Math.exp(r / count) : Float.NaN; |
6315 |
06 Sep 13 |
nicklas |
815 |
float sd = count > 1 ? |
6315 |
06 Sep 13 |
nicklas |
816 |
(float)Math.sqrt((ag.getStatistics("logratio2") - r * (r / count))/(count-1)) |
6315 |
06 Sep 13 |
nicklas |
817 |
: Float.NaN; |
6315 |
06 Sep 13 |
nicklas |
818 |
jsonGroup.put("gmean", Values.formatNumber(gMean, 2)); |
6315 |
06 Sep 13 |
nicklas |
819 |
jsonGroup.put("sd", Values.formatNumber(sd, 2)); |
6315 |
06 Sep 13 |
nicklas |
820 |
} |
2514 |
11 Aug 06 |
nicklas |
821 |
} |
5322 |
22 Apr 10 |
nicklas |
822 |
} |
2514 |
11 Aug 06 |
nicklas |
823 |
} |
6315 |
06 Sep 13 |
nicklas |
824 |
%> |
6387 |
18 Dec 13 |
nicklas |
825 |
<div id="annotation-summary" class="datacontainer" |
6315 |
06 Sep 13 |
nicklas |
826 |
data-channels="<%=channels%>" |
6315 |
06 Sep 13 |
nicklas |
827 |
data-summary="<%=HTML.encodeTags(jsonAnnotationSummary.toJSONString()) %>" |
6315 |
06 Sep 13 |
nicklas |
828 |
></div> |
5940 |
31 Jan 12 |
nicklas |
829 |
<% |
5940 |
31 Jan 12 |
nicklas |
830 |
} |
5940 |
31 Jan 12 |
nicklas |
831 |
%> |
5940 |
31 Jan 12 |
nicklas |
832 |
</t:tab> |
5940 |
31 Jan 12 |
nicklas |
833 |
</t:tabcontrol> |
2487 |
04 Aug 06 |
nicklas |
834 |
|
2487 |
04 Aug 06 |
nicklas |
835 |
</base:body> |
2487 |
04 Aug 06 |
nicklas |
836 |
</base:page> |
2487 |
04 Aug 06 |
nicklas |
837 |
<% |
2487 |
04 Aug 06 |
nicklas |
838 |
} |
2487 |
04 Aug 06 |
nicklas |
839 |
finally |
2487 |
04 Aug 06 |
nicklas |
840 |
{ |
2502 |
09 Aug 06 |
nicklas |
841 |
if (spotData != null) spotData.close(); |
2487 |
04 Aug 06 |
nicklas |
842 |
if (dc != null) dc.close(); |
2487 |
04 Aug 06 |
nicklas |
843 |
} |
2487 |
04 Aug 06 |
nicklas |
844 |
|
2487 |
04 Aug 06 |
nicklas |
845 |
%> |