-
Notifications
You must be signed in to change notification settings - Fork 1
/
external_kpis.html
170 lines (143 loc) · 6.3 KB
/
external_kpis.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>NGI Stockholm status</title>
<script type="text/javascript" src="d3/d3.v3.js"></script>
<script type="text/javascript" src="external_kpis.js"></script>
<link rel="stylesheet" type="text/css" href="external_kpis.css">
</head>
<body>
<!--Empty invisible tooltip div-->
<div class="tooltip" style="opacity: 0"></div>
<h1>NGI Stockholm status</h1>
<p id="date_info"><em>Data generated for projects started since <span id="date"></span> at the <strong>Genomics Production facility</strong></em></p>
<div id="queue">
<h2 style="margin-bottom: 3px">Current Queue - projects waiting to be processed after passing reception control</h2>
<div id="load_charts">
<div id="queue_lp_load">
<h3 style="float: left; margin: 5px 0 0 0">Library prep projects</h3>
<br class="clear">
<div id="queue_sample_load_lp">
<h4 style="float: left">Total no. of samples per application category</h4>
<br class="clear">
</div>
<br class="clear">
<div id="explanation_lp">
<em>Queue time is dependent on the number of "worksets". A workset is a batch of samples processed
by a particular library preparation method, typically 96 samples. On average, 2 worksets are
started each week. Application categories are: <strong>DNA</strong> - Amplicon, de novo,
Metagenome, and WG re-seq; <strong>RNA</strong> - RNA-seq (total RNA);
<strong>SeqCap</strong> - Sequence capture; <strong>Other</strong> - any other
applications</em>
</div>
</div>
<div id="queue_fl_load">
<h3 style="margin: 5px 0 0 0">Finished library projects</h3>
<div id="queue_lane_load_fl">
<h4>Lanes</h4>
</div>
<br class="clear">
<div id="explanation_fl" style="margin-bottom: 26px"> <!--To make the bottom line up with the panel on the left that has more text-->
<em>Queue time is dependent on the number of available lanes. Average no. of lanes started/week
is 32, but that includes library prep projects as well.</em>
</div>
</div>
</div>
</div>
<div id="delivery_times">
<h2>Delivery times (delivered projects)</h2>
<div id="delivery_times_plot"></div>
</div>
<br class="clear">
<div id="affiliations">
<h2>Affiliations (# projects)</h2>
</div>
<div id="application_projects">
<h2>Applications (# projects)</h2>
</div>
<div id="application_samples">
<h2>Applications (# samples prepared)</h2>
</div>
<br class="clear">
<div id="reads_per_lane">
<h2 style="text-align: left">Reads / lane</h2>
<div id="ho_reads_per_lane" class="reads_per_lane">
<h3>HiSeq High Output v3</h3>
</div>
<div id="hov4_reads_per_lane" class="reads_per_lane">
<h3>HiSeq High Output v4</h3>
</div>
<div id="rapid_reads_per_lane" class="reads_per_lane">
<h3>HiSeq Rapid</h3>
</div>
<div id="miseq_reads_per_lane" class="reads_per_lane">
<h3>MiSeq</h3>
</div>
</div>
<script type="text/javascript">
var today = new Date(); // today
var oneYear = new Date( today.getTime() - 365 * 1000*60*60*24);
var firstJuly = new Date("2013-07-01");
var startDate = oneYear;
if(startDate < firstJuly) { startDate = firstJuly; }
startDateFormat = d3.time.format("%e %B, %Y");
var dateStr = startDateFormat(startDate);
d3.select("#date")
.text(dateStr);
var delTimeUrl ="getCouchDbData.php?db=projects&design=kpi_external&view=projects&reduce=false";
d3.json(delTimeUrl, function(json) {
var dataset = makeDeltimeDataset(json, startDate);
//console.log(dataset);
drawDelTimes(dataset);
});
var applProjUrl = "getCouchDbData.php?db=projects&design=kpi_external&view=applications_projects&reduce=false";
d3.json(applProjUrl, function(json) {
var dataset = makeApplProjDataset(json, startDate);
//console.log(dataset);
drawApplProj(dataset);
});
var applSampleUrl = "getCouchDbData.php?db=projects&design=kpi_external&view=applications_samples&reduce=false";
d3.json(applSampleUrl, function(json) {
var dataset = makeApplSampleDataset(json, startDate, false); // exclude Finished library samples
//console.log(dataset);
drawApplSample(dataset);
});
var readsUrl = "getCouchDbData.php?db=flowcells&design=reads&view=per_lane&reduce=false";
d3.json(readsUrl, function(json) {
var hoData = makeReadsDataset(json, startDate, "HighOutput");
var hov4Data = makeReadsDataset(json, startDate, "RapidHighOutput");
var rapidData = makeReadsDataset(json, startDate, "RapidRun");
var miseqData = makeReadsDataset(json, startDate, "MiSeq");
//console.log(dataset);
drawReads(hoData, "ho_reads_per_lane");
drawReads(hov4Data, "hov4_reads_per_lane");
drawReads(rapidData, "rapid_reads_per_lane");
drawReads(miseqData, "miseq_reads_per_lane");
});
var affUrl = "getCouchDbData.php?db=projects&design=kpi_external&view=date_affiliation&reduce=false";
d3.json(affUrl, function(json) {
var dataset = makeAffiliationDataset(json, startDate);
//console.log(dataset);
//console.log(newDataset);
drawAffiliationProj(dataset, "affiliations");
});
// Queue vizualisation
var queueUrl = "getCouchDbData.php?db=projects&design=genomics-dashboard&view=dates_and_load_per_sample&reduce=false";
d3.json(queueUrl, function(sample_json) {
//Generate data sets
var sampleQueue = generateQueueSampleStackDataset(sample_json, today);
var finlibLaneQueue = generateQueueLaneFLStackDataset(sample_json, today);
//Set the 'normal' max values for the different load visualizations
var queueLpSampleLoadNormalMax = 200; //# samples in queue for libprep
var queueFlLaneLoadNormalMax = 30; //# lanes of finished libraries in queue for sequencing
var plot_width = 600;
var bar_width = plot_width / 8;
var panelHeights = 250;
drawStackedBars (sampleQueue, "queue_sample_load_lp", bar_width * 4, panelHeights, "samples", true, queueLpSampleLoadNormalMax, true);
drawStackedBars (finlibLaneQueue, "queue_lane_load_fl", bar_width * 2, panelHeights, "lanes", false, queueFlLaneLoadNormalMax, false);
//console.log(sampleQueue);
});
</script>
</body>
</html>