-
Notifications
You must be signed in to change notification settings - Fork 2
/
ReportTimingsAndMultiplicityResults.Rnw
3484 lines (3142 loc) · 239 KB
/
ReportTimingsAndMultiplicityResults.Rnw
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
\documentclass[12pt]{article}
\usepackage{amsmath,amsthm,amssymb}
\usepackage[dvips]{graphicx}
\usepackage[cp1250]{inputenc}
\usepackage[english]{babel}
\usepackage{amsfonts}
\usepackage{multirow}
\usepackage[round,authoryear]{natbib}
\usepackage{lscape}
\usepackage{float}
\usepackage[nomarkers]{endfloat}
\usepackage{array}
\usepackage{subfig}
\usepackage{epsfig, psfrag, graphicx, lscape}
\textwidth=6.5in
\textheight=8.4in
\setlength{\topmargin}{0.21truein}
\hoffset-18mm
\usepackage{parskip}
\newcommand\lT{\rule{0pt}{1.8ex}}
\newcommand\T{\rule{0pt}{2.4ex}}
\newcommand\TT{\rule{0pt}{3.1ex}}
\newcommand\B{\rule[-1.2ex]{0pt}{0pt}}
\renewcommand{\t}{\mathsf{t}}
\newcommand{\E}{\mathsf{E}}
\newcommand{\var}{\mathrm{var}\,}
\newcommand{\hvar}{\widehat{\mathrm{var}}\,}
\newcommand{\cov}{\mathrm{cov}\,}
\newcommand{\hcov}{\widehat{\mathrm{cov}}\,}
\renewcommand{\P}{\mathsf{P}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\No}{\mathbb{N}_0}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\e}{\varepsilon}
\newcommand{\be}{\boldsymbol{\varepsilon}}
\newcommand{\bZ}{\boldsymbol{Z}}
\newcommand{\bY}{\boldsymbol{Y}}
\newcommand{\bX}{\boldsymbol{X}}
\newcommand{\bS}{\boldsymbol{S}}
\newcommand{\bB}{\boldsymbol{B}}
\newcommand{\bW}{\boldsymbol{W}}
\newcommand{\bL}{\boldsymbol{L}}
\newcommand{\bA}{\boldsymbol{A}}
\newcommand{\bF}{\boldsymbol{F}}
\newcommand{\bG}{\boldsymbol{G}}
\newcommand{\bH}{\boldsymbol{H}}
\newcommand{\bM}{\boldsymbol{M}}
\newcommand{\bI}{\boldsymbol{I}}
\newcommand{\bJ}{\boldsymbol{J}}
\newcommand{\bE}{\boldsymbol{E}}
\newcommand{\bQ}{\boldsymbol{Q}}
\newcommand{\bR}{\boldsymbol{R}}
\newcommand{\bU}{\boldsymbol{U}}
\newcommand{\bV}{\boldsymbol{V}}
\newcommand{\bD}{\boldsymbol{D}}
\newcommand{\ba}{\boldsymbol{a}}
\newcommand{\bb}{\boldsymbol{b}}
\newcommand{\bg}{\boldsymbol{g}}
\newcommand{\bh}{\boldsymbol{h}}
\newcommand{\bl}{\boldsymbol{l}}
\newcommand{\br}{\boldsymbol{r}}
\newcommand{\bt}{\boldsymbol{t}}
\newcommand{\bu}{\boldsymbol{u}}
\newcommand{\bv}{\boldsymbol{v}}
\newcommand{\bx}{\boldsymbol{x}}
\newcommand{\by}{\boldsymbol{y}}
\newcommand{\bz}{\boldsymbol{z}}
\newcommand{\bone}{\boldsymbol{1}}
\newcommand{\bomega}{\boldsymbol{\omega}}
\newcommand{\balpha}{\boldsymbol{\alpha}}
\newcommand{\bbeta}{\boldsymbol{\beta}}
\newcommand{\bmu}{\boldsymbol{\mu}}
\newcommand{\btheta}{\boldsymbol{\theta}}
\newcommand{\bxi}{\boldsymbol{\xi}}
\newcommand{\brho}{\boldsymbol{\rho}}
\newcommand{\bgamma}{\boldsymbol{\gamma}}
\newcommand{\bGamma}{\boldsymbol{\Gamma}}
\newcommand{\bOmega}{\boldsymbol{\Omega}}
\newcommand{\bSigma}{\boldsymbol{\Sigma}}
\newcommand{\bPi}{\boldsymbol{\Pi}}
\newcommand{\bPsi}{\boldsymbol{\Psi}}
\newcommand{\bpsi}{\boldsymbol{\psi}}
\newcommand{\bvarphi}{\boldsymbol{\varphi}}
\newcommand{\bLambda}{\boldsymbol{\Lambda}}
\newcommand{\bTheta}{\boldsymbol{\Theta}}
\newcommand{\bPhi}{\boldsymbol{\Phi}}
\newcommand{\bEta}{\boldsymbol{\eta}}
\newcommand{\bepsilon}{\boldsymbol{\epsilon}}
\newcommand{\bkappa}{\boldsymbol{\kappa}}
\newcommand{\bnull}{\boldsymbol{0}}
\renewcommand{\d}{\mathrm{d}}
\renewcommand{\exp}{\mathrm{e}}
\newcommand{\ii}{\mathrm{i}}
\newcommand{\Tr}{\mathop{\mathsf{Tr}}}
\newcommand{\rank}{\mathop{\mathrm{rank}}}
\newcommand{\Exp}{\mathop{\mathrm{exp}}}
\newcommand{\diag}{\mathop{\mathrm{diag}}}
\newcommand{\PP}{\mathbb{P}}
\newcommand{\GG}{\mathbb{G}}
\newcommand\independent{\protect\mathpalette{\protect\independenT}{\perp}}
\def\independenT#1#2{\mathrel{\rlap{$#1#2$}\mkern2mu{#1#2}}}
\newcommand{\logit}{\mathop{\mathrm{logit}}}
% comments
\usepackage{color}
\usepackage{ulem}
\definecolor{purple}{rgb}{0.459,0.109,0.538}
\def\tb#1#2{\sout{#1} \textcolor{purple}{#2}}
\def\tbc#1{\textcolor{purple}{[#1]}}
\title{An Evaluation of Methods for Assessment of Founders of HIV-1 Infection using Within-Host Sequence Data}
\author{Fred Hutch VIDD Biosequence Analysis Unit}
\date{}
\usepackage{Sweave}
\SweaveOpts{concordance=TRUE}
\begin{document}
\maketitle
<<echo = FALSE>>=
# Setup for prettier Sweave output.
old.continue.option <- options( continue = " " )
source( "~/src/from-git/hiv-founder-id/ReportTimingsAndMultiplicityResults_safetosource.R" );
#############
# CONFIGURATION
############
timings.include.methods <- c( "glm" ); # c( "glm", "step", "lasso" )
timings.include.training.codes <- c( "RT", "Rt", "rT", "rt" );
ismultiple.show.heatmap = FALSE;
if( ismultiple.show.heatmap ) {
ismultiple.include.training.codes <- c( "RT", "Rt", "rT", "rt" );
ismultiple.only.is.lasso <- FALSE;
ismultiple.exclude.continuous.predictors <- FALSE;
} else {
ismultiple.include.training.codes <- "RT";
ismultiple.only.is.lasso <- TRUE;
ismultiple.exclude.continuous.predictors <- TRUE;
}
###########
## DEFAULTS
###########
## Configure which results we are displaying.
BakeOff.RESULTS.DIR <- Sys.getenv( "BakeOff_RESULTS_DIR" );
if( BakeOff.RESULTS.DIR != "" ) {
RESULTS.DIR <- BakeOff.RESULTS.DIR;
} else {
#RESULTS.DIR <- "/fast/bakeoff_merged_analysis_sequences_unfiltered/results/";
RESULTS.DIR <- "/fast/bakeoff_merged_analysis_sequences_filteredPre2017/results/";
#RESULTS.DIR <- "/fast/bakeoff_merged_analysis_sequences_filtered2019/results/";
}
RESULTS.DIRNAME <- "raw_fixed";
## NOTE even setting this to TRUE will not force all to be recomputed. See below where force.recomputation = FALSE.
FORCE.RECOMPUTATION <- FALSE;
@
\tableofcontents
{\centering \bf RESULTS FOR \Sexpr{gsub( "_", " ", RESULTS.DIR )}}
%The schedule for visits in days after first HIV+ diagnosis is: D0 D7 D14 D21 D35 D49 D77 D105 D161.
\section{Results}
\subsection{Preliminary results after phase I evaluation}
\subsubsection{Timing, including intercept and lPVL}
<<echo = FALSE, results = hide>>=
### Configuration (Defaults)
include.intercept = TRUE; # This is what's changed: include.intercept = TRUE.
include.all.vars.in.lasso = TRUE;
helpful.additional.cols = c( "lPVL" );
helpful.additional.cols.with.interactions = c();#c( "v3_not_nflg", "X6m.not.1m" );
use.gold.is.multiple = FALSE;
# Ensure results exist.
.results.by.region.and.time.Rda.filename <- evaluateTimings(
include.intercept = include.intercept,
include.all.vars.in.lasso = include.all.vars.in.lasso,
helpful.additional.cols = helpful.additional.cols,
helpful.additional.cols.with.interactions = helpful.additional.cols.with.interactions,
use.gold.is.multiple = use.gold.is.multiple,
force.recomputation = FORCE.RECOMPUTATION,
RESULTS.DIR = RESULTS.DIR,
results.dirname = RESULTS.DIRNAME
);
# evaluateTimings.compute.config.string(..) is defined in evaluateTimings.R.
config.string <- evaluateTimings.compute.config.string(
include.intercept = include.intercept,
include.all.vars.in.lasso = include.all.vars.in.lasso,
helpful.additional.cols = helpful.additional.cols,
helpful.additional.cols.with.interactions = helpful.additional.cols.with.interactions,
use.gold.is.multiple = use.gold.is.multiple
);
### evaluateTimings
if( config.string == "" ) {
evaluateTimings.tab.file.suffix <- "_evaluateTimings.tab";
} else {
evaluateTimings.tab.file.suffix <- paste( "_evaluateTimings_", config.string, ".tab", sep = "" );
}
### MARK ERE I AM. Testing new stuff.
# load( .results.by.region.and.time.Rda.filename ); # adds results.by.region.and.time to environment.
#.formulas.table <- get.formulas( results.by.region.and.time, .varname = "PFitter.mut.rate.coef", model.type = "step", withbounds = TRUE );
#evaluate.specific.timings.model.formula( results.by.region.and.time, names( which.max( .formulas.table ) ) )
# .formulas.table <- get.formulas( results.by.region.and.time, .varname = "PFitter.mut.rate.coef", model.type = "glm", withbounds = TRUE );
# evaluate.specific.timings.model.formula( results.by.region.and.time, names( which.max( .formulas.table ) ) )
##############
## sampledwidth_uniform_1mmtn003_6mhvtn502
evaluateTimings.nflg.v3.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.nflg <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "nflg", to.region = "v3", the.time = "1m.6m", sort.column = NULL, the.bounds.type = "sampledwidth_uniform_1mmtn003_6mhvtn502.1m.nflg", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.nflg.v3.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.nflg ) <- paste( "nflg.v3.1m.6m", colnames( evaluateTimings.nflg.v3.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.nflg ), sep = "." );
evaluateTimings.nflg.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.nflg <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "nflg", the.time = "1m.6m", sort.column = NULL, the.bounds.type = "sampledwidth_uniform_1mmtn003_6mhvtn502.1m", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.nflg.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.nflg ) <- paste( "nflg.1m.6m", colnames( evaluateTimings.nflg.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.nflg ), sep = "." );
evaluateTimings.nflg.v3.1m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.nflg <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "nflg", to.region = "v3", the.time = "1m", sort.column = NULL, the.bounds.type = "sampledwidth_uniform_mtn003.nflg", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.nflg.v3.1m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.nflg ) <- paste( "nflg.v3.1m", colnames( evaluateTimings.nflg.v3.1m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.nflg ), sep = "." );
evaluateTimings.nflg.1m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.nflg <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "nflg", the.time = "1m", sort.column = NULL, the.bounds.type = "sampledwidth_uniform_mtn003", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.nflg.1m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.nflg ) <- paste( "nflg.1m", colnames( evaluateTimings.nflg.1m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.nflg ), sep = "." );
evaluateTimings.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.nflg <- missing.row.safe.cbind( missing.row.safe.cbind( missing.row.safe.cbind( evaluateTimings.nflg.v3.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.nflg, evaluateTimings.nflg.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.nflg ), evaluateTimings.nflg.v3.1m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.nflg ), evaluateTimings.nflg.1m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.nflg );
## sampledwidth_uniform_1mmtn003_6mhvtn502 6m.nflg
evaluateTimings.nflg.v3.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.nflg <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "nflg", to.region = "v3", the.time = "1m.6m", sort.column = NULL, the.bounds.type = "sampledwidth_uniform_1mmtn003_6mhvtn502.6m.nflg", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.nflg.v3.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.nflg ) <- paste( "nflg.v3.1m.6m", colnames( evaluateTimings.nflg.v3.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.nflg ), sep = "." );
evaluateTimings.nflg.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.nflg <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "nflg", the.time = "1m.6m", sort.column = NULL, the.bounds.type = "sampledwidth_uniform_1mmtn003_6mhvtn502.6m", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.nflg.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.nflg ) <- paste( "nflg.1m.6m", colnames( evaluateTimings.nflg.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.nflg ), sep = "." );
evaluateTimings.nflg.v3.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.nflg <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "nflg", to.region = "v3", the.time = "6m", sort.column = NULL, the.bounds.type = "sampledwidth_uniform_hvtn502.nflg", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.nflg.v3.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.nflg ) <- paste( "nflg.v3.6m", colnames( evaluateTimings.nflg.v3.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.nflg ), sep = "." );
evaluateTimings.nflg.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.nflg <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "nflg", the.time = "6m", sort.column = NULL, the.bounds.type = "sampledwidth_uniform_hvtn502", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.nflg.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.nflg ) <- paste( "nflg.6m", colnames( evaluateTimings.nflg.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.nflg ), sep = "." );
evaluateTimings.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.nflg <- missing.row.safe.cbind( missing.row.safe.cbind( missing.row.safe.cbind( evaluateTimings.nflg.v3.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.nflg, evaluateTimings.nflg.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.nflg ), evaluateTimings.nflg.v3.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.nflg ), evaluateTimings.nflg.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.nflg );
## sampledwidth_uniform_1mmtn003_6mhvtn502 1m.v3
evaluateTimings.nflg.v3.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.v3 <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "nflg", to.region = "v3", the.time = "1m.6m", sort.column = NULL, the.bounds.type = "sampledwidth_uniform_1mmtn003_6mhvtn502.1m.v3", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.nflg.v3.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.v3 ) <- paste( "nflg.v3.1m.6m", colnames( evaluateTimings.nflg.v3.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.v3 ), sep = "." );
evaluateTimings.v3.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.v3 <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "v3", the.time = "1m.6m", sort.column = NULL, the.bounds.type = "sampledwidth_uniform_1mmtn003_6mhvtn502.1m", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.v3.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.v3 ) <- paste( "v3.1m.6m", colnames( evaluateTimings.v3.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.v3 ), sep = "." );
evaluateTimings.nflg.v3.1m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.v3 <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "nflg", to.region = "v3", the.time = "1m", sort.column = NULL, the.bounds.type = "sampledwidth_uniform_mtn003.v3", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.nflg.v3.1m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.v3 ) <- paste( "nflg.v3.1m", colnames( evaluateTimings.nflg.v3.1m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.v3 ), sep = "." );
evaluateTimings.v3.1m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.v3 <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "v3", the.time = "1m", sort.column = NULL, the.bounds.type = "sampledwidth_uniform_mtn003", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.v3.1m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.v3 ) <- paste( "v3.1m", colnames( evaluateTimings.v3.1m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.v3 ), sep = "." );
evaluateTimings.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.v3 <- missing.row.safe.cbind( missing.row.safe.cbind( missing.row.safe.cbind( evaluateTimings.nflg.v3.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.v3, evaluateTimings.v3.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.v3 ), evaluateTimings.nflg.v3.1m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.v3 ), evaluateTimings.v3.1m.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.v3 );
## sampledwidth_uniform_1mmtn003_6mhvtn502 6m.v3
evaluateTimings.nflg.v3.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.v3 <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "nflg", to.region = "v3", the.time = "1m.6m", sort.column = NULL, the.bounds.type = "sampledwidth_uniform_1mmtn003_6mhvtn502.6m.v3", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.nflg.v3.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.v3 ) <- paste( "nflg.v3.1m.6m", colnames( evaluateTimings.nflg.v3.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.v3 ), sep = "." );
evaluateTimings.v3.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.v3 <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "v3", the.time = "1m.6m", sort.column = NULL, the.bounds.type = "sampledwidth_uniform_1mmtn003_6mhvtn502.6m", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.v3.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.v3 ) <- paste( "v3.1m.6m", colnames( evaluateTimings.v3.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.v3 ), sep = "." );
evaluateTimings.nflg.v3.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.v3 <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "nflg", to.region = "v3", the.time = "6m", sort.column = NULL, the.bounds.type = "sampledwidth_uniform_hvtn502.v3", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.nflg.v3.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.v3 ) <- paste( "nflg.v3.6m", colnames( evaluateTimings.nflg.v3.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.v3 ), sep = "." );
evaluateTimings.v3.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.v3 <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "v3", the.time = "6m", sort.column = NULL, the.bounds.type = "sampledwidth_uniform_hvtn502", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.v3.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.v3 ) <- paste( "v3.6m", colnames( evaluateTimings.v3.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.v3 ), sep = "." );
evaluateTimings.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.v3 <- missing.row.safe.cbind( missing.row.safe.cbind( missing.row.safe.cbind( evaluateTimings.nflg.v3.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.v3, evaluateTimings.v3.1m.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.v3 ), evaluateTimings.nflg.v3.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.v3 ), evaluateTimings.v3.6m.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.v3 );
##############
if( FALSE ) {
##############
## unbounded 1m.nflg
evaluateTimings.nflg.v3.1m.6m.unbounded.1m.nflg <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "nflg", to.region = "v3", the.time = "1m.6m", sort.column = NULL, the.bounds.type = "unbounded.1m.nflg", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.nflg.v3.1m.6m.unbounded.1m.nflg ) <- paste( "nflg.v3.1m.6m", colnames( evaluateTimings.nflg.v3.1m.6m.unbounded.1m.nflg ), sep = "." );
evaluateTimings.nflg.1m.6m.unbounded.1m.nflg <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "nflg", the.time = "1m.6m", sort.column = NULL, the.bounds.type = "unbounded.1m", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.nflg.1m.6m.unbounded.1m.nflg ) <- paste( "nflg.1m.6m", colnames( evaluateTimings.nflg.1m.6m.unbounded.1m.nflg ), sep = "." );
evaluateTimings.nflg.v3.1m.unbounded.1m.nflg <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "nflg", to.region = "v3", the.time = "1m", sort.column = NULL, the.bounds.type = "unbounded.nflg", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.nflg.v3.1m.unbounded.1m.nflg ) <- paste( "nflg.v3.1m", colnames( evaluateTimings.nflg.v3.1m.unbounded.1m.nflg ), sep = "." );
evaluateTimings.nflg.1m.unbounded.1m.nflg <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "nflg", the.time = "1m", sort.column = NULL, the.bounds.type = "unbounded", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.nflg.1m.unbounded.1m.nflg ) <- paste( "nflg.1m", colnames( evaluateTimings.nflg.1m.unbounded.1m.nflg ), sep = "." );
evaluateTimings.unbounded.1m.nflg <- missing.row.safe.cbind( missing.row.safe.cbind( missing.row.safe.cbind( evaluateTimings.nflg.v3.1m.6m.unbounded.1m.nflg, evaluateTimings.nflg.1m.6m.unbounded.1m.nflg ), evaluateTimings.nflg.v3.1m.unbounded.1m.nflg ), evaluateTimings.nflg.1m.unbounded.1m.nflg );
## unbounded 6m.nflg
evaluateTimings.nflg.v3.1m.6m.unbounded.6m.nflg <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "nflg", to.region = "v3", the.time = "1m.6m", sort.column = NULL, the.bounds.type = "unbounded.6m.nflg", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.nflg.v3.1m.6m.unbounded.6m.nflg ) <- paste( "nflg.v3.1m.6m", colnames( evaluateTimings.nflg.v3.1m.6m.unbounded.6m.nflg ), sep = "." );
evaluateTimings.nflg.1m.6m.unbounded.6m.nflg <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "nflg", the.time = "1m.6m", sort.column = NULL, the.bounds.type = "unbounded.6m", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.nflg.1m.6m.unbounded.6m.nflg ) <- paste( "nflg.1m.6m", colnames( evaluateTimings.nflg.1m.6m.unbounded.6m.nflg ), sep = "." );
evaluateTimings.nflg.v3.6m.unbounded.6m.nflg <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "nflg", to.region = "v3", the.time = "6m", sort.column = NULL, the.bounds.type = "unbounded.nflg", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.nflg.v3.6m.unbounded.6m.nflg ) <- paste( "nflg.v3.6m", colnames( evaluateTimings.nflg.v3.6m.unbounded.6m.nflg ), sep = "." );
evaluateTimings.nflg.6m.unbounded.6m.nflg <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "nflg", the.time = "6m", sort.column = NULL, the.bounds.type = "unbounded", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.nflg.6m.unbounded.6m.nflg ) <- paste( "nflg.6m", colnames( evaluateTimings.nflg.6m.unbounded.6m.nflg ), sep = "." );
evaluateTimings.unbounded.6m.nflg <- missing.row.safe.cbind( missing.row.safe.cbind( missing.row.safe.cbind( evaluateTimings.nflg.v3.1m.6m.unbounded.6m.nflg, evaluateTimings.nflg.1m.6m.unbounded.6m.nflg ), evaluateTimings.nflg.v3.6m.unbounded.6m.nflg ), evaluateTimings.nflg.6m.unbounded.6m.nflg );
## unbounded 1m.v3
evaluateTimings.nflg.v3.1m.6m.unbounded.1m.v3 <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "nflg", to.region = "v3", the.time = "1m.6m", sort.column = NULL, the.bounds.type = "unbounded.1m.v3", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.nflg.v3.1m.6m.unbounded.1m.v3 ) <- paste( "nflg.v3.1m.6m", colnames( evaluateTimings.nflg.v3.1m.6m.unbounded.1m.v3 ), sep = "." );
evaluateTimings.v3.1m.6m.unbounded.1m.v3 <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "v3", the.time = "1m.6m", sort.column = NULL, the.bounds.type = "unbounded.1m", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.v3.1m.6m.unbounded.1m.v3 ) <- paste( "v3.1m.6m", colnames( evaluateTimings.v3.1m.6m.unbounded.1m.v3 ), sep = "." );
evaluateTimings.nflg.v3.1m.unbounded.1m.v3 <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "nflg", to.region = "v3", the.time = "1m", sort.column = NULL, the.bounds.type = "unbounded.v3", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.nflg.v3.1m.unbounded.1m.v3 ) <- paste( "nflg.v3.1m", colnames( evaluateTimings.nflg.v3.1m.unbounded.1m.v3 ), sep = "." );
evaluateTimings.v3.1m.unbounded.1m.v3 <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "v3", the.time = "1m", sort.column = NULL, the.bounds.type = "unbounded", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.v3.1m.unbounded.1m.v3 ) <- paste( "v3.1m", colnames( evaluateTimings.v3.1m.unbounded.1m.v3 ), sep = "." );
evaluateTimings.unbounded.1m.v3 <- missing.row.safe.cbind( missing.row.safe.cbind( missing.row.safe.cbind( evaluateTimings.nflg.v3.1m.6m.unbounded.1m.v3, evaluateTimings.v3.1m.6m.unbounded.1m.v3 ), evaluateTimings.nflg.v3.1m.unbounded.1m.v3 ), evaluateTimings.v3.1m.unbounded.1m.v3 );
## unbounded 6m.v3
evaluateTimings.nflg.v3.1m.6m.unbounded.6m.v3 <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "nflg", to.region = "v3", the.time = "1m.6m", sort.column = NULL, the.bounds.type = "unbounded.6m.v3", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.nflg.v3.1m.6m.unbounded.6m.v3 ) <- paste( "nflg.v3.1m.6m", colnames( evaluateTimings.nflg.v3.1m.6m.unbounded.6m.v3 ), sep = "." );
evaluateTimings.v3.1m.6m.unbounded.6m.v3 <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "v3", the.time = "1m.6m", sort.column = NULL, the.bounds.type = "unbounded.6m", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.v3.1m.6m.unbounded.6m.v3 ) <- paste( "v3.1m.6m", colnames( evaluateTimings.v3.1m.6m.unbounded.6m.v3 ), sep = "." );
evaluateTimings.nflg.v3.6m.unbounded.6m.v3 <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "nflg", to.region = "v3", the.time = "6m", sort.column = NULL, the.bounds.type = "unbounded.v3", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.nflg.v3.6m.unbounded.6m.v3 ) <- paste( "nflg.v3.6m", colnames( evaluateTimings.nflg.v3.6m.unbounded.6m.v3 ), sep = "." );
evaluateTimings.v3.6m.unbounded.6m.v3 <- getFilteredResultsTables( evaluateTimings.tab.file.suffix, the.region = "v3", the.time = "6m", sort.column = NULL, the.bounds.type = "unbounded", column.pattern = "rmse", RESULTS.DIR = RESULTS.DIR, results.dirname = RESULTS.DIRNAME );
colnames( evaluateTimings.v3.6m.unbounded.6m.v3 ) <- paste( "v3.6m", colnames( evaluateTimings.v3.6m.unbounded.6m.v3 ), sep = "." );
evaluateTimings.unbounded.6m.v3 <- missing.row.safe.cbind( missing.row.safe.cbind( missing.row.safe.cbind( evaluateTimings.nflg.v3.1m.6m.unbounded.6m.v3, evaluateTimings.v3.1m.6m.unbounded.6m.v3 ), evaluateTimings.nflg.v3.6m.unbounded.6m.v3 ), evaluateTimings.v3.6m.unbounded.6m.v3 );
} # END IF FALSE
##############
## endmark
#### TODO: REMOVE?
## For some reason one of the values is spuriously low (see below) so we make sure the "min" isn't below 4 for 1m and 8 for 6m.
# nflg.v3.1m.6m.glm nointercept validation results rmse
# Infer uniform 1mmtn003 6mhvtn502 0.08
#
.m1m <- (1/max( 4, base::min( evaluateTimings.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.nflg, evaluateTimings.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.v3, na.rm = TRUE ) ) );
.m6m <- (1/max( 8, base::min( evaluateTimings.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.nflg, evaluateTimings.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.v3, na.rm = TRUE ) ) );
@
%% ### mark
Figure~\ref{fig:Timings.lPVL.intercept.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.nflg} shows the RMSEs of
estimates of Timings, for the 1m time point sequences from RV217
(high-quality nearly-full length (nflg) sequences, about 10 nflg-equivalents
per sample). The estimates are bounded in the sense that whenever a prediction is outside the bounds, we replace it with the nearest bound. The PREAST method presently fails on three of the ``1m'' ``nflg'' sequences, and these are replaced by the lower bound before evaluation. There is an intercept allowed (and lone indicators that can be used to shift the intercept for time and region), and log plasma viral load (lPVL) is included in every model, with interactions.
\begin{minipage}{\linewidth}
{
\centering
\par
\bigskip
\captionof{figure}{\bf RMSEs for estimates of Timings using 1m samples
from RV217, ~10 SGA nflg-equiv, and lPVL (with intercept)} \label{fig:Timings.lPVL.intercept.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.nflg}
<<echo = FALSE, results = hide, fig = TRUE>>=
#timings.mat <- evaluateTimings.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.nflg;
#timings.mat <- evaluateTimings.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.nflg[ , 1:7 ];
timings.mat <- prepare.timings.mat( evaluateTimings.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.nflg, include.intercept = include.intercept );
my.palette <- colorRampPalette(c("red", "yellow", "green"))(n = 299)
col.breaks = c(seq(0,0.5*.m1m,length=100), # for red
seq(0.5*.m1m,0.9*.m1m,length=101)[-1], # for yellow
seq(.9*.m1m,1*.m1m,length=101)[-1]) # for green
mat.text <- round( timings.mat );
mat.text[ is.na( mat.text ) ] <- "";
mat.data <- (1/timings.mat);
heatmap.2(
mat.data,
col = my.palette, colsep=c(1:62),rowsep=(1:62), sepwidth=c(0.05,0.05), sepcolor="white",
trace="none", Rowv=F,Colv=F, scale="none", dendrogram="none",key=F,
cellnote = mat.text, notecol = "black", notecex = 0.8,
srtCol=45, adjCol = c(1,1), cexCol = 0.9,
cexRow = 0.8,
margins = c( 11.5, 9.5 ), breaks = col.breaks
);
@
\par
\bigskip
}
\textbf{RMSEs for estimates of Timings using 1m samples
from RV217, ~10 SGA nflg-equiv, and lPVL (with intercept)}
The first column corresponds to the uncalibrated estimates directly
from PFitter and PREAST. Four sets of three columns follow,
corresponding to different data used in the calibration. In the
leftmost of the four sets, labeled [RT], all of the data is included:
both regions, and both times. In the rightmost, labeled [rt], only
sequences of the nflg region from RV217 and 1m time are used in
the parameter fitting step. These models include log Plasma Viral Load (lPVL), and exclude the intercept and lone variables that can serve as an intercept (v3\_not\_nflg, 6m\_not\_1m, and v3\_not\_nflg :6m\_not\_1m).
\par
\bigskip
\end{minipage}
Figure~\ref{fig:Timings.lPVL.intercept.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.nflg} shows the RMSEs of
estimates of Timings, for the 6m time point sequences from RV217
(high-quality nearly-full length (nflg) sequences, about 10 nflg-equivalents
per sample).
\begin{minipage}{\linewidth}
{
\centering
\par
\bigskip
\captionof{figure}{\bf RMSEs for estimates of Timings using 6m samples from RV217, ~10 SGA nflg-equiv, and lPVL (with intercept)} \label{fig:Timings.lPVL.intercept.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.nflg}
<<echo = FALSE, results = hide, fig = TRUE>>=
#timings.mat <- evaluateTimings.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.nflg;
#timings.mat <- evaluateTimings.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.nflg[ , 1:7 ];
timings.mat <- prepare.timings.mat( evaluateTimings.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.nflg, include.intercept = include.intercept );
my.palette <- colorRampPalette(c("red", "yellow", "green"))(n = 299)
col.breaks = c(seq(0,0.5*.m6m,length=100), # for red
seq(0.5*.m6m,0.9*.m6m,length=101)[-1], # for yellow
seq(.9*.m6m,1*.m6m,length=101)[-1]) # for green
mat.text <- round( timings.mat );
mat.text[ is.na( mat.text ) ] <- "";
mat.data <- (1/timings.mat);
heatmap.2(
mat.data,
col = my.palette, colsep=c(1:62),rowsep=(1:62), sepwidth=c(0.05,0.05), sepcolor="white",
trace="none", Rowv=F,Colv=F, scale="none", dendrogram="none",key=F,
cellnote = mat.text, notecol = "black", notecex = 0.8,
srtCol=45, adjCol = c(1,1), cexCol = 0.9,
cexRow = 0.8,
margins = c( 11.5, 9.5 ), breaks = col.breaks
);
@
\par
\bigskip
}
\textbf{RMSEs for estimates of Timings using 6m samples
from RV217, ~10 SGA nflg-equiv, and lPVL (with intercept)}
The first column corresponds to the uncalibrated estimates directly
from PFitter and PREAST. Four sets of three columns follow,
corresponding to different data used in the calibration. In the
leftmost of the four sets, labeled [RT], all of the data is included:
both regions, and both times. In the rightmost, labeled [rt], only
sequences of the nflg region from RV217 and 1m time are used in
the parameter fitting step. These models include log Plasma Viral Load (lPVL), and exclude the intercept and lone variables that can serve as an intercept (v3\_not\_nflg, 6m\_not\_1m, and v3\_not\_nflg :6m\_not\_1m).
\par
\bigskip
\end{minipage}
Figure~\ref{fig:Timings.lPVL.intercept.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.v3} shows the RMSEs of
estimates of Timings, for the 1m time point sequences from Caprisa 002 (deep, high-quality sequences of short region of Env, V3).
\begin{minipage}{\linewidth}
{
\centering
\par
\bigskip
\captionof{figure}{\bf RMSEs for estimates of Timings 1m samples from Caprisa 002, v3 Illumina w/PrimerID, and lPVL (with intercept)} \label{fig:Timings.lPVL.intercept.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.v3}
<<echo = FALSE, results = hide, fig = TRUE>>=
#timings.mat <- evaluateTimings.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.v3;
#timings.mat <- evaluateTimings.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.v3[ , 1:7 ];
timings.mat <- prepare.timings.mat( evaluateTimings.sampledwidth_uniform_1mmtn003_6mhvtn502.1m.v3, include.intercept = include.intercept );
my.palette <- colorRampPalette(c("red", "yellow", "green"))(n = 299)
col.breaks = c(seq(0,0.5*.m1m,length=100), # for red
seq(0.5*.m1m,0.9*.m1m,length=101)[-1], # for yellow
seq(.9*.m1m,1*.m1m,length=101)[-1]) # for green
mat.text <- round( timings.mat );
mat.text[ is.na( mat.text ) ] <- "";
mat.data <- (1/timings.mat);
heatmap.2(
mat.data,
col = my.palette, colsep=c(1:62),rowsep=(1:62), sepwidth=c(0.05,0.05), sepcolor="white",
trace="none", Rowv=F,Colv=F, scale="none", dendrogram="none",key=F,
cellnote = mat.text, notecol = "black", notecex = 0.8,
srtCol=45, adjCol = c(1,1), cexCol = 0.9,
cexRow = 0.8,
margins = c( 11.5, 9.5 ), breaks = col.breaks
);
@
\par
\bigskip
}
\textbf{RMSEs for estimates of Timings 1m samples from Caprisa 002, v3 Illumina w/PrimerID, and lPVL (with intercept)}
The first column corresponds to the uncalibrated estimates directly
from PFitter and PREAST. Four sets of three columns follow,
corresponding to different data used in the calibration. In the
leftmost of the four sets, labeled [RT], all of the data is included:
both regions, and both times. In the rightmost, labeled [rt], only
sequences of the v3 region from RV217 and 1m time are used in
the parameter fitting step. These models include log Plasma Viral Load (lPVL), and exclude the intercept and lone variables that can serve as an intercept (v3\_not\_nflg, 6m\_not\_1m, and v3\_not\_nflg :6m\_not\_1m).
\par
\bigskip
\end{minipage}
Figure~\ref{fig:Timings.lPVL.intercept.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.v3} shows the RMSEs of
estimates of Timings, for the 6m time point sequences from Caprisa 002 (deep, high-quality sequences of short region of Env, V3).
\begin{minipage}{\linewidth}
{
\centering
\par
\bigskip
\captionof{figure}{\bf RMSEs for estimates of Timings using 6m samples from Caprisa 002, v3 Illumina w/PrimerID, and lPVL (with intercept)} \label{fig:Timings.lPVL.intercept.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.v3}
<<echo = FALSE, results = hide, fig = TRUE>>=
#timings.mat <- evaluateTimings.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.v3;
#timings.mat <- evaluateTimings.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.v3[ , 1:7 ];
timings.mat <- prepare.timings.mat( evaluateTimings.sampledwidth_uniform_1mmtn003_6mhvtn502.6m.v3, include.intercept = include.intercept );
my.palette <- colorRampPalette(c("red", "yellow", "green"))(n = 299)
col.breaks = c(seq(0,0.5*.m6m,length=100), # for red
seq(0.5*.m6m,0.9*.m6m,length=101)[-1], # for yellow
seq(.9*.m6m,1*.m6m,length=101)[-1]) # for green
mat.text <- round( timings.mat );
mat.text[ is.na( mat.text ) ] <- "";
mat.data <- (1/timings.mat);
heatmap.2(
mat.data,
col = my.palette, colsep=c(1:62),rowsep=(1:62), sepwidth=c(0.05,0.05), sepcolor="white",
trace="none", Rowv=F,Colv=F, scale="none", dendrogram="none",key=F,
cellnote = mat.text, notecol = "black", notecex = 0.8,
srtCol=45, adjCol = c(1,1), cexCol = 0.9,
cexRow = 0.8,
margins = c( 11.5, 9.5 ), breaks = col.breaks
);
@
\par
\bigskip
}
\textbf{RMSEs for estimates of Timings using 6m samples from Caprisa 002, v3 Illumina w/PrimerID, and lPVL (with intercept)}
The first column corresponds to the uncalibrated estimates directly
from PFitter and PREAST. Four sets of three columns follow,
corresponding to different data used in the calibration. In the
leftmost of the four sets, labeled [RT], all of the data is included:
both regions, and both times. In the rightmost, labeled [rt], only
sequences of the v3 region from RV217 and 1m time are used in
the parameter fitting step. These models include log Plasma Viral Load (lPVL), and exclude the intercept and lone variables that can serve as an intercept (v3\_not\_nflg, 6m\_not\_1m, and v3\_not\_nflg :6m\_not\_1m).
\par
\bigskip
\end{minipage}
%%%%%endmark
LASSO consistently chose poor models, usually only containing lPVL. LASSO and stepwise regression prediction performance was poor (data not shown). All methods benefit from calibration, as shown by the large RMSE values in the ``uncalibrated'' columns of the figures.
When including the intercept, even the trivial model ``days.since.infection $\sim$ 1'', which models the time since infection as simply distributed Normally around a time- and region-specific mean, does very well, and including statistics computed on the sequence data does not yield improvements over this trivial model. This reflects the low variation in the true days-since-infection in the training data (the standard deviation is about 5 days for the ``1m'' time point and about 12 days for the ``6m'' time point).
%% TODO: Fill in with more details, include histogram.
Thus in the following analyses we exclude the intercept, and when training the models using pooled data, we also do not allow lone indicators of the region (``v3\_not\_nflg'') or the sample (``6m\_not\_1m''), although we do include interactions between these variables and lPVL, and with the estimator. The resulting models estimate infection time as some scalar multiple of lPVL, plus (for the rows other than ``none'') a scalar multiple of a particular estimator (e.g. PFitter).
\subsubsection{Timing, summary}
<<echo = FALSE, results = hide>>=
## yesintercept
timings.mats.yesintercept.nolPVL.noV3.no6m.noGIM <-
getTimingsResults(
include.intercept = TRUE,
helpful.additional.cols = c(), #c( "lPVL" ),
helpful.additional.cols.with.interactions = c(),#c( "v3_not_nflg", "X6m.not.1m" );
use.gold.is.multiple = FALSE
);
timings.mats.yesintercept.yeslPVL.noV3.no6m.noGIM <-
getTimingsResults(
include.intercept = TRUE,
helpful.additional.cols = c( "lPVL" ),
helpful.additional.cols.with.interactions = c(),#c( "v3_not_nflg", "X6m.not.1m" );
use.gold.is.multiple = FALSE
);
## nointercept
timings.mats.nointercept.nolPVL.noV3.no6m.noGIM <-
getTimingsResults(
include.intercept = FALSE,
helpful.additional.cols = c(), #c( "lPVL" ),
helpful.additional.cols.with.interactions = c(),#c( "v3_not_nflg", "X6m.not.1m" );
use.gold.is.multiple = FALSE
);
timings.mats.nointercept.yeslPVL.noV3.no6m.noGIM <-
getTimingsResults(
include.intercept = FALSE,
helpful.additional.cols = c( "lPVL" ),
helpful.additional.cols.with.interactions = c(),#c( "v3_not_nflg", "X6m.not.1m" );
use.gold.is.multiple = FALSE
);
## nointercept, with V3
timings.mats.nointercept.nolPVL.yesV3.no6m.noGIM <-
getTimingsResults(
include.intercept = FALSE,
helpful.additional.cols = c(), #c( "lPVL" ),
helpful.additional.cols.with.interactions = c("v3_not_nflg"),#c( "v3_not_nflg", "X6m.not.1m" );
use.gold.is.multiple = FALSE
);
timings.mats.nointercept.yeslPVL.yesV3.no6m.noGIM <-
getTimingsResults(
include.intercept = FALSE,
helpful.additional.cols = c( "lPVL" ),
helpful.additional.cols.with.interactions = c("v3_not_nflg"),#c( "v3_not_nflg", "X6m.not.1m" );
use.gold.is.multiple = FALSE
);
## nointercept, with 6m
timings.mats.nointercept.nolPVL.noV3.yes6m.noGIM <-
getTimingsResults(
include.intercept = FALSE,
helpful.additional.cols = c(), #c( "lPVL" ),
helpful.additional.cols.with.interactions = c("X6m.not.1m"),#c( "v3_not_nflg", "X6m.not.1m" );
use.gold.is.multiple = FALSE
);
timings.mats.nointercept.yeslPVL.noV3.yes6m.noGIM <-
getTimingsResults(
include.intercept = FALSE,
helpful.additional.cols = c( "lPVL" ),
helpful.additional.cols.with.interactions = c("X6m.not.1m"),#c( "v3_not_nflg", "X6m.not.1m" );
use.gold.is.multiple = FALSE
);
## nointercept, with V3 and 6m
timings.mats.nointercept.nolPVL.yesV3.yes6m.noGIM <-
getTimingsResults(
include.intercept = FALSE,
helpful.additional.cols = c(), #c( "lPVL" ),
helpful.additional.cols.with.interactions = c( "v3_not_nflg", "X6m.not.1m" ),
use.gold.is.multiple = FALSE
);
timings.mats.nointercept.yeslPVL.yesV3.yes6m.noGIM <-
getTimingsResults(
include.intercept = FALSE,
helpful.additional.cols = c( "lPVL" ),
helpful.additional.cols.with.interactions = c( "v3_not_nflg", "X6m.not.1m" ),
use.gold.is.multiple = FALSE
);
###
@
<<echo = FALSE, results = hide>>=
## some computations towards the talk slides
# First, for 6m (v3), natural variation, days are approx normal with mean 179.7222 and 95% of mean (173.7212 185.7232).
# for "none"
getTimingsResultFormula( "none", include.intercept = FALSE, helpful.additional.cols = c(), regions = "v3", times = "6m" )
# $formulas
# .formulas
# days.since.infection ~ 1
# 18
#
# $evaluated.formula
#
# Call:
# lm(formula = .formula, data = regression.df)
#
# Residuals:
# Min 1Q Median 3Q Max
# -24.722 -8.722 2.278 7.028 25.278
#
# Coefficients:
# Estimate Std. Error t value Pr(>|t|)
# (Intercept) 179.722 2.844 63.19 <2e-16 ***
# ---
# Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#
# Residual standard error: 12.07 on 17 degrees of freedom
#
#
# $evaluated.formula.table
# Estimate 2.5 % 97.5 % Pr(>|t|)
# (Intercept) 179.7222 173.7212 185.7232 1.299352e-21
timings.result.formula.v3.6m <-
getTimingsResultFormula( "PFitter.mut.rate.coef", include.intercept = FALSE, helpful.additional.cols = c(), regions = "v3", times = "6m" );
# $formulas
# .formulas
# days.since.infection ~ 0 + PFitter.mut.rate.coef
# 18
#
# $evaluated.formula
#
# Call:
# lm(formula = .formula, data = regression.df)
#
# Residuals:
# Min 1Q Median 3Q Max
# -177.45 58.84 77.03 117.91 170.86
#
# Coefficients:
# Estimate Std. Error t value Pr(>|t|)
# PFitter.mut.rate.coef 16055 2818 5.697 2.62e-05 ***
# ---
# Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#
# Residual standard error: 108.7 on 17 degrees of freedom
# Multiple R-squared: 0.6563, Adjusted R-squared: 0.6361
# F-statistic: 32.46 on 1 and 17 DF, p-value: 2.619e-05
#
#
# $evaluated.formula.table
# Estimate 2.5 % 97.5 % Pr(>|t|)
# PFitter.mut.rate.coef 16055.03 10109.65 22000.4 2.618826e-05
# 1/c( 16055.03, 10109.65, 22000.4 )
# [1] 6.228578e-05 9.891539e-05 4.545372e-05
timings.result.formula.nflg.6m <-
getTimingsResultFormula( "PFitter.mut.rate.coef", include.intercept = FALSE, helpful.additional.cols = c(), regions = "nflg", times = "6m" );
# $formulas
# .formulas
# days.since.infection ~ 0 + PFitter.mut.rate.coef
# 34
#
# $evaluated.formula
#
# Call:
# lm(formula = .formula, data = regression.df)
#
# Residuals:
# Min 1Q Median 3Q Max
# -163.278 -4.709 70.752 109.539 159.311
#
# Coefficients:
# Estimate Std. Error t value Pr(>|t|)
# PFitter.mut.rate.coef 38410 4166 9.219 1.19e-10 ***
# ---
# Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#
# Residual standard error: 98.84 on 33 degrees of freedom
# Multiple R-squared: 0.7203, Adjusted R-squared: 0.7119
# F-statistic: 85 on 1 and 33 DF, p-value: 1.19e-10
#
#
# $evaluated.formula.table
# Estimate 2.5 % 97.5 % Pr(>|t|)
# PFitter.mut.rate.coef 38409.87 29933.73 46886 1.189716e-10
# 1/c( 38409.87, 29933.73, 46886 )
# signif( 1/c( 38409.87, 29933.73, 46886 ), 3 )
# [1] 2.60e-05 3.34e-05 2.13e-05
timings.result.formula.nflgv3.6m <-
getTimingsResultFormula( "PFitter.mut.rate.coef", include.intercept = FALSE, helpful.additional.cols = c(), regions = c( "nflg", "v3" ), times = "6m" );
# $formulas
# .formulas
# days.since.infection ~ 0 + PFitter.mut.rate.coef
# 52
#
# $evaluated.formula
#
# Call:
# lm(formula = .formula, data = regression.df)
#
# Residuals:
# Min 1Q Median 3Q Max
# -309.54 42.99 98.44 134.32 170.47
#
# Coefficients:
# Estimate Std. Error t value Pr(>|t|)
# PFitter.mut.rate.coef 22194 2638 8.415 3.28e-11 ***
# ---
# Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#
# Residual standard error: 119.4 on 51 degrees of freedom
# Multiple R-squared: 0.5813, Adjusted R-squared: 0.5731
# F-statistic: 70.81 on 1 and 51 DF, p-value: 3.282e-11
#
#
# $evaluated.formula.table
# Estimate 2.5 % 97.5 % Pr(>|t|)
# PFitter.mut.rate.coef 22194.29 16899.3 27489.28 3.282045e-11
# 1/c( 22194.29, 16899.3, 27489.28 )
# [1] 4.505663e-05 5.917405e-05 3.637782e-05
timings.result.formula.v3.1m6m <-
getTimingsResultFormula( "PFitter.mut.rate.coef", include.intercept = FALSE, helpful.additional.cols = c(), regions = c( "v3" ), times = c( "1m", "6m" ) );
# $formulas
# .formulas
# days.since.infection ~ 0 + PFitter.mut.rate.coef
# 21
#
# $evaluated.formula
#
# Call:
# lm(formula = .formula, data = regression.df)
#
# Residuals:
# Min 1Q Median 3Q Max
# -232.04 22.94 60.11 112.93 177.34
#
# Coefficients:
# Estimate Std. Error t value Pr(>|t|)
# PFitter.mut.rate.coef 9990 1813 5.51 2.89e-06 ***
# ---
# Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#
# Residual standard error: 99.15 on 37 degrees of freedom
# Multiple R-squared: 0.4508, Adjusted R-squared: 0.4359
# F-statistic: 30.37 on 1 and 37 DF, p-value: 2.89e-06
#
#
# $evaluated.formula.table
# Estimate 2.5 % 97.5 % Pr(>|t|)
# PFitter.mut.rate.coef 9989.484 6316.38 13662.59 2.889875e-06
# 1/c( 9989.484, 6316.38, 13662.59 )
# [1] 1.001053e-04 1.583185e-04 7.319256e-05
timings.result.formula.nflgv3.1m6m <-
getTimingsResultFormula( "PFitter.mut.rate.coef", include.intercept = FALSE, helpful.additional.cols = c(), regions = c( "nflg", "v3" ), times = c( "1m", "6m" ) );
# $formulas
# .formulas
# days.since.infection ~ 0 + PFitter.mut.rate.coef
# 57
#
# $evaluated.formula
#
# Call:
# lm(formula = .formula, data = regression.df)
#
# Residuals:
# Min 1Q Median 3Q Max
# -353.77 34.81 50.10 123.19 180.77
#
# Coefficients:
# Estimate Std. Error t value Pr(>|t|)
# PFitter.mut.rate.coef 14182 1655 8.571 8.55e-14 ***
# ---
# Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#
# Residual standard error: 102.5 on 107 degrees of freedom
# Multiple R-squared: 0.4071, Adjusted R-squared: 0.4015
# F-statistic: 73.45 on 1 and 107 DF, p-value: 8.554e-14
#
#
# $evaluated.formula.table
# Estimate 2.5 % 97.5 % Pr(>|t|)
# PFitter.mut.rate.coef 14182.03 10901.7 17462.36 8.554102e-14
#
# 1/c( 14182.03, 10901.7, 17462.36 )
# [1] 7.051177e-05 9.172881e-05 5.726603e-05
## 1m
timings.result.formula.v3.1m <-
getTimingsResultFormula( "PFitter.mut.rate.coef", include.intercept = FALSE, helpful.additional.cols = c(), regions = "v3", times = "1m" );
# $formulas
# .formulas
# days.since.infection ~ 0 + PFitter.mut.rate.coef
# 20
#
# $evaluated.formula
#
# Call:
# lm(formula = .formula, data = regression.df)
#
# Residuals:
# Min 1Q Median 3Q Max
# -58.04 44.42 53.10 60.94 67.93
#
# Coefficients:
# Estimate Std. Error t value Pr(>|t|)
# PFitter.mut.rate.coef 3997 1378 2.9 0.00918 **
# ---
# Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#
# Residual standard error: 53.46 on 19 degrees of freedom
# Multiple R-squared: 0.3068, Adjusted R-squared: 0.2703
# F-statistic: 8.41 on 1 and 19 DF, p-value: 0.009178
#
#
# $evaluated.formula.table
# Estimate 2.5 % 97.5 % Pr(>|t|)
# PFitter.mut.rate.coef 3996.554 1112.132 6880.977 0.009178273
# 1/c( 3996.554, 1112.132, 6880.977)
# [1] 0.0002502156 0.0008991738 0.0001453282
# 2.50e-04 (1.45e-04 to 8.99e-04)
# (1/c( 3996.554, 1112.132, 6880.977)) / 1.19e-05
# [1] 21.02652 75.56083 12.21245
timings.result.formula.nflg.1m <-
getTimingsResultFormula( "PFitter.mut.rate.coef", include.intercept = FALSE, helpful.additional.cols = c(), regions = "nflg", times = "1m" );
# $formulas
# .formulas
# days.since.infection ~ 0 + PFitter.mut.rate.coef
# 36
#
# $evaluated.formula
#
# Call:
# lm(formula = .formula, data = regression.df)
#
# Residuals:
# Min 1Q Median 3Q Max
# -37.94 30.05 38.76 41.92 51.24
#
# Coefficients:
# Estimate Std. Error t value Pr(>|t|)
# PFitter.mut.rate.coef 10259 2256 4.547 6.25e-05 ***
# ---
# Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#
# Residual standard error: 37.7 on 35 degrees of freedom
# Multiple R-squared: 0.3714, Adjusted R-squared: 0.3534
# F-statistic: 20.68 on 1 and 35 DF, p-value: 6.25e-05
#
#
# $evaluated.formula.table
# Estimate 2.5 % 97.5 % Pr(>|t|)
# PFitter.mut.rate.coef 10259.09 5678.759 14839.42 6.249679e-05
# 1/c( 10259.09, 5678.759, 14839.42 )
# [1] 9.747453e-05 1.760948e-04 6.738808e-05
# signif( 1/c( 10259.09, 5678.759, 14839.42 ), 3 )
# [1] 9.75e-05 1.76e-04 6.74e-05
timings.result.formula.nflg.1m6m <-
getTimingsResultFormula( "PFitter.mut.rate.coef", include.intercept = FALSE, helpful.additional.cols = c(), regions = "nflg", times = c( "1m", "6m" ) );
# $formulas
# .formulas
# days.since.infection ~ 0 + PFitter.mut.rate.coef
# 36
#
# $evaluated.formula
#
# Call:
# lm(formula = .formula, data = regression.df)
#
# Residuals:
# Min 1Q Median 3Q Max
# -195.57 15.02 31.87 96.30 165.31
#
# Coefficients:
# Estimate Std. Error t value Pr(>|t|)
# PFitter.mut.rate.coef 29075 2992 9.719 1.49e-14 ***
# ---
# Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#
# Residual standard error: 86.81 on 69 degrees of freedom
# Multiple R-squared: 0.5779, Adjusted R-squared: 0.5717
# F-statistic: 94.45 on 1 and 69 DF, p-value: 1.493e-14
#
#
# $evaluated.formula.table
# Estimate 2.5 % 97.5 % Pr(>|t|)
# PFitter.mut.rate.coef 29075.21 23106.93 35043.5 1.492966e-14
#
# 1/c( 29075.21, 23106.93, 35043.5 )
# [1] 3.439356e-05 4.327706e-05 2.853596e-05
timings.result.formula.nflgv3.1m <-
getTimingsResultFormula( "PFitter.mut.rate.coef", include.intercept = FALSE, helpful.additional.cols = c(), regions = c( "nflg", "v3" ), times = "1m" );
# $formulas
# .formulas
# days.since.infection ~ 0 + PFitter.mut.rate.coef
# 56
#
# $evaluated.formula
#
# Call:
# lm(formula = .formula, data = regression.df)
#
# Residuals:
# Min 1Q Median 3Q Max
# -86.50 37.09 42.81 47.55 67.91
#
# Coefficients:
# Estimate Std. Error t value Pr(>|t|)
# PFitter.mut.rate.coef 4977 1074 4.632 2.26e-05 ***
# ---
# Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#
# Residual standard error: 45.38 on 55 degrees of freedom
# Multiple R-squared: 0.2806, Adjusted R-squared: 0.2675
# F-statistic: 21.45 on 1 and 55 DF, p-value: 2.263e-05
#
#
# $evaluated.formula.table
# Estimate 2.5 % 97.5 % Pr(>|t|)
# PFitter.mut.rate.coef 4976.816 2823.436 7130.197 2.263019e-05
# 1/c( 4976.816, 2823.436, 7130.197)
# [1] 0.0002009317 0.0003541784 0.0001402486
# 2.00e-04 (1.40e-04 to 3.54e-04)
## Forestplot the updated PFitter mutation rates.
.mat <- rbind(
c( region = "v3", time = "1m", signif( 1/timings.result.formula.v3.1m$evaluated.formula.table[1,c(1,3,2)], 3 ) ),
c( region = "nflg", time = "1m", signif( 1/timings.result.formula.nflg.1m$evaluated.formula.table[1,c(1,3,2)], 3 ) ),
c( region = "nflg, v3", time = "1m", signif( 1/timings.result.formula.nflgv3.1m$evaluated.formula.table[1,c(1,3,2)], 3 ) ),
c( region = "v3", time = "6m", signif( 1/timings.result.formula.v3.6m$evaluated.formula.table[1,c(1,3,2)], 3 ) ),
c( region = "nflg", time = "6m", signif( 1/timings.result.formula.nflg.6m$evaluated.formula.table[1,c(1,3,2)], 3 ) ),
c( region = "nflg, v3", time = "6m", signif( 1/timings.result.formula.nflgv3.6m$evaluated.formula.table[1,c(1,3,2)], 3 ) ),
c( region = "v3", time = "1m, 6m", signif( 1/timings.result.formula.v3.1m6m$evaluated.formula.table[1,c(1,3,2)], 3 ) ),
c( region = "nflg", time = "1m, 6m", signif( 1/timings.result.formula.nflg.1m6m$evaluated.formula.table[1,c(1,3,2)], 3 ) ),
c( region = "nflg, v3", time = "1m, 6m", signif( 1/timings.result.formula.nflgv3.1m6m$evaluated.formula.table[1,c(1,3,2)], 3 ) )
);
.mat.for.table <- .mat[ , 1:2, drop = FALSE ];
.mat.for.table <- rbind( c( "Regions", "Samples" ), .mat.for.table ); # Add a row for the column headings
.mat.for.CIs <- .mat[ , c( "Estimate", "2.5 %", "97.5 %" ) ];
mode( .mat.for.CIs ) <- "numeric";
.mat.for.CIs <- rbind( rep( NA, ncol( .mat.for.CIs ) ), .mat.for.CIs ); # Add a row for the column headings
pdf( "PFitter Estimated Mutation Rates forestplot.pdf" );
forestplot( .mat.for.table, (.mat.for.CIs*10^5)/1.19, is.summary = c( TRUE, rep( FALSE, nrow( .mat ) ) ),
new_page = FALSE,
txt_gp = fpTxtGp(label = list(gpar(fontfamily = "",
col = "#660000"),
gpar(fontfamily = "",
col = "#660000")),
ticks = gpar(fontfamily = "", cex=1),
xlab = gpar(fontfamily = "HersheySerif", cex = 1.5)),
xlab="Mutation rate (x 10^-5 substitutions per day)",
xlog=TRUE,
col=fpColors(box="royalblue",line="darkblue", summary="royalblue"),