5730 |
18 Nov 19 |
nicklas |
1 |
<%@ page |
5730 |
18 Nov 19 |
nicklas |
2 |
pageEncoding="UTF-8" |
5730 |
18 Nov 19 |
nicklas |
3 |
session="false" |
5730 |
18 Nov 19 |
nicklas |
4 |
import="net.sf.basedb.core.User" |
5730 |
18 Nov 19 |
nicklas |
5 |
import="net.sf.basedb.core.DbControl" |
5730 |
18 Nov 19 |
nicklas |
6 |
import="net.sf.basedb.core.SessionControl" |
5730 |
18 Nov 19 |
nicklas |
7 |
import="net.sf.basedb.core.Application" |
5730 |
18 Nov 19 |
nicklas |
8 |
import="net.sf.basedb.core.File" |
5730 |
18 Nov 19 |
nicklas |
9 |
import="net.sf.basedb.core.RawBioAssay" |
5730 |
18 Nov 19 |
nicklas |
10 |
import="net.sf.basedb.util.Values" |
5730 |
18 Nov 19 |
nicklas |
11 |
import="net.sf.basedb.clients.web.Base" |
5730 |
18 Nov 19 |
nicklas |
12 |
import="net.sf.basedb.clients.web.util.HTML" |
5730 |
18 Nov 19 |
nicklas |
13 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
5730 |
18 Nov 19 |
nicklas |
14 |
%> |
5730 |
18 Nov 19 |
nicklas |
15 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
5730 |
18 Nov 19 |
nicklas |
16 |
<% |
5730 |
18 Nov 19 |
nicklas |
17 |
final SessionControl sc = Base.getExistingSessionControl(request, "net.sf.basedb.reggie", true); |
5730 |
18 Nov 19 |
nicklas |
18 |
final String ID = sc.getId(); |
5730 |
18 Nov 19 |
nicklas |
19 |
final float scale = Base.getScale(sc); |
5730 |
18 Nov 19 |
nicklas |
20 |
final String home = ExtensionsControl.getHomeUrl("net.sf.basedb.reggie"); |
6391 |
15 Sep 21 |
nicklas |
21 |
final String varSearchHome = ExtensionsControl.getHomeUrl("net.sf.basedb.varsearch.lucene-column"); |
5730 |
18 Nov 19 |
nicklas |
22 |
DbControl dc = null; |
5730 |
18 Nov 19 |
nicklas |
23 |
try |
5730 |
18 Nov 19 |
nicklas |
24 |
{ |
5730 |
18 Nov 19 |
nicklas |
25 |
dc = sc.newDbControl(); |
5730 |
18 Nov 19 |
nicklas |
26 |
final User user = User.getById(dc, sc.getLoggedInUserId()); |
5730 |
18 Nov 19 |
nicklas |
27 |
|
5730 |
18 Nov 19 |
nicklas |
28 |
int fileId = Values.getInt(request.getParameter("fileId")); |
5730 |
18 Nov 19 |
nicklas |
29 |
int itemId = Values.getInt(request.getParameter("itemId")); |
6387 |
15 Sep 21 |
nicklas |
30 |
String mode = Values.getString(request.getParameter("mode"), "variant-call"); |
6387 |
15 Sep 21 |
nicklas |
31 |
boolean genotypeMode = "genotype".equals(mode); |
5730 |
18 Nov 19 |
nicklas |
32 |
|
5730 |
18 Nov 19 |
nicklas |
33 |
RawBioAssay vcall = RawBioAssay.getById(dc, itemId); |
6387 |
15 Sep 21 |
nicklas |
34 |
String title = (genotypeMode ? "Genotype summary: " : "Variant summary: ")+vcall.getName(); |
5730 |
18 Nov 19 |
nicklas |
35 |
%> |
6387 |
15 Sep 21 |
nicklas |
36 |
<base:page type="popup" title="<%=genotypeMode?"View genotypes" : "View variants"%>"> |
5730 |
18 Nov 19 |
nicklas |
37 |
<base:head scripts="~view_variants.js,~../reggie-2.js" styles="path.css,~../css/reggie-2.css"> |
5730 |
18 Nov 19 |
nicklas |
38 |
|
5730 |
18 Nov 19 |
nicklas |
39 |
<style> |
5730 |
18 Nov 19 |
nicklas |
40 |
|
5730 |
18 Nov 19 |
nicklas |
41 |
#snp-table th |
5730 |
18 Nov 19 |
nicklas |
42 |
{ |
5730 |
18 Nov 19 |
nicklas |
43 |
text-align: left; |
5730 |
18 Nov 19 |
nicklas |
44 |
padding: 2px 4px; |
5730 |
18 Nov 19 |
nicklas |
45 |
border-right-width: 0; |
5730 |
18 Nov 19 |
nicklas |
46 |
} |
5730 |
18 Nov 19 |
nicklas |
47 |
|
5730 |
18 Nov 19 |
nicklas |
48 |
#snp-table td |
5730 |
18 Nov 19 |
nicklas |
49 |
{ |
5730 |
18 Nov 19 |
nicklas |
50 |
padding: 1px 4px; |
5730 |
18 Nov 19 |
nicklas |
51 |
} |
5730 |
18 Nov 19 |
nicklas |
52 |
|
5730 |
18 Nov 19 |
nicklas |
53 |
#snp-table .snp |
5730 |
18 Nov 19 |
nicklas |
54 |
{ |
5730 |
18 Nov 19 |
nicklas |
55 |
border-bottom-style: dotted; |
5730 |
18 Nov 19 |
nicklas |
56 |
border-bottom-width: 1px; |
5730 |
18 Nov 19 |
nicklas |
57 |
} |
5730 |
18 Nov 19 |
nicklas |
58 |
|
6387 |
15 Sep 21 |
nicklas |
59 |
#snp-table .ref, #snp-table .gt |
5730 |
18 Nov 19 |
nicklas |
60 |
{ |
5730 |
18 Nov 19 |
nicklas |
61 |
text-align: center; |
5812 |
16 Jan 20 |
nicklas |
62 |
white-space: nowrap; |
5730 |
18 Nov 19 |
nicklas |
63 |
} |
6387 |
15 Sep 21 |
nicklas |
64 |
|
6391 |
15 Sep 21 |
nicklas |
65 |
#snp-table .zoom img |
6391 |
15 Sep 21 |
nicklas |
66 |
{ |
6391 |
15 Sep 21 |
nicklas |
67 |
width: 16px; |
6391 |
15 Sep 21 |
nicklas |
68 |
height: 16px; |
6391 |
15 Sep 21 |
nicklas |
69 |
} |
6391 |
15 Sep 21 |
nicklas |
70 |
|
6387 |
15 Sep 21 |
nicklas |
71 |
#snp-table .is-variant |
6387 |
15 Sep 21 |
nicklas |
72 |
{ |
6387 |
15 Sep 21 |
nicklas |
73 |
font-weight: bold; |
6387 |
15 Sep 21 |
nicklas |
74 |
} |
6387 |
15 Sep 21 |
nicklas |
75 |
|
6394 |
16 Sep 21 |
nicklas |
76 |
#snp-table .no-data |
6394 |
16 Sep 21 |
nicklas |
77 |
{ |
6394 |
16 Sep 21 |
nicklas |
78 |
color: #999999; |
6394 |
16 Sep 21 |
nicklas |
79 |
} |
6394 |
16 Sep 21 |
nicklas |
80 |
|
5730 |
18 Nov 19 |
nicklas |
81 |
</style> |
5730 |
18 Nov 19 |
nicklas |
82 |
|
5730 |
18 Nov 19 |
nicklas |
83 |
</base:head> |
5730 |
18 Nov 19 |
nicklas |
84 |
<base:body data-read-only="1"> |
5730 |
18 Nov 19 |
nicklas |
85 |
<h1><%=HTML.encodeTags(title) %></h1> |
5730 |
18 Nov 19 |
nicklas |
86 |
|
5730 |
18 Nov 19 |
nicklas |
87 |
<div id="page-data" class="datacontainer" |
5730 |
18 Nov 19 |
nicklas |
88 |
data-file-id="<%=fileId%>" |
5730 |
18 Nov 19 |
nicklas |
89 |
data-item-id="<%=itemId%>" |
6387 |
15 Sep 21 |
nicklas |
90 |
data-mode="<%=mode%>" |
6391 |
15 Sep 21 |
nicklas |
91 |
data-varsearch-home="<%=varSearchHome == null?"":varSearchHome%>" |
5730 |
18 Nov 19 |
nicklas |
92 |
></div> |
5730 |
18 Nov 19 |
nicklas |
93 |
|
5730 |
18 Nov 19 |
nicklas |
94 |
<form name="reggie" id="wizard" class="wizard"> |
5730 |
18 Nov 19 |
nicklas |
95 |
<div class="content bottomborder"> |
5730 |
18 Nov 19 |
nicklas |
96 |
<table id="sample-summary" class="fullform input100 bottomborder" style="height:auto;"> |
5730 |
18 Nov 19 |
nicklas |
97 |
<tbody> |
5730 |
18 Nov 19 |
nicklas |
98 |
<tr> |
5730 |
18 Nov 19 |
nicklas |
99 |
<th>Bioassay</th> |
5730 |
18 Nov 19 |
nicklas |
100 |
<td><%=HTML.encodeTags(vcall.getName())%></td> |
5730 |
18 Nov 19 |
nicklas |
101 |
</tr> |
6387 |
15 Sep 21 |
nicklas |
102 |
<% |
6387 |
15 Sep 21 |
nicklas |
103 |
if (genotypeMode) |
6387 |
15 Sep 21 |
nicklas |
104 |
{ |
6387 |
15 Sep 21 |
nicklas |
105 |
%> |
6387 |
15 Sep 21 |
nicklas |
106 |
<tr> |
6387 |
15 Sep 21 |
nicklas |
107 |
<th>Target</th> |
6387 |
15 Sep 21 |
nicklas |
108 |
<td><span id="targeted-genotype"></span></td> |
6387 |
15 Sep 21 |
nicklas |
109 |
</tr> |
6387 |
15 Sep 21 |
nicklas |
110 |
<tr> |
6387 |
15 Sep 21 |
nicklas |
111 |
<th>Genotypes</th> |
6387 |
15 Sep 21 |
nicklas |
112 |
<td><span id="snp-count"></span></td> |
6387 |
15 Sep 21 |
nicklas |
113 |
</tr> |
6387 |
15 Sep 21 |
nicklas |
114 |
<% |
6387 |
15 Sep 21 |
nicklas |
115 |
} |
6387 |
15 Sep 21 |
nicklas |
116 |
else |
6387 |
15 Sep 21 |
nicklas |
117 |
{ |
6387 |
15 Sep 21 |
nicklas |
118 |
%> |
6387 |
15 Sep 21 |
nicklas |
119 |
<tr> |
6387 |
15 Sep 21 |
nicklas |
120 |
<th>Variants</th> |
6387 |
15 Sep 21 |
nicklas |
121 |
<td><span id="snp-count"></span></td> |
6387 |
15 Sep 21 |
nicklas |
122 |
</tr> |
6387 |
15 Sep 21 |
nicklas |
123 |
<% |
6387 |
15 Sep 21 |
nicklas |
124 |
} |
6387 |
15 Sep 21 |
nicklas |
125 |
%> |
5730 |
18 Nov 19 |
nicklas |
126 |
<tr> |
5730 |
18 Nov 19 |
nicklas |
127 |
<th>Comment</th> |
5730 |
18 Nov 19 |
nicklas |
128 |
<td><%=HTML.encodeTags(vcall.getDescription())%></td> |
5730 |
18 Nov 19 |
nicklas |
129 |
</tr> |
5730 |
18 Nov 19 |
nicklas |
130 |
</tbody> |
5730 |
18 Nov 19 |
nicklas |
131 |
</table> |
5730 |
18 Nov 19 |
nicklas |
132 |
|
5730 |
18 Nov 19 |
nicklas |
133 |
<table id="snp-table" style="display:none; width: 100%;"> |
5730 |
18 Nov 19 |
nicklas |
134 |
<tr class="bottomborder bg-filled-100"> |
5730 |
18 Nov 19 |
nicklas |
135 |
<th>Location</th> |
5730 |
18 Nov 19 |
nicklas |
136 |
<th class="dottedleft ref">Ref › Alt</th> |
5805 |
09 Jan 20 |
nicklas |
137 |
<th class="dottedleft">Type</th> |
5730 |
18 Nov 19 |
nicklas |
138 |
<th class="dottedleft">Gene</th> |
6387 |
15 Sep 21 |
nicklas |
139 |
<th class="dottedleft gt">GT</th> |
6387 |
15 Sep 21 |
nicklas |
140 |
<th class="dottedleft ad" title="Allelic depths for the ref and alt alleles">AD</th> |
6387 |
15 Sep 21 |
nicklas |
141 |
<th class="dottedleft">HGVS.c</th> |
6387 |
15 Sep 21 |
nicklas |
142 |
<th class="dottedleft">HGVS.p</th> |
6387 |
15 Sep 21 |
nicklas |
143 |
<th class="dottedleft">COSMIC</th> |
6387 |
15 Sep 21 |
nicklas |
144 |
<th class="dottedleft">dbSNP</th> |
6391 |
15 Sep 21 |
nicklas |
145 |
<th></th> |
5730 |
18 Nov 19 |
nicklas |
146 |
</tr> |
5730 |
18 Nov 19 |
nicklas |
147 |
<tbody id="snp-list"></tbody> |
5730 |
18 Nov 19 |
nicklas |
148 |
</table> |
5730 |
18 Nov 19 |
nicklas |
149 |
|
5730 |
18 Nov 19 |
nicklas |
150 |
<div id="wizard-status"></div> |
5730 |
18 Nov 19 |
nicklas |
151 |
</div> |
5730 |
18 Nov 19 |
nicklas |
152 |
</form> |
5730 |
18 Nov 19 |
nicklas |
153 |
|
5730 |
18 Nov 19 |
nicklas |
154 |
<base:buttongroup subclass="dialogbuttons" id="dialogbuttons"> |
5730 |
18 Nov 19 |
nicklas |
155 |
<base:button id="close" title="Close" /> |
5730 |
18 Nov 19 |
nicklas |
156 |
</base:buttongroup> |
5730 |
18 Nov 19 |
nicklas |
157 |
|
5730 |
18 Nov 19 |
nicklas |
158 |
</base:body> |
5730 |
18 Nov 19 |
nicklas |
159 |
</base:page> |
5730 |
18 Nov 19 |
nicklas |
160 |
<% |
5730 |
18 Nov 19 |
nicklas |
161 |
} |
5730 |
18 Nov 19 |
nicklas |
162 |
finally |
5730 |
18 Nov 19 |
nicklas |
163 |
{ |
5730 |
18 Nov 19 |
nicklas |
164 |
if (dc != null) dc.close(); |
5730 |
18 Nov 19 |
nicklas |
165 |
} |
5730 |
18 Nov 19 |
nicklas |
166 |
%> |