/
NCV.html
84 lines (72 loc) · 2.4 KB
/
NCV.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
{% block scripts %}
<script>
{% for chrom, cases in ncv_chrom_data.items() %}
$(function chrom_plot() {
var data = []
var layout = {
legend:{hovermode:'closest' },
hovermode:'closest',
annotations : [],
xaxis :{showline: true,
ticktext : {{cases['names']|tojson}},
tickvals : {{cases['x_axis']}},
tickangle : 20,
linecolor: '#636363',
linewidth: 5,
showgrid: true,
gridcolor: '#bdbdbd'
},
yaxis :{range: [-10,],
zeroline: false,
showline: true,
showgrid: false,
linecolor: '#636363',
linewidth: 5,
title : 'NCV{{chrom}}'
}};
var cases = {name: "Current batch (N ="+ "{{cases['count']}}" +")" ,
y: {{cases['values']}},
x: {{cases['x_axis']}},
text: {{cases['names']|tojson}},
mode: 'markers',
type: 'scatter',
};
data.push(cases)
var box = {
y: {{ normal_data['values'] }},
pointpos: 30,
type: 'box',
marker: {
color: '#ccccb3'},
name: 'Negative (N='+{{normal_data['count']}}+')',
hoverinfo:'none'}
data.push(box)
{% for status in abnormal_data.keys() %}
var verif = {
name: "{{status}} T{{chrom}} (N="+{{abnormal_data[status]['count']}}+")",
y: {{abnormal_data[status]['values']}},
x: {{abnormal_data[status]['x_axis']}} ,
text: {{abnormal_data[status]['names']|tojson}},
mode: 'markers',
type: 'scatter'};
data.push(verif);
{% endfor %}
Plotly.newPlot('NCV{{chrom}}_plot', data, layout);
});
{% endfor %}
</script>
<script>
$(document).ready(function() {
var table = $('#batch_table').DataTable( {
lengthChange: false,
paging: false,
info: false,
searching: false
} );
} );
</script>
<script>
var d = new Date();
document.getElementById("demo").innerHTML = d.toDateString();
</script>
{% endblock %}