-
Notifications
You must be signed in to change notification settings - Fork 1
/
d3viewer.html
174 lines (158 loc) · 7.3 KB
/
d3viewer.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<!DOCTYPE html>
<html>
<head>
<title>CoocurViewer - UW Graphics Group</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<!-- boostrap -->
<link href="lib/bootstrap.min.css" rel="stylesheet" />
<link href="lib/bootstrap-slider.css" rel="stylesheet" />
<link href="lib/bootstrap-submenu.css" rel="stylesheet" />
<!-- local stylesheet -->
<link rel="stylesheet" href="style.css" />
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">
<img src="img/logo.png" class="img-responsive pull-left">
CooccurViewer
</a>
</div>
<div class="collapse navbar-collapse" id="navbar-collapse-1">
<ul class="nav navbar-nav">
<li>
<a href="#" data-toggle="modal" data-target="#faq">How to use</a>
</li>
<li>
<div class="btn-group navbar-btn" id="datasetChooser">
<button type="button" class="btn btn-primary" id="currentDataset">SHFV</button>
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu" role="menu" id="datasetOptions">
<li><a href="#">[loading...]</a></li>
<li><a href="#">SHIV</a></li>
</ul>
</div>
</li>
</ul>
<p class="navbar-text navbar-right"><small>
Test interface for finding interesting co-occurence locations
</small></p>
</div>
</div>
</nav>
<div class="container-fluid">
<div class="row">
<div class="col-sm-12">
<svg id="d3canvas" version="1.1" baseProfile="full" xmlns="http://www.w3.org/2000/svg"></svg>
</div>
<div id="d3loading">
<div id="status">Loading components...</div>
</div>
</div>
<div class="row" id="d3-sliders">
<div class="col-sm-9">
<div class="checkbox">
<label>
<input type="checkbox" id="dosynonymy" /> Merge synonymous nucleotides into the wild-type?
</label>
</div>
</div>
<div class="col-sm-3">
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#custompair">
Look at specific nucleotide pair
</button>
</div>
</div>
<div class="row">
<div class="col-sm-12">
</div>
</div>
<!--
<div class="row">
<div class="col-sm-6">
<div class="checkbox">
<label>
<input type="checkbox" id="dostats" /> Do Slider Histograms? (terrible slow-down for anything not H5N1)
</label>
</div>
</div>
<div class="col-sm-6">
<div class="checkbox">
<label>
<input type="checkbox" id="keepsynonpairs" disabled /> Show synonymous pairs?
</label>
</div>
</div>
</div>
-->
</div>
<div class="modal fade" id="custompair" tabIndex="-1" role="dialog" aria-labelledby="custompairLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="custompairLabel">Choose specific nucleotide pair</h4>
</div>
<div class="modal-body">
<div class="alert alert-danger" role="alert" id="custompairFeedback" style="display: none;">
<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
<span class="sr-only">Error:</span>
No overlapping reads found for given positions.
</div>
<p>Please pick two positions to compare. Keep in mind that the maximum window between pairs of positions is <code id="numWindow">##</code>.<p>
<form class="form-inline">
<div class="form-group">
<label class="sr-only" for="pickedPos1">Position 1</label>
<input type="number" id="pickedPos1" required />
</div>
<div class="form-group">
<label class="sr-only" for="pickedPos2">Position 2</label>
<input type="number" id="pickedPos2" required />
</div>
<button type="submit" class="btn btn-primary" id="customPairSubmit">View Co-occurrence</button>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div id="faq" class="modal fade" tabIndex="-2" role="dialog" aria-labelledby="faqLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
</div>
</div>
</div>
<!-- load scripts down here -->
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!--<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>-->
<script src="lib/d3.min.js" charset="utf-8"></script>
<!-- helps with parsing mousewheel events -->
<script type="text/javascript" src="lib/jquery.mousewheel.js"></script>
<script type="text/javascript" src="lib/d3-tip.js"></script>
<!-- boostrap -->
<script type="text/javascript" src="lib/bootstrap.min.js"></script>
<script type="text/javascript" src="lib/bootstrap-slider.js"></script>
<script type="text/javascript" src="lib/bootstrap-submenu.js"></script>
<!-- adds ability to push/pop matrices, and adds matrix classes/functions -->
<!-- https://github.com/evanw/lightgl.js/ -->
<script type="text/javascript" src="lib/lightgl.js"></script>
<!--<script type="text/javascript" src="bitmap.js"></script>-->
<script type="text/javascript" src="colorbrewer.js"></script>
<script type="text/javascript" src="binarytojson.js"></script>
</body>
</html>