-
Notifications
You must be signed in to change notification settings - Fork 0
/
analysis.Rmd
1324 lines (1162 loc) · 56.9 KB
/
analysis.Rmd
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
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
---
title: "HG002 PacBio CCS Small Variants"
author: "Nate Olson"
date: '`r Sys.Date()`'
output:
bookdown::html_document2:
toc: true
toc_float: true
df_print: paged
code_folding: hide
---
```{r load_packages, message = FALSE, echo = FALSE}
library(VariantAnnotation)
library(BSgenome.Hsapiens.1000genomes.hs37d5)
library(happyR)
library(tidyverse)
library(googlesheets)
```
# Background
* Analysis of small variant callsets generated from PacBio CCS data.
* The long read - low error rate data can potentially correct mistakes in and expand the HG002 benchmark set.
* datasets - PacBio CCS 15kb libraries for HG002
* variant callsets
* Five SNV+indel callsets:
* GATK4,
* DeepVariant,
* DeepVariant trained using with haplotype information, along with
* GATK4 re-genotyped with WhatsHap,
* DeepVariant re-genotyped with WhatsHap.
* Variant calls were made against the GRCh37 reference.
* benchmarking - Callsets benchmarked against the HG002 V3.3.2 benchmark callset using the precisionFDA app, vcfeval + hap.py with GA4GH custom stratifications.
# Analysis Overview
1. Variant caller performance against NIST HG002 v3.3.2
1. Benchmark expansion estimate.
1. Identification of potential mistakes in current benchmark
1. Errors in the CCS calls
# Approach/ Methods
## Benchmarking
- Stratified comparison to NIST HG002 small variant benchmark v3.3.2.
- Summarize overall performance
- Identify where callsets perform well and poorly
- Haplotype and re-genotype utility
## Manual Curation
A number of false positive and negative sites were randomly sampled to further evaluate the potential for using CCS callsets to correct errors in benchmark sets.
A total of 60 variants were randomly sampled for manual curation.
- 5 from each set
- FP and FN
- SNP and Indels
- Target categories and other categories
Along with 5 SNP and 5 Indel FP allele match errors.
Target categories - lowcmp_AllRepeats_gt95identity_slop5 and lowcmp_SimpleRepeat_imperfecthomopolymer_gt10_slop5
Target categories defined to include most homopolymers as based on our preliminary analysis these were the largest source of errors in the variant callsets.
## Benchmark Region Expansion Estimate
_Estimating number of how many extra variants and regions CCS might help add to the GIAB benchmark._
<!-- TODO - describe method used to calculate region and variant number -->
Used CallableLoci - see `scripts/ccs_callableLoci.sh`
Subtracted stratifications for homopolymers and excluding HG002 SVs and segmental duplications (superdups) then compare to benchmark regions - see `scripts/calc_extend_bench.sh`.
Calculate (non-N) genome coverage for resulting regions.
This estimate represents an upper limit for what how much we expect the CCS data to expand the current benchmark regions.
## Errors in NIST HG002 v3.3.2
Example LINE (IGV screenshot) and an estimate of total count.
## Loading and Tidying Data
### Benchmarking
```{r message = FALSE}
## Loading data
hap_list <- list(
GATK4 = "data/happy_output/results/result_1",
DeepVar = "data/happy_output/results/result_2",
DeepVarHap = "data/happy_output_deepVarHap/results/result_1",
GATK4_retyped = "data/happy_output_jebler_retyped/results/result_1",
DeepVar_retyped = "data/happy_output_jebler_retyped/results/result_2") %>%
map(read_happy)
## Creating a tidy data frame
extend_df <- hap_list %>%
map("extended") %>%
bind_rows(.id = "query_method")
ext_trim_df <- extend_df %>%
## Excluding non-HG002 genome specific stratifications
filter(!str_detect(Subset, "HG00[1,3,4,5]")) %>%
## excluding strat with < 1000 obs - lack of statistical power
filter(Subset.Size > 1000) %>%
## Subset must have at least one variant in region
filter(Subset.IS_CONF.Size > 0)
```
# Results for Manuscript
## Small Variant Detection
### Table 1 - High level metrics by callset
```{r}
benchmark_metrics_tbl <- ext_trim_df %>%
filter(Subtype == "*") %>%
filter(Subset %in% "*") %>%
filter(Filter == "PASS") %>%
rename(Callset = query_method,
Recall = METRIC.Recall,
Precision = METRIC.Precision,
F1 = METRIC.F1_Score) %>%
dplyr::select(Callset, Type, Recall, Precision, F1) %>%
arrange(Type, -F1)
```
```{r}
write_csv(benchmark_metrics_tbl, "results/benchmark_metrics_tbl.csv")
```
Metrics for high level comparison
```{r}
benchmark_metrics_tbl
```
```{r benchSummary, fig.cap = "Benchmarking performance metrics for CCS variant callsets for HG002 benchmark regions, Diff- all difficult regions, and Not Diff - not in difficult regions."}
## Do we have all difficult regions not in HG002allgenomespecific
high_level_strat <- c("*",
"alldifficultregions",
"notinalldifficultregions")
bench_overview_df <- ext_trim_df %>%
filter(Subtype == "*") %>%
filter(Filter == "PASS") %>%
filter(Subset %in% high_level_strat) %>%
dplyr::select(Type, Subset, query_method, contains("METRIC"), Subset.Size) %>%
gather("Metric","Value", -Type, -Subset,
-query_method, -Subset.Size) %>%
mutate(Metric = str_remove(Metric, "METRIC.")) %>%
mutate(Metric = if_else(Metric != "Frac_NA", paste("1 -", Metric), Metric),
Value = if_else(Metric != "Frac_NA", 1 - Value, Value)) %>%
filter(Metric != "Frac_NA") %>%
mutate(Subset = fct_recode(Subset, "All" = "*",
"Diff" = "alldifficultregions",
"Not Diff" = "notinalldifficultregions"))
bench_overview_df %>%
ggplot(aes(x = Subset, y = Value,
fill = query_method, group=query_method)) +
geom_linerange(aes(ymin = 0.00001, ymax = Value),
position=position_dodge(width=0.5)) +
geom_point(shape = 21, color = "grey40", position=position_dodge(width=0.5)) +
scale_y_log10() +
facet_grid(Type~Metric, scales = "free") +
theme_bw() +
theme(legend.position = "bottom") +
annotation_logticks(sides = "l") +
labs(fill = "Callset")
```
```{r}
ggsave("results/benchmark_highlevel_strats.png",
dpi = 600,width = 6, height = 3)
```
### Indel Stratification
__TODO__
* Stratification indel numbers for homopolymers > 2bp - JZ will provide code and input files for analysis
- for use in estimating the percentage of discordant indels in homopolymer runs
### Supplemental Figure R4-1 - Key Stratification Results
* Add text with benchmark stratification results (1 - 2 sentences)
* Supplemental Figure R4-1: Key stratification results including overview and homopolymers
Overall high precision and recall for SNPs, and indels not in difficult regions.
```{r fig.cap = "Performance metrics stratification results."}
stratifications <- c("*",
"alldifficultregions",
"lowcmp_AllRepeats_gt95identity_slop5",
"lowcmp_SimpleRepeat_imperfecthomopolymer_gt10_slop5",
# "lowcmp_SimpleRepeat_homopolymer_6to10",
# "lowcmp_SimpleRepeat_homopolymer_gt10",
# "map_l250_m0_e0",
"notinalldifficultregions",
"notinlowcmp_AllRepeats_gt95identity_slop5")
bench_strat_df <- ext_trim_df %>%
filter(Subtype == "*", query_method == "DeepVar") %>%
filter(Filter == "PASS") %>%
filter(Subset %in% stratifications) %>%
dplyr::select(Type, Subset, query_method,
contains("METRIC"), Subset.Size) %>%
gather("Metric","Value", -Type, -Subset,
-query_method, -Subset.Size) %>%
mutate(Metric = str_remove(Metric, "METRIC.")) %>%
mutate(Metric = if_else(Metric != "Frac_NA",
paste("1 -", Metric), Metric),
Value = if_else(Metric != "Frac_NA",
1 - Value, Value)) %>%
filter(Metric != "Frac_NA") %>%
## Relevel factors
mutate(Subset = fct_recode(Subset,
"All" = "*",
"Diff" = "alldifficultregions",
"Not Diff" = "notinalldifficultregions",
"All Reps." = "lowcmp_AllRepeats_gt95identity_slop5",
"Not All Reps." = "notinlowcmp_AllRepeats_gt95identity_slop5",
"Imp. Homopolymer" = "lowcmp_SimpleRepeat_imperfecthomopolymer_gt10_slop5" #,
# "Homopolymer 6 - 10 bp" = "lowcmp_SimpleRepeat_homopolymer_6to10",
# "Homopolymer >10 bp" = "lowcmp_SimpleRepeat_homopolymer_gt10",
# "Map 250" = "map_l250_m0_e0"
)
)
bench_strat_df %>%
ggplot(aes(x = Subset, y = Value,
fill = Subset,
group=query_method)) +
geom_linerange(aes(ymin = 0.000025, ymax = Value),
position=position_dodge(width=0.5)) +
geom_point(shape = 21, color = "grey20", position=position_dodge(width=0.5)) +
scale_y_log10() +
scale_fill_brewer(type = "qual", palette = 2) +
facet_grid(Type~Metric, scales = "free") +
theme_bw() +
theme(legend.position = "bottom",
# axis.text.x = element_text(angle = -45, hjust = 0)
axis.text.x = element_blank(),
axis.title.x = element_blank()) +
annotation_logticks(sides = "l") +
labs(fill = "Stratifications")
```
```{r}
ggsave("results/benchmark_strats.png",
dpi = 600,width = 8, height = 4)
```
Based on stratified analysis of the benchmarking results variant caller accuracy was poor for low complexity repeats with greater than 95% similarity (including homopolymers and tandem repeats). Variant caller performance was similar for indels when excluding low complexity repeats with > 95% similarity to when excluding all difficult regions indicating that this stratification is responsible for most of the discrepancies between the HG002 v3.3.2 benchmark callset and the CCS callsets.
```{r fig.cap = "Performance in homopolymers."}
ext_trim_df %>%
filter(Subtype == "*", Filter == "PASS", query_method == "DeepVar") %>%
filter(str_detect(Subset,"homopolymer")) %>%
filter(!str_detect(Subset,"_unit")) %>%
filter(Subset.IS_CONF.Size > 0) %>%
mutate(Subset = str_remove(Subset, "lowcmp_SimpleRepeat_")) %>%
mutate(Subset = str_remove(Subset, "_slop5")) %>%
mutate(Subset = str_replace(Subset, "_", " ")) %>%
mutate(Subset = str_replace(Subset, "to", " to ")) %>%
mutate(Subset = str_replace(Subset, "gt", ">")) %>%
dplyr::select(Type, Subset, query_method, contains("METRIC"), Subset.Size) %>%
gather("Metric","Value", -Type, -Subset,
-query_method, -Subset.Size) %>%
mutate(Metric = str_remove(Metric, "METRIC.")) %>%
mutate(Metric = if_else(Metric != "Frac_NA", paste("1 -", Metric), Metric),
Value = if_else(Metric != "Frac_NA", 1 - Value, Value)) %>%
filter(Metric != "Frac_NA") %>%
ggplot() + geom_bar(aes(x = query_method, y = Value, fill = Subset),
color = "grey40", width = 0.5,
position = "dodge", stat = "identity") +
facet_grid(Type~Metric, scales = "free") +
theme_bw() +
theme(legend.position = "bottom",axis.text.x = element_text(angle = -45, hjust = 0)) +
labs(x = "Simple Repeat Type", fill = "Homopolymer Type")
```
```{r fig.cap = "Benchmarking metrics for TRDB." }
ext_trim_df %>%
filter(Subtype == "*", query_method == "DeepVar") %>%
filter(Filter == "PASS") %>%
filter(str_detect(Subset,"Human_Full_Genome"),
!str_detect(Subset,"unit")) %>%
filter(Subset.IS_CONF.Size > 0) %>%
mutate(Subset = str_remove(Subset, "lowcmp_Human_Full_Genome_TRDB_hg19_150331_")) %>%
mutate(Subset = str_remove(Subset, "_gt95identity_merged")) %>%
mutate(Subset = str_replace(Subset, "_", " ")) %>%
mutate(Subset = str_replace(Subset, "to", " to ")) %>%
mutate(Subset = str_replace(Subset, "lt", " <")) %>%
mutate(Subset = str_replace(Subset, "gt", " >")) %>%
dplyr::select(Type, Subset, query_method, contains("METRIC"), Subset.Size) %>%
gather("Metric","Value", -Type, -Subset,
-query_method, -Subset.Size) %>%
mutate(Metric = str_remove(Metric, "METRIC.")) %>%
mutate(Metric = if_else(Metric != "Frac_NA", paste("1 -", Metric), Metric),
Value = if_else(Metric != "Frac_NA", 1 - Value, Value)) %>%
filter(Metric != "Frac_NA") %>%
ggplot() + geom_bar(aes(x = Subset, y = Value, fill = query_method),
color = "grey40", width = 0.5,
position = "dodge", stat = "identity") +
facet_grid(Type~Metric, scales = "free") +
theme_bw() +
theme(axis.text.x = element_text(angle = -90)) +
labs(x = "Tandem Repeat Type", fill = "Callset")
```
## Improving Small Variant Detection with Haplotype Phasing
Impact of re-genotyping on benchmarking results (Table 1, Supplemental Fig R6-1)
```{r whatHapEff, fig.cap = "Impact of re-genotyping using WhatsHap on GATK4 and DeepVariant callset benchmark metrics. Diff- all difficult regions, and Not Diff - not in difficult regions."}
## Do we have all difficult regions not in HG002allgenomespecific
high_level_strat <- c("*",
"alldifficultregions",
"notinalldifficultregions")
bench_overview_df <- ext_trim_df %>%
filter(Subtype == "*", query_method %in% c("GATK4","DeepVar", "GATK4_retyped","DeepVar_retyped")) %>%
filter(Filter == "PASS") %>%
filter(Subset %in% high_level_strat) %>%
dplyr::select(Type, Subset, query_method, contains("METRIC"), Subset.Size) %>%
gather("Metric","Value", -Type, -Subset,
-query_method, -Subset.Size) %>%
mutate(Metric = str_remove(Metric, "METRIC.")) %>%
mutate(Metric = if_else(Metric != "Frac_NA", paste("1 -", Metric), Metric),
Value = if_else(Metric != "Frac_NA", 1 - Value, Value)) %>%
filter(Metric != "Frac_NA") %>%
mutate(Subset = fct_recode(Subset, "All" = "*",
"Diff" = "alldifficultregions",
"Not Diff" = "notinalldifficultregions"))
bench_overview_df %>%
ggplot() + geom_col(aes(x = Subset, y = Value, fill = query_method),
color = "grey40", width = 0.5,
position = "dodge") +
scale_y_log10() +
facet_grid(Type~Metric, scales = "free") +
theme_bw() +
theme(legend.position = "bottom") +
labs(fill = "Callset")
```
## Revising and expanding GIAB
# Initial Analysis
```{r, fig.cap = "Precision v. recall for a subset of the stratifications.", eval = FALSE}
strat_of_interest <- c("*","HG002allgenomespecific",
"HG002allgenomespecificandifficult",
"alldifficultregions","decoy",
"lowcmp_AllRepeats_51to200bp_gt95identity_merged_slop5",
"lowcmp_AllRepeats_gt200bp_gt95identity_merged_slop5",
"lowcmp_AllRepeats_gt95identity_slop5",
"lowcmp_AllRepeats_lt51bpTRs_gt95identity_merged_slop5",
"lowcmp_AllRepeats_lt51bp_gt95identity_merged_slop5",
"lowcmp_SimpleRepeat_homopolymer_6to10",
"lowcmp_SimpleRepeat_homopolymer_gt10",
"lowcmp_SimpleRepeat_imperfecthomopolymer_gt10_slop5",
"map_all","map_l250_m0_e0",
"notinHG002allgenomespecificandifficult",
"notinalldifficultregions",
"notinlowcmp_AllRepeats_gt95identity_slop5","segdup")
gg <- ext_trim_df %>%
filter(Type == "INDEL", Subtype == "*", Filter == "PASS") %>%
filter(Subset %in% strat_of_interest) %>%
ggplot() +
geom_point(aes(x = METRIC.Recall,
y = METRIC.Precision,
alpha = log10(Subset.Size),
text = Subset),
shape = 19, stroke = 0.25) +
facet_wrap(~query_method) +
theme_bw() +
labs(x = "Recall", y = "Precision")
plotly::ggplotly(gg)
```
```{r eval = FALSE}
gg <- ext_trim_df %>%
filter(Type == "SNP", Subtype == "*", Filter == "PASS") %>%
filter(Subset %in% strat_of_interest) %>%
ggplot() +
geom_point(aes(x = METRIC.Recall,
y = METRIC.Precision,
alpha = log10(Subset.Size),
text = Subset),
shape = 19, stroke = 0.25) +
facet_wrap(~query_method) +
theme_bw() +
labs(x = "Recall", y = "Precision")
plotly::ggplotly(gg)
```
```{r eval = FALSE}
ext_trim_df %>%
filter(Subtype == "*", Filter == "PASS") %>%
filter(Subset %in% strat_of_interest) %>%
dplyr::select(query_method, Type, Subset, contains("METRIC")) %>%
DT::datatable(caption = "The three query methods (variant callsets) performance metrics for high level stratifications and stratifications with know poor performance, e.g. homopolymers.")
```
```{r eval = FALSE}
ext_trim_df %>%
filter(Type == "INDEL", Filter == "PASS") %>%
filter(Subset %in% strat_of_interest) %>%
filter(TRUTH.TOTAL > 0)%>%
dplyr::select(query_method, Type, Subtype,Subset, contains("METRIC"), TRUTH.TOTAL) %>%
DT::datatable()
```
<!--
__TODO__ Additional figure showing stratifications where the methods perform well and poorly
- stratifications with low recall and precision
-->
Performance metrics are consistent across homopolymer units for homopolymers between 6 and 10 bp but but varies for homopolymers greater than 10 bp.
<!--
TODO - Only show for DeepVar Hap, add metrics for `*` and difficultregions
-->
```{r fig.cap = "Performance in homopolymers."}
ext_trim_df %>%
filter(Subtype == "*") %>%
filter(Filter == "PASS") %>%
filter(str_detect(Subset,"homopolymer")) %>%
filter(!str_detect(Subset,"_unit")) %>%
filter(Subset.IS_CONF.Size > 0) %>%
mutate(Subset = str_remove(Subset, "lowcmp_SimpleRepeat_")) %>%
mutate(Subset = str_remove(Subset, "_slop5")) %>%
mutate(Subset = str_replace(Subset, "_", " ")) %>%
mutate(Subset = str_replace(Subset, "to", " to ")) %>%
mutate(Subset = str_replace(Subset, "gt", ">")) %>%
dplyr::select(Type, Subset, query_method, contains("METRIC"), Subset.Size) %>%
gather("Metric","Value", -Type, -Subset,
-query_method, -Subset.Size) %>%
mutate(Metric = str_remove(Metric, "METRIC.")) %>%
mutate(Metric = if_else(Metric != "Frac_NA", paste("1 -", Metric), Metric),
Value = if_else(Metric != "Frac_NA", 1 - Value, Value)) %>%
filter(Metric != "Frac_NA") %>%
ggplot() + geom_bar(aes(x = query_method, y = Value, fill = Subset),
color = "grey40", width = 0.5,
position = "dodge", stat = "identity") +
facet_grid(Type~Metric, scales = "free") +
theme_bw() +
theme(legend.position = "bottom",axis.text.x = element_text(angle = -45, hjust = 0)) +
labs(x = "Simple Repeat Type", fill = "Homopolymer Type")
```
Performance varies by homopolymer unit.
Similar performance is expected for A and T as observed.
For G and C similar performance is not observed, inconsistent with expectation.
```{r fig.cap = "DeepVariant performance metrics for homopolymers by unit.", eval = FALSE}
ext_trim_df %>%
filter(Subtype == "*") %>%
filter(Filter == "PASS") %>%
filter(str_detect(Subset,"homopolymer")) %>%
filter(str_detect(Subset,"_unit")) %>%
filter(Subset.IS_CONF.Size > 0) %>%
mutate(Subset = str_remove(Subset, "lowcmp_SimpleRepeat_")) %>%
mutate(Subset = str_remove(Subset, "_slop5")) %>%
mutate(Subset = str_replace(Subset, "_", " ")) %>%
mutate(Subset = str_replace(Subset, "to", " to ")) %>%
mutate(Subset = str_replace(Subset, "gt", ">")) %>%
dplyr::select(Type, Subset, query_method, contains("METRIC"), Subset.Size) %>%
gather("Metric","Value", -Type, -Subset,
-query_method, -Subset.Size) %>%
separate(Subset, c("Size", "Unit"), sep = "_") %>%
mutate(Unit = str_remove(Unit, "unit=")) %>%
mutate(Size = str_remove(Size, "homopolymer ")) %>%
mutate(Metric = str_remove(Metric, "METRIC.")) %>%
mutate(Metric = if_else(Metric != "Frac_NA", paste("1 -", Metric), Metric),
Value = if_else(Metric != "Frac_NA", 1 - Value, Value)) %>%
filter(Metric != "Frac_NA") %>%
filter(query_method == "DeepVar") %>%
ggplot() + geom_bar(aes(x = Size, y = Value, fill = Unit),
color = "grey40", width = 0.5,
position = "dodge", stat = "identity") +
facet_grid(Type~Metric, scales = "free") +
theme_bw() +
theme(legend.position = "bottom") +
labs(x = "Simple Repeat Type", fill = "Callset")
```
```{r fig.cap = "DeepVariant with haplotype informaton performance metrics for homopolymers by unit."}
ext_trim_df %>%
filter(Subtype == "*") %>%
filter(Filter == "PASS") %>%
filter(str_detect(Subset,"homopolymer")) %>%
filter(str_detect(Subset,"_unit")) %>%
filter(Subset.IS_CONF.Size > 0) %>%
mutate(Subset = str_remove(Subset, "lowcmp_SimpleRepeat_")) %>%
mutate(Subset = str_remove(Subset, "_slop5")) %>%
mutate(Subset = str_replace(Subset, "_", " ")) %>%
mutate(Subset = str_replace(Subset, "to", " to ")) %>%
mutate(Subset = str_replace(Subset, "gt", ">")) %>%
dplyr::select(Type, Subset, query_method, contains("METRIC"), Subset.Size) %>%
gather("Metric","Value", -Type, -Subset,
-query_method, -Subset.Size) %>%
separate(Subset, c("Size", "Unit"), sep = "_") %>%
mutate(Unit = str_remove(Unit, "unit=")) %>%
mutate(Size = str_remove(Size, "homopolymer ")) %>%
mutate(Metric = str_remove(Metric, "METRIC.")) %>%
mutate(Metric = if_else(Metric != "Frac_NA", paste("1 -", Metric), Metric),
Value = if_else(Metric != "Frac_NA", 1 - Value, Value)) %>%
filter(Metric != "Frac_NA") %>%
filter(query_method == "DeepVarHap") %>%
ggplot() + geom_bar(aes(x = Size, y = Value, fill = Unit),
color = "grey40", width = 0.5,
position = "dodge", stat = "identity") +
facet_grid(Type~Metric, scales = "free") +
theme_bw() +
theme(legend.position = "bottom") +
labs(x = "Simple Repeat Type", fill = "Callset")
```
```{r fig.cap = "GATK4 performance metrics for homopolymers by unit.", eval = FALSE}
ext_trim_df %>%
filter(Subtype == "*") %>%
filter(Filter == "PASS") %>%
filter(str_detect(Subset,"homopolymer")) %>%
filter(str_detect(Subset,"_unit")) %>%
filter(Subset.IS_CONF.Size > 0) %>%
mutate(Subset = str_remove(Subset, "lowcmp_SimpleRepeat_")) %>%
mutate(Subset = str_remove(Subset, "_slop5")) %>%
mutate(Subset = str_replace(Subset, "_", " ")) %>%
mutate(Subset = str_replace(Subset, "to", " to ")) %>%
mutate(Subset = str_replace(Subset, "gt", ">")) %>%
dplyr::select(Type, Subset, query_method, contains("METRIC"), Subset.Size) %>%
gather("Metric","Value", -Type, -Subset,
-query_method, -Subset.Size) %>%
separate(Subset, c("Size", "Unit"), sep = "_") %>%
mutate(Unit = str_remove(Unit, "unit=")) %>%
mutate(Size = str_remove(Size, "homopolymer ")) %>%
mutate(Metric = str_remove(Metric, "METRIC.")) %>%
mutate(Metric = if_else(Metric != "Frac_NA", paste("1 -", Metric), Metric),
Value = if_else(Metric != "Frac_NA", 1 - Value, Value)) %>%
filter(Metric != "Frac_NA") %>%
filter(query_method == "GATK4") %>%
mutate(Unit = fct_relevel(Unit, c("A","T","C","G"))) %>%
ggplot() + geom_bar(aes(x = Size, y = Value, fill = Unit),
color = "grey40", width = 0.5,
position = "dodge", stat = "identity") +
facet_grid(Type~Metric, scales = "free") +
theme_bw() +
theme(legend.position = "bottom") +
labs(x = "Simple Repeat Type", fill = "Unit")
```
<!-- DeepVariant worse recall for longer insertions. -->
```{r eval = FALSE}
ext_trim_df %>%
filter(Type == "INDEL") %>%
filter(Filter == "PASS") %>%
filter(!str_detect(Subtype, "C")) %>%
filter(str_detect(Subset,"homopolymer"),
!str_detect(Subset,"unit")) %>%
filter(Subset.IS_CONF.Size > 0) %>%
mutate(Subset = str_remove(Subset, "lowcmp_SimpleRepeat_")) %>%
mutate(Subset = str_remove(Subset, "_slop5")) %>%
mutate(Subset = str_replace(Subset, "_", " ")) %>%
mutate(Subset = str_replace(Subset, "to", " to ")) %>%
mutate(Subset = str_replace(Subset, "gt", ">")) %>%
dplyr::select(Subtype, Subset, query_method, contains("METRIC"), Subset.Size) %>%
gather("Metric","Value", -Subtype, -Subset,
-query_method, -Subset.Size) %>%
mutate(Metric = str_remove(Metric, "METRIC.")) %>%
mutate(Metric = if_else(Metric != "Frac_NA", paste("1 -", Metric), Metric),
Value = if_else(Metric != "Frac_NA", 1 - Value, Value)) %>%
filter(Metric != "Frac_NA", Metric != "1 - F1_Score") %>%
ggplot() + geom_bar(aes(x = Subtype, y = Value, fill = query_method),
color = "grey40", width = 0.5,
position = "dodge", stat = "identity") +
facet_grid(Metric~Subset, scales = "free") +
theme_bw() +
theme(axis.text.x = element_text(angle = -90),
legend.position = "bottom") +
labs(x = "Indel Subtype", fill = "Callset")
```
## Manual Curration
```{r message = FALSE}
get_var_df <- function(vcffile){
## Read VCF
vcf <- readVcf(vcffile, genome = "BSgenome.Hsapiens.1000genomes.hs37d5")
## Generate tidy data frame
## Truth table classification
tt_class_df <- geno(vcf)[['BD']] %>%
as.data.frame() %>%
rownames_to_column(var = "variant") %>%
filter(QUERY == "FP" | TRUTH == "FN") %>%
as_tibble()
## Subsetting vcf for FP and FN
fpfn_positions <- str_remove(tt_class_df$variant, "_.*")
vcf_positions <- rownames(vcf) %>% str_remove("_.*")
fpfn_vcf <- vcf[vcf_positions %in% fpfn_positions ]
## Truth table classifications for Fp and Fn positions
tt_fpfn_df <- geno(fpfn_vcf )[['BD']] %>%
as.data.frame() %>%
rownames_to_column(var = "variant") %>%
as_tibble()
## Benchmarking Type
bk_type_df <- geno(fpfn_vcf)[['BK']] %>%
as.data.frame() %>%
rownames_to_column(var = "variant") %>%
dplyr::rename(Q.bk = QUERY, T.bk = TRUTH) %>%
as_tibble() %>%
left_join(tt_class_df, by = c("variant" = "variant"))
## Genotype
gt_type_df <- geno(fpfn_vcf)[['GT']] %>%
as.data.frame() %>%
rownames_to_column(var = "variant") %>%
dplyr::rename(Q.gt = QUERY, T.gt = TRUTH) %>%
as_tibble() %>%
left_join(bk_type_df)
## Variant type
fpfn_df <- geno(fpfn_vcf)[['BVT']] %>%
as.data.frame() %>%
rownames_to_column(var = "variant") %>%
dplyr::rename(Q.Var = QUERY, T.Var = TRUTH) %>%
left_join(gt_type_df)
## Combining into single data frame
fpfn_df %>% add_column(FILTER = rowRanges(fpfn_vcf)$FILTER,
Regions = as.list(info(fpfn_vcf)[['Regions']]))
}
annotate_var_df <- function(var_df){
var_anno_df <- var_df %>%
mutate(allrepeats = map_lgl(Regions, ~("lowcmp_AllRepeats_gt95identity_slop5" %in% .)),
imphomo = map_lgl(Regions, ~("lowcmp_SimpleRepeat_imperfecthomopolymer_gt10_slop5" %in% .)),
target_cat = if_else(allrepeats + imphomo == 0, "non-target","target")) %>%
dplyr::select(-allrepeats, -imphomo)
mutate(var_anno_df,
var_cat = case_when(
(Q.bk == "am" | T.bk == "am") & (Q.Var == "INDEL" | T.Var == "INDEL") ~ "AM.INDEL",
(Q.bk == "am" | T.bk == "am") & (Q.Var == "SNP" | T.Var == "SNP") ~ "AM.SNP",
# Q.bk == "am" | T.bk == "am" ~ "AM",
QUERY == "FP" & Q.Var == "INDEL" ~ "FP.INDEL",
QUERY == "FP" & Q.Var == "SNP" ~ "FP.SNP",
QUERY == "." & T.Var == "INDEL" ~ "FN.INDEL",
QUERY == "." & T.Var == "SNP" ~ "FN.SNP",
TRUE ~ "other")
)
}
```
```{r}
## Getting random subset
anno_df <- list(gatk = "data/happy_output/results/result_1.vcf.gz",
deep = "data/happy_output/results/result_2.vcf.gz",
deepHap = "data/happy_output_deepVarHap/results/result_1.vcf.gz") %>%
map(get_var_df) %>%
map_dfr(annotate_var_df, .id = "callset") %>%
# Cleaner variant ids
mutate(CHROM = str_extract(variant, ".*(?=:)"),
POS = str_extract(variant, "(?<=:).*(?=_)"),
ALT = str_extract(variant, "(?<=_).*"))
set.seed(531)
var_random_df <- anno_df %>%
dplyr::filter(var_cat != "other") %>%
mutate(CHROM = str_extract(variant, ".*(?=:)")) %>%
mutate(POS = str_extract(variant, "(?<=:).*(?=_)")) %>%
## Random subsetting to include multiple variant groups
group_by(callset, var_cat, target_cat) %>%
sample_n(size = 5) %>%
ungroup() %>%
## Includes ALTs at the same position
dplyr::select(callset, CHROM, POS) %>%
left_join(anno_df)
deepvar_random_df <- var_random_df %>%
filter(callset == "deepHap") %>%
mutate(variant = str_remove(variant, ".*_")) %>%
dplyr::rename(VAR = variant) %>%
dplyr::select(-Regions, -ALT) %>%
select(callset, target_cat, var_cat, CHROM, POS, everything())
```
```{r}
## Total number of variants in each variant category for target and non-target regions.
anno_df %>%
dplyr::select(callset, CHROM, POS, target_cat, var_cat) %>%
distinct() %>%
filter(callset == "deepHap") %>%
group_by(target_cat, var_cat) %>%
summarise(count = n()) %>%
spread(target_cat, count)
```
```{r fig.height = 12, fig.width = 12, fig.cap = "Heatmap with stratifications for the random variant subset selected for manual curation.", eval = FALSE}
var_region_heatmap_df <- var_random_df %>%
filter(callset == "deepHap") %>%
dplyr::select(variant, var_cat, target_cat, Regions) %>%
mutate(region_df = map(Regions, as_data_frame)) %>%
dplyr::select(-Regions) %>%
unnest()
var_region_heatmap_df %>%
filter(!str_detect(value, "HG00[1,3,4,5]"), value !="CONF") %>%
mutate(CHROM_POS = str_extract(variant, ".*(?=_)")) %>%
mutate(ALT = str_extract(variant, "(?<=_).*")) %>%
ggplot() +
geom_raster(aes(y = value, x = CHROM_POS, fill = target_cat)) +
theme(axis.text.x = element_text(angle = -90)) +
facet_wrap(~var_cat, nrow = 1, scales = "free_x")
```
```{r}
### Manual curation spreadsheets
## Already generate files
# tmp_tsv <- tempfile(fileext = ".tsv")
# deepvar_random_df %>%
# add_column(PacBio = "", GIAB = "", Notes = "") %>%
# write_tsv(path = tmp_tsv)
#
# gs_upload(file = tmp_tsv, sheet_title = "hg002-ccs-deepvar-curate-JZ")
# gs_upload(file = tmp_tsv, sheet_title = "hg002-ccs-deepvar-curate-JM")
# gs_upload(file = tmp_tsv, sheet_title = "hg002-ccs-deepvar-curate-NDO")
```
## Benchmark Region Expansion
<!-- __TODO_ clean-up code, incorporate reproducibility -->
```{r}
get_genome <- function(genome){
if (genome == "hs37d5"){
require(BSgenome.Hsapiens.1000genomes.hs37d5)
return(BSgenome.Hsapiens.1000genomes.hs37d5)
} else if (genome == "GRCh38") {
require(BSgenome.Hsapiens.NCBI.GRCh38)
return(BSgenome.Hsapiens.NCBI.GRCh38)
} else {
stop("Genome not `hs37d5` or `GRCh38`")
}
}
get_chrom_sizes <- function(genome = "hs37d5"){
genome_obj <- get_genome(genome)
get_alpha_freq <- function(i){
genome_obj[[i]] %>%
alphabetFrequency() %>%
data.frame()
}
alpha_freq_df <- as.list(1:22) %>%
map_dfc(get_alpha_freq)
colnames(alpha_freq_df) <- paste0("chr",1:22)
alpha_freq_df <- alpha_freq_df %>%
## Removing bases not included in counts and non-standard bases
filter(chr1 >100) %>%
add_column(base = c("A","C","G","T","N"))
chromosome_lengths <- alpha_freq_df %>%
tidyr::gather(key = "chrom", value = "nbases", -base) %>%
group_by(chrom) %>%
mutate(base_type = if_else(base == "N", "N", "non_N")) %>%
group_by(chrom, base_type) %>%
summarise(n_bases = sum(nbases)) %>%
tidyr::spread(base_type, n_bases) %>%
mutate(len = N + non_N) %>%
dplyr::select(-N)
## data frame with total length and number of non-N bases
data_frame(chrom = "genome",
non_N = sum(chromosome_lengths$non_N),
len = sum(chromosome_lengths$len)) %>%
bind_rows(chromosome_lengths)
}
### High confidence coverage ###################################################
### Bed chromosome coverage lengths from bed
get_bed_cov_by_chrom <- function(bed_file){
## Read as tsv
bed_df <- read_tsv(bed_file,
col_names = c("chrom","start","end","info"), col_types = "ciic") %>%
## Compute region size
mutate(region_size = end - start) %>%
## Only looking at Chromosomes 1-22
filter(chrom %in% c(1:22, paste0("chr", 1:22)))
## Compute bases per chromosome
chrom_cov <- bed_df %>%
## Changing to chromosome names to chr
mutate(chrom = paste0("chr", chrom)) %>%
group_by(chrom,info) %>%
summarise(nbases = sum(region_size))
## NBases data frame
data_frame(chrom = "genome",
nbases = NA,
info = "") %>%
bind_rows(chrom_cov)
}
chrom_size_df <- get_chrom_sizes()
bench_extend_df <- get_bed_cov_by_chrom("data/benchmark_extend/ccs_extended.bed")
```
Supplemental Figure
```{r}
bench_extend_df %>%
filter(info == "CALLABLE") %>%
left_join(chrom_size_df) %>%
mutate(extend = nbases/non_N) %>%
select(chrom, nbases, extend) %>%
mutate(chrom = str_remove(chrom, "chr"),
chrom = factor(chrom, levels = 1:22)) %>%
ggplot() + geom_bar(aes(x = chrom, y = extend), stat = "identity") +
theme_bw() +
labs(x = "Chromosome", y = "Proportion Extend")
```
Extend is the fraction of additional non-N bases in the genome that may be covered by benchmark set when using CCS DeepVariant with haplotype callset to generate benchmark regions.
```{r}
bench_extend_df %>%
filter(info == "CALLABLE") %>%
summarise(nbases = sum(nbases)) %>%
mutate(chrom = "genome") %>%
left_join(chrom_size_df) %>%
mutate(extend = nbases/non_N)
```
### Number of variants in extended regions
```
bcftools view -R ccs_extended.bed ../kolesnikov/pacbio-15kb-hapsort-wgs.vcf.gz -o deepvar_extend_bcftools.vcf
```
<!-- TODO from bcftools stats, will want to replace with R code -->
```
SN 0 number of samples: 1
SN 0 number of records: 418649
SN 0 number of no-ALTs: 0
SN 0 number of SNPs: 210184
SN 0 number of MNPs: 0
SN 0 number of indels: 208691
SN 0 number of others: 0
SN 0 number of multiallelic sites: 764
SN 0 number of multiallelic SNP sites: 123
```
## Errors in NIST HG002 v3.3.2
False negatives in LINEs were frequently observed.
For example LINE at 21:42288851, where paired end short reads have no evidence but CC and mate-pair do (Fig. __ADD REF__).
Additionally, 10x does for some other phased SNPs in the region.
Including PacBio CCS callsets as an additional input for the NIST integration pipeline can potentially correct errors in LINEs.
__TODO estimate for total number of errors in LINEs__
<!-- ![lineIGV]("data/igv_images/igv_snapshot_LINE_21_42288851.png") -->
<!-- ![lineIGVzoom]("data/igv_images/igv_snapshot_LINE_21_42288851_zoomout.png") -->
## Characterizing Errors in CCS
Most variant call errors in CCS callsets were adjacent to homopolymers,
__TODO__ SNP estimate with UCI-LCI and INDEL estimate with UCI and LCI (Table ccsErrorEst).
__TODO__ relationship between number of AM error, FP, and FN.
```{r}
## Get JZ manual curation results
mc_jz <- gs_title(x = "hg002-ccs-deepvar-curate-JZ - November 19, 2:38 AM")
mc_df <- gs_read(ss = mc_jz)
mc_error <- mc_df %>%
group_by(target_cat, var_cat, PacBio) %>%
summarise(count = n()) %>%
filter(PacBio != "-") %>%
spread(PacBio, count, fill = 0) %>%
mutate(error_rate = N/(N + Y))
var_counts <- anno_df %>%
filter(callset == "deepHap") %>%
dplyr::select(callset, CHROM, POS, target_cat, var_cat) %>%
distinct() %>%
group_by(callset, target_cat, var_cat) %>%
summarise(count = n())
```
<!-- TODO ## A better approach is accounting for uncertainty in error rate as well as number of correct variants -->
```{r ccsErrorEst}
error_est_df <- var_counts %>%
left_join(mc_error) %>%
filter(var_cat != "other") %>%
mutate(bconf = map(Y, Hmisc::binconf, n = 5),
est = map_dbl(bconf, 1) * count,
lci = map_dbl(bconf, 2) * count,
uci = map_dbl(bconf, 3) * count)
```
```{r}
sum(error_est_df$count)
error_est_df %>% filter(target_cat == "non-target",
!str_detect(var_cat, "AM")) %>%
.$est %>% sum()
error_est_df %>% filter(target_cat == "non-target",
!str_detect(var_cat, "AM")) %>% .$lci %>% sum()
error_est_df %>% filter(target_cat == "non-target",
!str_detect(var_cat, "AM")) %>% .$uci %>% sum()
```
2434 (1313 - 2611)
```{r ccsErrorEst}
error_est_df %>%
select(-callset, -bconf) %>%
knitr::kable(caption = "Estimated number of variant call errors in the DeepVariant callset with haplotype informed model.")
```
<!-- Nate, for the record, below are the commands I used to get the numbers of FPs in each category. I suspect you could get these numbers pretty easily in your current R script, since essentially I was getting an estimate of the total number of variants in each category you selected 5 variants from for the manual curation. Rather than reproducing what I did, which was imprecise, it would be great if you’d calculate the # of AM’s, FPs, and FNs in target and non-target for SNPs and indels. It could also be useful to subset these further by those in map_all and not in map_all. -->
<!-- 1. Number of FP SNPs for homopolymer stratifications -->
<!-- ``` -->
<!-- PN105860:triounion_171212 jzook$ zgrep 'FP.*SNP' /Users/jzook/Documents/National\ Institute\ of\ Standards\ and\ Technology\ \(NIST\)/Olson\,\ Nathanael\ David\ \(Fed\)\ -\ giab-hg002-ccs/data/happy_output_deepVarHap/results/result_1.vcf.gz | grep omopol | wc -l -->
<!-- 414 -->
<!-- ``` -->
<!-- 2. Number of FP INDELS for homopolymer stratifications -->
<!-- ``` -->
<!-- PN105860:triounion_171212 jzook$ zgrep 'FP.*INDEL' /Users/jzook/Documents/National\ Institute\ of\ Standards\ and\ Technology\ \(NIST\)/Olson\,\ Nathanael\ David\ \(Fed\)\ -\ giab-hg002-ccs/data/happy_output_deepVarHap/results/result_1.vcf.gz | grep omopol | wc -l -->
<!-- 8674 -->
<!-- ``` -->
<!-- 3. Number of FP INDEL in homopolymer and repeat strats defined below -->
<!-- ``` -->
<!-- PN105860:triounion_171212 jzook$ zgrep 'FP.*INDEL' /Users/jzook/Documents/National\ Institute\ of\ Standards\ and\ Technology\ \(NIST\)/Olson\,\ Nathanael\ David\ \(Fed\)\ -\ giab-hg002-ccs/data/happy_output_deepVarHap/results/result_1.vcf.gz | grep -v omopol | grep -v lowcmp_AllRepeats_lt51bpTRs_gt95identity_merged_slop5 | grep lowcmp_AllRepeats_lt51bp_gt95identity_merged_slop5 | wc -l -->
<!-- 328 -->
<!-- ``` -->
<!-- 4. Number of FP SNP in homopolymer and repeat strats defined below -->
<!-- ``` -->
<!-- PN105860:triounion_171212 jzook$ zgrep 'FP.*SNP' /Users/jzook/Documents/National\ Institute\ of\ Standards\ and\ Technology\ \(NIST\)/Olson\,\ Nathanael\ David\ \(Fed\)\ -\ giab-hg002-ccs/data/happy_output_deepVarHap/results/result_1.vcf.gz | grep -v omopol | grep -v lowcmp_AllRepeats_lt51bpTRs_gt95identity_merged_slop5 | grep lowcmp_AllRepeats_lt51bp_gt95identity_merged_slop5 | wc -l -->
<!-- 29 -->
<!-- ``` -->
<!-- 5. Total FP SNPs -->
<!-- ``` -->
<!-- PN105860:triounion_171212 jzook$ zgrep 'FP.*SNP' /Users/jzook/Documents/National\ Institute\ of\ Standards\ and\ Technology\ \(NIST\)/Olson\,\ Nathanael\ David\ \(Fed\)\ -\ giab-hg002-ccs/data/happy_output_deepVarHap/results/result_1.vcf.gz | wc -l -->
<!-- 2684 -->
<!-- ``` -->
<!-- 6. Total FP INDELs -->
<!-- ``` -->
<!-- PN105860:triounion_171212 jzook$ zgrep 'FP.*INDEL' /Users/jzook/Documents/National\ Institute\ of\ Standards\ and\ Technology\ \(NIST\)/Olson\,\ Nathanael\ David\ \(Fed\)\ -\ giab-hg002-ccs/data/happy_output_deepVarHap/results/result_1.vcf.gz | wc -l -->
<!-- 9822 -->
<!-- ``` -->
<!-- 7. Number of FP SNP in homopolymer or lowcmp_AllRepeats_gt95identity_merged_slop -->
<!-- ``` -->
<!-- PN105860:triounion_171212 jzook$ zgrep 'FP.*SNP' /Users/jzook/Documents/National\ Institute\ of\ Standards\ and\ Technology\ \(NIST\)/Olson\,\ Nathanael\ David\ \(Fed\)\ -\ giab-hg002-ccs/data/happy_output_deepVarHap/results/result_1.vcf.gz | grep 'omopol\|,lowcmp_AllRepeats_gt95identity_merged_slop5' | wc -l -->
<!-- 414 -->
<!-- ``` -->
<!-- 8. Number of FP INDEL in homopolymer or lowcmp_AllRepeats_gt95identity_merged_slop -->
<!-- ``` -->
<!-- PN105860:triounion_171212 jzook$ zgrep 'FP.*SNP' /Users/jzook/Documents/National\ Institute\ of\ Standards\ and\ Technology\ \(NIST\)/Olson\,\ Nathanael\ David\ \(Fed\)\ -\ giab-hg002-ccs/data/happy_output_deepVarHap/results/result_1.vcf.gz | grep 'omopol\|,lowcmp_AllRepeats_gt95identity_slop5' | wc -l -->
<!-- 565 -->
<!-- ``` -->
<!-- 9. Number of FP SNP in homopolymer or lowcmp_AllRepeats_gt95identity_slop -->
<!-- ``` -->
<!-- PN105860:triounion_171212 jzook$ zgrep 'FP.*INDEL' /Users/jzook/Documents/National\ Institute\ of\ Standards\ and\ Technology\ \(NIST\)/Olson\,\ Nathanael\ David\ \(Fed\)\ -\ giab-hg002-ccs/data/happy_output_deepVarHap/results/result_1.vcf.gz | grep 'omopol\|,lowcmp_AllRepeats_gt95identity_slop5' | wc -l -->
<!-- 9627 -->
<!-- ``` -->
<!-- 10. Number of FP SNP in homopolymer or lowcmp_AllRepeats_gt95identity_slop and map_all -->
<!-- ``` -->
<!-- PN105860:triounion_171212 jzook$ zgrep 'FP.*SNP' /Users/jzook/Documents/National\ Institute\ of\ Standards\ and\ Technology\ \(NIST\)/Olson\,\ Nathanael\ David\ \(Fed\)\ -\ giab-hg002-ccs/data/happy_output_deepVarHap/results/result_1.vcf.gz | grep -v 'omopol\|,lowcmp_AllRepeats_gt95identity_slop5' | grep ,map_all | wc -l -->
<!-- 2028 -->
<!-- ``` -->
# Conclusions
__TODO__
# Exploratory Analysis