-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.html
159 lines (144 loc) · 5.94 KB
/
main.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
<!--
Copyright 2014 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Libraries -->
<link rel="stylesheet" href="/static/css/bootstrap.min.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" charset="utf-8"></script>
<script src="/static/js/bootstrap.min.js" charset="utf-8"></script>
<script src="/static/js/d3.v3.min.js" charset="utf-8"></script>
<script src="/static/js/underscore-min.js" charset="utf-8"></script>
<script src="/static/js/jquery.bootpag.min.js" charset="utf-8"></script>
<!-- Browser code -->
<link rel="stylesheet" href="/static/css/main.css">
<script src="/static/js/main.js" charset="utf-8"></script>
<script src="/static/js/readgraph.js" charset="utf-8"></script>
</head>
<body>
<nav class="navbar navbar-default" role="navigation">
<div class="navbar-brand">Genomics API Browser</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav" id="mainNav">
<li class="active"><a href="#" onclick="toggleUi('reads', this)">Browser</a></li>
<li><a href="#" data-toggle="modal" data-target="#about">About</a></li>
</ul>
</div>
</nav>
<!-- Modals -->
<div class="modal" id="about">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">About GABrowse</h4>
</div>
<div class="modal-body">
<p class="lead">GABrowse is a sample application designed to demonstrate the capabilities of the
<a href="http://ga4gh.github.io/apis/reads/v0.1/">GA4GH Reads API v0.1</a>.</p>
<p>Currently, you can view Reads from Google, NCBI and EBI.</p>
<p>
<ul>
<li>Use the button on the left to select a Readset.</li>
<li>Once loaded, choose a chromosome and zoom or drag the main graph to
explore <a href="http://en.wikipedia.org/wiki/DNA_sequence">Read data.</a></li>
<li>Individual <a href="http://en.wikipedia.org/wiki/Nucleobase">bases</a>
will appear once you zoom in far enough.</li>
</ul>
</p>
<p>The code for this application is in
<a href="https://github.com/googlegenomics/api-client-python">GitHub</a>
and is a work in progress. Patches welcome!</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Done</button>
</div>
</div>
</div>
</div>
<div class="modal" id="readsetSearch">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Select a readset to view</h4>
</div>
<div class="modal-body">
<form class="form-inline" style="margin-bottom: 10px">
<div class="form-group">
<select class="form-control" id="backend">
{% for backend, data in backends.iteritems() %}
<option value="{{ backend }}">
{{ data.name }}
</option>
{% endfor %}
</select>
</div>
<div class="form-group">
{% for backend, data in backends.iteritems() %}
<!-- TODO: Simplify this -->
<select class="form-control datasetSelector" id="datasetId{{ backend }}">
{% for dataset, datasetId in data.datasets.iteritems() %}
<option value="{{ datasetId }}"> {{ dataset }} </option>
{% endfor %}
</select>
{% endfor %}
</div>
<div class="form-group">
<input type="text" class="form-control" placeholder="name" id="readsetName"/>
</div>
<button type="submit" class="btn btn-primary" onclick="return searchReadsets(this)">Search</button>
</form>
<div id="readsetResults" class="list-group">
<img src="static/img/spinner.gif"/>
</div>
<div id="readsetPagination"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Done</button>
</div>
</div>
</div>
</div>
<!-- Read browser -->
<div class="toggleable reads">
<div class="col-md-2">
<h4>Readsets</h4>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#readsetSearch">
<span class="glyphicon glyphicon-plus"/> Add
</button>
<ul class="list-group" id="activeReadsets" style="margin-top: 20px">
</ul>
<div class="well" style="display: none" id="jumpDiv">
<form role="form">
<div class="form-group">
<input type="text" class="form-control" name="name" placeholder="TAS2R38 or rs1726866 or 150,000" id="readsetPosition">
</div>
<button type="submit" class="btn btn-primary"
onclick="switchToLocation($('#readsetPosition').val()); return false;">Jump to position</button>
<div id="jumpResults" class="list-group"></div>
</form>
</div>
<div class="well" style="display: none" id="readDiv">
</div>
</div>
<div class="col-md-10">
<div id="chooseReadsetMessage">
<h3><small>Add a readset to get started.</small></h3>
</div>
<div id="sequences"></div>
<svg id="graph"></svg>
</div>
</div>
</body>
</html>