Skip to content

Commit f89ad08

Browse files
author
Joe Brown
committed
updates proportion of bases over target
1 parent 9cda1bf commit f89ad08

File tree

1 file changed

+13
-18
lines changed

1 file changed

+13
-18
lines changed

templates/covdist.py

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,24 @@
1515
<meta name="author" content="Joe Brown" />
1616
<title>covdist</title>
1717
18-
<link href="https://fonts.googleapis.com/css2?family=Rajdhani:wght@700&display=swap" rel="stylesheet">
19-
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css" rel="stylesheet">
20-
<link href="https://raw.githack.com/ttskch/select2-bootstrap4-theme/master/dist/select2-bootstrap4.css" rel="stylesheet">
18+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Rajdhani:wght@700&display=swap">
19+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css">
20+
<link rel="stylesheet" href="https://raw.githack.com/ttskch/select2-bootstrap4-theme/master/dist/select2-bootstrap4.css">
2121
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
2222
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/css/select2.min.css">
23-
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.12.6/css/selectize.bootstrap3.min.css">
24-
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.12/css/bootstrap-select.min.css" />
25-
<link href="https://cdnjs.cloudflare.com/ajax/libs/dc/3.1.9/dc.min.css" rel="stylesheet" type="text/css" />
23+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.12/css/bootstrap-select.min.css" />
24+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/dc/3.1.9/dc.min.css">
25+
<link rel="stylesheet" href="https://cdn.datatables.net/v/bs4/dt-1.10.20/b-1.6.1/b-colvis-1.6.1/b-html5-1.6.1/cr-1.5.2/r-2.2.3/rg-1.1.1/sc-2.0.1/sp-1.0.1/sl-1.3.1/datatables.min.css">
2626
2727
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
2828
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.bundle.min.js"></script>
2929
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.min.js"></script>
3030
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
31-
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.12.6/js/standalone/selectize.min.js"></script>
32-
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/5.15.0/d3.js"></script>
33-
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/crossfilter2/1.5.2/crossfilter.min.js"></script>
34-
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/dc/3.1.9/dc.min.js"></script>
35-
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.12/js/bootstrap-select.min.js"></script>
36-
37-
<script type="text/javascript"
38-
src="https://cdn.datatables.net/v/bs4/dt-1.10.20/b-1.6.1/b-colvis-1.6.1/b-html5-1.6.1/cr-1.5.2/r-2.2.3/rg-1.1.1/sc-2.0.1/sp-1.0.1/sl-1.3.1/datatables.min.js"></script>
39-
<link rel="stylesheet" type="text/css"
40-
href="https://cdn.datatables.net/v/bs4/dt-1.10.20/b-1.6.1/b-colvis-1.6.1/b-html5-1.6.1/cr-1.5.2/r-2.2.3/rg-1.1.1/sc-2.0.1/sp-1.0.1/sl-1.3.1/datatables.min.css" />
31+
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/5.15.0/d3.js"></script>
32+
<script src="https://cdnjs.cloudflare.com/ajax/libs/crossfilter2/1.5.2/crossfilter.min.js"></script>
33+
<script src="https://cdnjs.cloudflare.com/ajax/libs/dc/3.1.9/dc.min.js"></script>
34+
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.12/js/bootstrap-select.min.js"></script>
35+
<script src="https://cdn.datatables.net/v/bs4/dt-1.10.20/b-1.6.1/b-colvis-1.6.1/b-html5-1.6.1/cr-1.5.2/r-2.2.3/rg-1.1.1/sc-2.0.1/sp-1.0.1/sl-1.3.1/datatables.min.js"></script>
4136
4237
<style type="text/css">
4338
@@ -177,12 +172,12 @@
177172
arr.forEach(function (sample_obj) {
178173
let sample = sample_obj.sample
179174
180-
let x_idx = data[chr][sample_obj.sample]["x"].indexOf(cutoff)
175+
let x_idx = data[chr][sample_obj.sample]["x"].indexOf(cutoff) || -1
181176
let i = 0
182177
// occasionally x proportions have to be shifted slightly
183178
while (x_idx == -1 && i < 10) {
184-
i += 1
185179
x_idx = data[chr][sample_obj.sample]["x"].indexOf(cutoff + i)
180+
i += 1
186181
}
187182
188183
let v;

0 commit comments

Comments
 (0)