-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathperformance.html
More file actions
680 lines (623 loc) · 26.6 KB
/
performance.html
File metadata and controls
680 lines (623 loc) · 26.6 KB
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
<!DOCTYPE HTML>
<html>
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-179525394-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-179525394-1');
</script>
<link rel="apple-touch-icon" sizes="180x180" href="images/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="images/favicon-16x16.png">
<link rel="manifest" href="images/site.webmanifest">
<title>Seq • Performance</title>
<style type="text/css" media="screen">
.chart-container {
float: left;
width: 75%;
height: 480px;
padding: 5px 5px 5px 5px;
margin-bottom: 40px;
}
.chart-info {
text-align: left;
float: left;
width: 25%;
height: 480px;
padding: 100px 5px 5px 5px;
margin-bottom: 40px;
overflow: auto;
}
@media screen and (max-width: 800px) {
.chart-container {
float: none;
width: 80%;
padding: 0px 0px 0px 0px;
margin: 0 auto;
margin-bottom: 40px;
}
.chart-info {
float: none;
height: auto;
width: 80%;
padding: 0px 0px 0px 0px;
margin: 0 auto;
margin-bottom: 0px;
}
}
.chart-pane {
}
button.gotosource {
-moz-appearance: none;
-webkit-appearance: none;
-ms-appearance: none;
appearance: none;
-moz-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
-webkit-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
-ms-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
background-color: transparent;
box-shadow: inset 0 0 0 3px #ffffff;
color: #000000 !important;
border-radius: 15px;
border: 0;
cursor: pointer;
display: inline-block;
font-size: .75em;
font-weight: 400;
height: 3.75em;
line-height: 3em;
letter-spacing: 2px;
padding: 0 2em;
text-align: center;
text-decoration: none;
text-transform: uppercase;
white-space: nowrap;
}
button.gotosource:hover {
background-color: #e6e6e6;
}
div.sourcebutton {
text-align: center;
}
div.info {
width: 80%;
margin: 0 auto;
}
</style>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="assets/css/main.css" />
</head>
<body class="subpage">
<!-- Header -->
<header id="header">
<div class="inner">
<a href="index.html" class="logo">the <strong>Seq</strong> programming language</a>
<nav id="nav">
<div class="navitem" onclick="window.location.href='https://docs.seq-lang.org'">Docs</div>
<div class="navitem" onclick="window.location.href='https://github.com/seq-lang/seq'">GitHub</div>
<div class="navitem" onclick="window.location.href='demo.html?code='">Demo</div>
</nav>
<a href="#navPanel" class="navPanelToggle"><span class="fa fa-bars"></span></a>
</div>
</header>
<!-- Main -->
<section id="main" class="wrapper">
<div class="inner">
<div class="image round">
<img src="images/dragon.png" width="175" height="175" style="padding: 10px" alt="LLVM dragon" />
</div>
<header class="align-center">
<h2>Performance</h2>
</header>
<div class="info">
Unlike CPython, Seq compiles to LLVM IR, which in turn compiles to native machine code. Because of this,
Seq's performance is usually comparable to that of C or C++, and can often be even <i>better</i> once
domain-specific compiler optimizations are applied. The Seq compiler performs static type checking, which
avoids the cost of checking types at runtime that most other Python implementations incur.
<br /><br />
Below are several real-world benchmarks showing Seq's performance compared to hand-optimized tools.
</div>
<hr />
<div class="chart-pane">
<div class="chart-info">
<a href="https://en.wikipedia.org/wiki/Smith–Waterman_algorithm">Smith-Waterman alignment</a> is a standard algorithm
used in many genomics applications. This benchmark consists of aligning sequences as part of long-read mapping, and
compares Seq with <a href="https://github.com/lh3/minimap2">minimap2</a>. The Seq implementation makes use of the
compiler's inter-sequence alignment optimization to attain better performance.
<br />
<div class="sourcebutton">
<button class="gotosource" onclick="location.href='https://github.com/seq-lang/seq/blob/develop/test/apps/minimap2/sw.seq'">
<i class="fab fa-github"></i> View Source
</button>
</div>
</div>
<div class="chart-container">
<canvas id="swChart"></canvas>
</div>
</div>
<div class="chart-pane">
<div class="chart-info">
Global alignment is an important algorithm in comparative genomics and related fields. This benchmark implements
the popular <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC430967/">AVID</a> global alignment tool in Seq and
compares its performance with the original.
<br />
<div class="sourcebutton">
<button class="gotosource" onclick="location.href='https://github.com/seq-lang/seq/blob/develop/test/apps/avid/avid.seq'">
<i class="fab fa-github"></i> View Source
</button>
</div>
</div>
<div class="chart-container">
<canvas id="gaChart"></canvas>
</div>
</div>
<div class="chart-pane">
<div class="chart-info">
<a href="https://github.com/denizy/cora">CORA</a> is an all-mapping tool for WGS short-reads
that exploits redundancies in the genome to find all mappings of a read. This benchmark implements CORA's index
("homology table") construction step in Seq.
<br />
<div class="sourcebutton">
<button class="gotosource" onclick="location.href='https://github.com/seq-lang/seq/blob/develop/test/apps/cora'">
<i class="fab fa-github"></i> View Source
</button>
</div>
</div>
<div class="chart-container">
<canvas id="htChart"></canvas>
</div>
</div>
<div class="chart-pane">
<div class="chart-info">
<a href="https://github.com/sfu-compbio/mrsfast">mrsFAST</a> is a perfect-sensitivity all-mapping tool based on Hamming
distance. This benchmark implements mrsFAST's single-end read mapping algorithm in Seq (chr1 results), as well as an
alternative version using an FM-index with Seq's prefetch optimization (hg19 results).
<br />
<div class="sourcebutton">
<button class="gotosource" onclick="location.href='https://github.com/seq-lang/seq/blob/develop/test/apps/mrsfast'">
<i class="fab fa-github"></i> View Source
</button>
</div>
</div>
<div class="chart-container">
<canvas id="mfChart"></canvas>
</div>
</div>
<div class="chart-pane">
<div class="chart-info">
Data preprocessing has become an increasingly time-consuming step in the genomics analysis pipeline. This benchmark
implements in Seq a standard preprocessing task,
<a href="https://gatk.broadinstitute.org/hc/en-us/articles/360036858811-SplitNCigarReads">GATK's <i>SplitNCigarReads</i></a>,
and compares performance on several datasets.
<br />
<div class="sourcebutton">
<button class="gotosource" onclick="location.href='https://github.com/seq-lang/seq/blob/develop/test/apps/gatk-splitncigar/gatk-split.seq'">
<i class="fab fa-github"></i> View Source
</button>
</div>
</div>
<div class="chart-container">
<canvas id="rnChart"></canvas>
</div>
</div>
<div class="chart-pane">
<div class="chart-info">
"Super-Maximal Exact Matches" (SMEMs) are a central component of many genomics algorithms, ranging from alignment to
assembly. This benchmark implements <a href="https://github.com/lh3/bwa">BWA-MEM</a>'s SMEM algorithm in Seq. Seq's
prefetch optimization leads to better performance.
<br />
<div class="sourcebutton">
<button class="gotosource" onclick="location.href='https://github.com/seq-lang/seq/blob/develop/test/apps/bwa/fastmap.seq'">
<i class="fab fa-github"></i> View Source
</button>
</div>
</div>
<div class="chart-container">
<canvas id="smChart"></canvas>
</div>
</div>
<div class="chart-pane">
<div class="chart-info">
<a href="https://en.wikipedia.org/wiki/Haplotype_estimation">Haplotype phasing</a> is a downstream analysis that can
provide numerous biological insights beyond raw genotypes alone.
<a href="https://www.nature.com/articles/s41467-020-18320-z">HapTree-X</a> is a phasing algorithm implemented entirely
in Seq, whose performance is benchmarked here relative to several widely-used phasing tools.
<br />
<div class="sourcebutton">
<button class="gotosource" onclick="location.href='https://github.com/0xTCG/haptreex'">
<i class="fab fa-github"></i> View Source
</button>
</div>
</div>
<div class="chart-container">
<canvas id="phChart"></canvas>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer id="footer">
<div class="inner">
<div class="copyright">
© 2020 <a href="https://github.com/seq-lang">seq-lang</a>. All Rights Reserved. Design: <a href="https://templated.co">TEMPLATED</a>
</div>
</div>
</footer>
<!-- Scripts -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/skel.min.js"></script>
<script src="assets/js/util.js"></script>
<script src="assets/js/main.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.8.0"></script>
<script type="text/javascript">
var ctx1 = document.getElementById("swChart").getContext("2d");
var data1 = {
labels: ["CIGAR (all)", "No CIGAR (all)", "CIGAR (lim. 512)", "No CIGAR (lim. 512)"],
datasets: [{
label: "minimap2 (SSE4)",
backgroundColor: "#e41a1c",
data: [2123.68, 1767.34, 1048.09, 904.754]
}, {
label: "Seq inter opt. (SSE4)",
backgroundColor: "#377eb8",
data: [1739.41, 1336.05, 811.323, 508.88]
}, {
label: "Seq inter opt. (AVX2)",
backgroundColor: "#4daf4a",
data: [1396.44, 1111.68, 474.595, 293.146]
}, {
label: "Seq inter opt. (AVX-512)",
backgroundColor: "#984ea3",
data: [1292.34, 1054.25, 330.616, 199.285]
}]
};
var chart1 = new Chart(ctx1, {
type: 'bar',
data: data1,
options: {
responsive: true,
maintainAspectRatio: false,
title: {
display: true,
text: 'Smith-Waterman alignment',
fontSize: 25
},
barValueSpacing: 20,
scales: {
yAxes: [{
ticks: {
min: 0,
},
scaleLabel: {
display: true,
labelString: 'Runtime (s)',
fontSize: 15
}
}],
xAxes: [{
ticks: {
fontSize: 15
}
}]
},
legend: {
display: true,
labels: {
fontSize: 15
}
}
}
});
var ctx2 = document.getElementById("gaChart").getContext("2d");
var data2 = {
labels: ["90% similarity", "70% similarity"],
datasets: [{
label: "AVID",
backgroundColor: "#e41a1c",
data: [2717.09, 2635.30]
}, {
label: "Seq",
backgroundColor: "#377eb8",
data: [2036.13, 1919.51]
}]
};
var chart2 = new Chart(ctx2, {
type: 'bar',
data: data2,
options: {
responsive: true,
maintainAspectRatio: false,
title: {
display: true,
text: 'Global alignment',
fontSize: 25
},
barValueSpacing: 20,
scales: {
yAxes: [{
ticks: {
min: 0,
},
scaleLabel: {
display: true,
labelString: 'Runtime (s)',
fontSize: 15
}
}],
xAxes: [{
ticks: {
fontSize: 15
}
}]
},
legend: {
display: true,
labels: {
fontSize: 15
}
}
}
});
var ctx3 = document.getElementById("htChart").getContext("2d");
var data3 = {
labels: ["Exact", "Inexact (48 threads)"],
datasets: [{
label: "CORA",
backgroundColor: "#e41a1c",
data: [8112.0, 63720.0]
}, {
label: "Seq",
backgroundColor: "#377eb8",
data: [1260.0, 13212.0]
}]
};
var chart3 = new Chart(ctx3, {
type: 'bar',
data: data3,
options: {
responsive: true,
maintainAspectRatio: false,
title: {
display: true,
text: 'Homology table construction',
fontSize: 25
},
barValueSpacing: 20,
scales: {
yAxes: [{
ticks: {
min: 0,
},
scaleLabel: {
display: true,
labelString: 'Runtime (s)',
fontSize: 15
}
}],
xAxes: [{
ticks: {
fontSize: 15
}
}]
},
legend: {
display: true,
labels: {
fontSize: 15
}
}
}
});
var ctx4 = document.getElementById("mfChart").getContext("2d");
var data4 = {
labels: ["chr1, thresh. 2", "hg19, thresh. 0"],
datasets: [{
label: "mrsFAST",
backgroundColor: "#e41a1c",
data: [978.8, 4044.0]
}, {
label: "Seq",
backgroundColor: "#377eb8",
data: [677.3, 1310.2]
}]
};
var chart4 = new Chart(ctx4, {
type: 'bar',
data: data4,
options: {
responsive: true,
maintainAspectRatio: false,
title: {
display: true,
text: 'Hamming distance-based all-mapping',
fontSize: 25
},
barValueSpacing: 20,
scales: {
yAxes: [{
ticks: {
min: 0,
},
scaleLabel: {
display: true,
labelString: 'Runtime (s)',
fontSize: 15
}
}],
xAxes: [{
ticks: {
fontSize: 15
}
}]
},
legend: {
display: true,
labels: {
fontSize: 15
}
}
}
});
var ctx5 = document.getElementById("rnChart").getContext("2d");
var data5 = {
labels: ["Cytosol", "Whole cell", "GIAB", "K562"],
datasets: [{
label: "GATK",
backgroundColor: "#e41a1c",
data: [60889.56, 54662.98, 10946.02, 33288.27]
}, {
label: "Seq",
backgroundColor: "#377eb8",
data: [5925.54, 8600.10, 1164.69, 3796.61]
}]
};
var chart5 = new Chart(ctx5, {
type: 'bar',
data: data5,
options: {
responsive: true,
maintainAspectRatio: false,
title: {
display: true,
text: 'RNA-seq read preprocessing',
fontSize: 25
},
barValueSpacing: 20,
scales: {
yAxes: [{
ticks: {
min: 0,
},
scaleLabel: {
display: true,
labelString: 'Runtime (s)',
fontSize: 15
}
}],
xAxes: [{
ticks: {
fontSize: 15
}
}]
},
legend: {
display: true,
labels: {
fontSize: 15
}
}
}
});
var ctx6 = document.getElementById("smChart").getContext("2d");
var data6 = {
labels: ["BWA-MEM", "Seq", "Seq (prefetch)"],
datasets: [{
label: "Runtime",
backgroundColor: "#e41a1c",
data: [62.19, 50.53, 28.83]
}]
};
var chart6 = new Chart(ctx6, {
type: 'bar',
data: data6,
options: {
responsive: true,
maintainAspectRatio: false,
title: {
display: true,
text: 'Finding SMEMs',
fontSize: 25
},
barValueSpacing: 20,
scales: {
yAxes: [{
ticks: {
min: 0,
},
scaleLabel: {
display: true,
labelString: 'Runtime (s)',
fontSize: 15
}
}],
xAxes: [{
ticks: {
fontSize: 15
}
}]
},
legend: {
display: false,
labels: {
fontSize: 15
}
}
}
});
var ctx7 = document.getElementById("phChart").getContext("2d");
var data7 = {
labels: ["RNA-seq", "WXS", "WGS", "10X"],
datasets: [{
label: "HapCUT",
backgroundColor: "#e41a1c",
data: [183.0, 1546.0, null, null]
}, {
label: "phASER",
backgroundColor: "#377eb8",
data: [68.0, 1463.0, null, null]
}, {
label: "HapCUT2",
backgroundColor: "#4daf4a",
data: [90.0, 777.0, 6481.0, 83405.0]
}, {
label: "HapTree-X (Seq)",
backgroundColor: "#984ea3",
data: [54.0, 539.0, 2417.0, 6845.0]
}]
};
var chart7 = new Chart(ctx7, {
type: 'bar',
data: data7,
options: {
responsive: true,
maintainAspectRatio: false,
title: {
display: true,
text: 'Haplotype phasing (log scale)',
fontSize: 25
},
barValueSpacing: 20,
scales: {
yAxes: [{
type: 'logarithmic',
ticks: {
min: 0,
},
scaleLabel: {
display: true,
labelString: 'Runtime (s)',
fontSize: 15
}
}],
xAxes: [{
ticks: {
fontSize: 15
}
}]
},
legend: {
display: true,
labels: {
fontSize: 15
}
}
}
});
</script>
</body>
</html>