extensions/net.sf.basedb.reggie/trunk/resources/dnaseq-analysis/view_variants.jsp

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