-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanual-configuration.html
1624 lines (1588 loc) · 114 KB
/
manual-configuration.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Manually Configuring a Dataset for process.phenotypes</title>
<script>// Pandoc 2.9 adds attributes on both header and div. We remove the former (to
// be compatible with the behavior of Pandoc < 2.8).
document.addEventListener('DOMContentLoaded', function(e) {
var hs = document.querySelectorAll("div.section[class*='level'] > :first-child");
var i, h, a;
for (i = 0; i < hs.length; i++) {
h = hs[i];
if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6
a = h.attributes;
while (a.length > 0) h.removeAttribute(a[0].name);
}
});
</script>
<script>$(document).ready(function(){
if (typeof $('[data-toggle="tooltip"]').tooltip === 'function') {
$('[data-toggle="tooltip"]').tooltip();
}
if ($('[data-toggle="popover"]').popover === 'function') {
$('[data-toggle="popover"]').popover();
}
});
</script>
<style type="text/css">
.lightable-minimal {
border-collapse: separate;
border-spacing: 16px 1px;
width: 100%;
margin-bottom: 10px;
}
.lightable-minimal td {
margin-left: 5px;
margin-right: 5px;
}
.lightable-minimal th {
margin-left: 5px;
margin-right: 5px;
}
.lightable-minimal thead tr:last-child th {
border-bottom: 2px solid #00000050;
empty-cells: hide;
}
.lightable-minimal tbody tr:first-child td {
padding-top: 0.5em;
}
.lightable-minimal.lightable-hover tbody tr:hover {
background-color: #f5f5f5;
}
.lightable-minimal.lightable-striped tbody tr:nth-child(even) {
background-color: #f5f5f5;
}
.lightable-classic {
border-top: 0.16em solid #111111;
border-bottom: 0.16em solid #111111;
width: 100%;
margin-bottom: 10px;
margin: 10px 5px;
}
.lightable-classic tfoot tr td {
border: 0;
}
.lightable-classic tfoot tr:first-child td {
border-top: 0.14em solid #111111;
}
.lightable-classic caption {
color: #222222;
}
.lightable-classic td {
padding-left: 5px;
padding-right: 5px;
color: #222222;
}
.lightable-classic th {
padding-left: 5px;
padding-right: 5px;
font-weight: normal;
color: #222222;
}
.lightable-classic thead tr:last-child th {
border-bottom: 0.10em solid #111111;
}
.lightable-classic.lightable-hover tbody tr:hover {
background-color: #F9EEC1;
}
.lightable-classic.lightable-striped tbody tr:nth-child(even) {
background-color: #f5f5f5;
}
.lightable-classic-2 {
border-top: 3px double #111111;
border-bottom: 3px double #111111;
width: 100%;
margin-bottom: 10px;
}
.lightable-classic-2 tfoot tr td {
border: 0;
}
.lightable-classic-2 tfoot tr:first-child td {
border-top: 3px double #111111;
}
.lightable-classic-2 caption {
color: #222222;
}
.lightable-classic-2 td {
padding-left: 5px;
padding-right: 5px;
color: #222222;
}
.lightable-classic-2 th {
padding-left: 5px;
padding-right: 5px;
font-weight: normal;
color: #222222;
}
.lightable-classic-2 tbody tr:last-child td {
border-bottom: 3px double #111111;
}
.lightable-classic-2 thead tr:last-child th {
border-bottom: 1px solid #111111;
}
.lightable-classic-2.lightable-hover tbody tr:hover {
background-color: #F9EEC1;
}
.lightable-classic-2.lightable-striped tbody tr:nth-child(even) {
background-color: #f5f5f5;
}
.lightable-material {
min-width: 100%;
white-space: nowrap;
table-layout: fixed;
font-family: Roboto, sans-serif;
border: 1px solid #EEE;
border-collapse: collapse;
margin-bottom: 10px;
}
.lightable-material tfoot tr td {
border: 0;
}
.lightable-material tfoot tr:first-child td {
border-top: 1px solid #EEE;
}
.lightable-material th {
height: 56px;
padding-left: 16px;
padding-right: 16px;
}
.lightable-material td {
height: 52px;
padding-left: 16px;
padding-right: 16px;
border-top: 1px solid #eeeeee;
}
.lightable-material.lightable-hover tbody tr:hover {
background-color: #f5f5f5;
}
.lightable-material.lightable-striped tbody tr:nth-child(even) {
background-color: #f5f5f5;
}
.lightable-material.lightable-striped tbody td {
border: 0;
}
.lightable-material.lightable-striped thead tr:last-child th {
border-bottom: 1px solid #ddd;
}
.lightable-material-dark {
min-width: 100%;
white-space: nowrap;
table-layout: fixed;
font-family: Roboto, sans-serif;
border: 1px solid #FFFFFF12;
border-collapse: collapse;
margin-bottom: 10px;
background-color: #363640;
}
.lightable-material-dark tfoot tr td {
border: 0;
}
.lightable-material-dark tfoot tr:first-child td {
border-top: 1px solid #FFFFFF12;
}
.lightable-material-dark th {
height: 56px;
padding-left: 16px;
padding-right: 16px;
color: #FFFFFF60;
}
.lightable-material-dark td {
height: 52px;
padding-left: 16px;
padding-right: 16px;
color: #FFFFFF;
border-top: 1px solid #FFFFFF12;
}
.lightable-material-dark.lightable-hover tbody tr:hover {
background-color: #FFFFFF12;
}
.lightable-material-dark.lightable-striped tbody tr:nth-child(even) {
background-color: #FFFFFF12;
}
.lightable-material-dark.lightable-striped tbody td {
border: 0;
}
.lightable-material-dark.lightable-striped thead tr:last-child th {
border-bottom: 1px solid #FFFFFF12;
}
.lightable-paper {
width: 100%;
margin-bottom: 10px;
color: #444;
}
.lightable-paper tfoot tr td {
border: 0;
}
.lightable-paper tfoot tr:first-child td {
border-top: 1px solid #00000020;
}
.lightable-paper thead tr:last-child th {
color: #666;
vertical-align: bottom;
border-bottom: 1px solid #00000020;
line-height: 1.15em;
padding: 10px 5px;
}
.lightable-paper td {
vertical-align: middle;
border-bottom: 1px solid #00000010;
line-height: 1.15em;
padding: 7px 5px;
}
.lightable-paper.lightable-hover tbody tr:hover {
background-color: #F9EEC1;
}
.lightable-paper.lightable-striped tbody tr:nth-child(even) {
background-color: #00000008;
}
.lightable-paper.lightable-striped tbody td {
border: 0;
}
</style>
<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
</style>
<style type="text/css">
code {
white-space: pre;
}
.sourceCode {
overflow: visible;
}
</style>
<style type="text/css" data-origin="pandoc">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
pre.numberSource code > span
{ position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode
{ }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code span.at { color: #7d9029; } /* Attribute */
code span.bn { color: #40a070; } /* BaseN */
code span.bu { } /* BuiltIn */
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code span.ch { color: #4070a0; } /* Char */
code span.cn { color: #880000; } /* Constant */
code span.co { color: #60a0b0; font-style: italic; } /* Comment */
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code span.do { color: #ba2121; font-style: italic; } /* Documentation */
code span.dt { color: #902000; } /* DataType */
code span.dv { color: #40a070; } /* DecVal */
code span.er { color: #ff0000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #40a070; } /* Float */
code span.fu { color: #06287e; } /* Function */
code span.im { } /* Import */
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
code span.kw { color: #007020; font-weight: bold; } /* Keyword */
code span.op { color: #666666; } /* Operator */
code span.ot { color: #007020; } /* Other */
code span.pp { color: #bc7a00; } /* Preprocessor */
code span.sc { color: #4070a0; } /* SpecialChar */
code span.ss { color: #bb6688; } /* SpecialString */
code span.st { color: #4070a0; } /* String */
code span.va { color: #19177c; } /* Variable */
code span.vs { color: #4070a0; } /* VerbatimString */
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
</style>
<script>
// apply pandoc div.sourceCode style to pre.sourceCode instead
(function() {
var sheets = document.styleSheets;
for (var i = 0; i < sheets.length; i++) {
if (sheets[i].ownerNode.dataset["origin"] !== "pandoc") continue;
try { var rules = sheets[i].cssRules; } catch (e) { continue; }
for (var j = 0; j < rules.length; j++) {
var rule = rules[j];
// check if there is a div.sourceCode rule
if (rule.type !== rule.STYLE_RULE || rule.selectorText !== "div.sourceCode") continue;
var style = rule.style.cssText;
// check if color or background-color is set
if (rule.style.color === '' && rule.style.backgroundColor === '') continue;
// replace div.sourceCode by a pre.sourceCode rule
sheets[i].deleteRule(j);
sheets[i].insertRule('pre.sourceCode{' + style + '}', j);
}
}
})();
</script>
<style type="text/css">body {
background-color: #fff;
margin: 1em auto;
max-width: 700px;
overflow: visible;
padding-left: 2em;
padding-right: 2em;
font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.35;
}
#TOC {
clear: both;
margin: 0 0 10px 10px;
padding: 4px;
width: 400px;
border: 1px solid #CCCCCC;
border-radius: 5px;
background-color: #f6f6f6;
font-size: 13px;
line-height: 1.3;
}
#TOC .toctitle {
font-weight: bold;
font-size: 15px;
margin-left: 5px;
}
#TOC ul {
padding-left: 40px;
margin-left: -1.5em;
margin-top: 5px;
margin-bottom: 5px;
}
#TOC ul ul {
margin-left: -2em;
}
#TOC li {
line-height: 16px;
}
table {
margin: 1em auto;
border-width: 1px;
border-color: #DDDDDD;
border-style: outset;
border-collapse: collapse;
}
table th {
border-width: 2px;
padding: 5px;
border-style: inset;
}
table td {
border-width: 1px;
border-style: inset;
line-height: 18px;
padding: 5px 5px;
}
table, table th, table td {
border-left-style: none;
border-right-style: none;
}
table thead, table tr.even {
background-color: #f7f7f7;
}
p {
margin: 0.5em 0;
}
blockquote {
background-color: #f6f6f6;
padding: 0.25em 0.75em;
}
hr {
border-style: solid;
border: none;
border-top: 1px solid #777;
margin: 28px 0;
}
dl {
margin-left: 0;
}
dl dd {
margin-bottom: 13px;
margin-left: 13px;
}
dl dt {
font-weight: bold;
}
ul {
margin-top: 0;
}
ul li {
list-style: circle outside;
}
ul ul {
margin-bottom: 0;
}
pre, code {
background-color: #f7f7f7;
border-radius: 3px;
color: #333;
white-space: pre-wrap;
}
pre {
border-radius: 3px;
margin: 5px 0px 10px 0px;
padding: 10px;
}
pre:not([class]) {
background-color: #f7f7f7;
}
code {
font-family: Consolas, Monaco, 'Courier New', monospace;
font-size: 85%;
}
p > code, li > code {
padding: 2px 0px;
}
div.figure {
text-align: center;
}
img {
background-color: #FFFFFF;
padding: 2px;
border: 1px solid #DDDDDD;
border-radius: 3px;
border: 1px solid #CCCCCC;
margin: 0 5px;
}
h1 {
margin-top: 0;
font-size: 35px;
line-height: 40px;
}
h2 {
border-bottom: 4px solid #f7f7f7;
padding-top: 10px;
padding-bottom: 2px;
font-size: 145%;
}
h3 {
border-bottom: 2px solid #f7f7f7;
padding-top: 10px;
font-size: 120%;
}
h4 {
border-bottom: 1px solid #f7f7f7;
margin-left: 8px;
font-size: 105%;
}
h5, h6 {
border-bottom: 1px solid #ccc;
font-size: 105%;
}
a {
color: #0033dd;
text-decoration: none;
}
a:hover {
color: #6666ff; }
a:visited {
color: #800080; }
a:visited:hover {
color: #BB00BB; }
a[href^="http:"] {
text-decoration: underline; }
a[href^="https:"] {
text-decoration: underline; }
code > span.kw { color: #555; font-weight: bold; }
code > span.dt { color: #902000; }
code > span.dv { color: #40a070; }
code > span.bn { color: #d14; }
code > span.fl { color: #d14; }
code > span.ch { color: #d14; }
code > span.st { color: #d14; }
code > span.co { color: #888888; font-style: italic; }
code > span.ot { color: #007020; }
code > span.al { color: #ff0000; font-weight: bold; }
code > span.fu { color: #900; font-weight: bold; }
code > span.er { color: #a61717; background-color: #e3d2d2; }
</style>
</head>
<body>
<h1 class="title toc-ignore">Manually Configuring a Dataset for
process.phenotypes</h1>
<div id="TOC">
<ul>
<li><a href="#manual-dataset-configuration" id="toc-manual-dataset-configuration">Manual Dataset Configuration</a>
<ul>
<li><a href="#overview" id="toc-overview">Overview</a></li>
<li><a href="#an-introduction-to-process.phenotypes-configuration-blocks" id="toc-an-introduction-to-process.phenotypes-configuration-blocks">An
Introduction to <code>process.phenotypes</code> Configuration Blocks</a>
<ul>
<li><a href="#variable-tag-e.g.-var00001" id="toc-variable-tag-e.g.-var00001">Variable tag
(e.g. <code>VAR00001</code>)</a></li>
<li><a href="#variable-name-keyvalue-pair" id="toc-variable-name-keyvalue-pair">Variable <code>name:</code>
key/value pair</a></li>
<li><a href="#variable-canonical_name-keyvalue-pair" id="toc-variable-canonical_name-keyvalue-pair">Variable
<code>canonical_name:</code> key/value pair</a></li>
<li><a href="#other-entries" id="toc-other-entries">Other
entries</a></li>
</ul></li>
<li><a href="#step-by-step-walkthrough" id="toc-step-by-step-walkthrough">Step-by-Step Walkthrough</a>
<ul>
<li><a href="#data-loading" id="toc-data-loading">Data Loading</a></li>
<li><a href="#subject-identifier" id="toc-subject-identifier">Subject
Identifier</a></li>
<li><a href="#subject-age" id="toc-subject-age">Subject Age</a></li>
<li><a href="#dates" id="toc-dates">Dates</a></li>
<li><a href="#numeric-variables" id="toc-numeric-variables">Numeric
Variables</a></li>
<li><a href="#setting-bounds" id="toc-setting-bounds">Setting
Bounds</a></li>
<li><a href="#bimodal-numerics" id="toc-bimodal-numerics">Bimodal
Numerics</a></li>
<li><a href="#categorical-variables" id="toc-categorical-variables">Categorical Variables</a></li>
<li><a href="#adding-variable-specific-aliases-for-na" id="toc-adding-variable-specific-aliases-for-na">Adding
Variable-Specific Aliases for <code>NA</code></a></li>
<li><a href="#reporting-dependencies" id="toc-reporting-dependencies">Reporting Dependencies</a></li>
<li><a href="#enforcing-dependencies" id="toc-enforcing-dependencies">Enforcing Dependencies</a></li>
<li><a href="#free-text-entries" id="toc-free-text-entries">Free Text
Entries</a></li>
<li><a href="#blood-pressure-measurements" id="toc-blood-pressure-measurements">Blood Pressure
Measurements</a></li>
</ul></li>
</ul></li>
</ul>
</div>
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">library</span>(process.phenotypes)</span></code></pre></div>
<div id="manual-dataset-configuration" class="section level1">
<h1>Manual Dataset Configuration</h1>
<div id="overview" class="section level2">
<h2>Overview</h2>
<p>The goal of <code>process.phenotypes</code> is to enable the
transparent creation of a “clean” data matrix from potentially messy
input. In the most common case, someone has handed you an undocumented
file of variables, and you are left with the unenviable task of trying
to create order from the chaos.</p>
<p>In order to use <code>process.phenotypes</code> for dataset cleaning,
you must generate a pair of <a href="https://yaml.org/">YAML</a>
configuration files:</p>
<ul>
<li>a dataset-specific configuration with information about consent and
age restrictions, summary characteristics of each contained variable,
and optionally specifications for new variables to be derived from
existing variables after cleaning; and</li>
<li>a (possibly empty) configuration file containing shared model
information common to multiple variables, to facilitate the creation of
harmonized variables that can later be seamlessly combined or
compared.</li>
</ul>
<p>This walkthrough will use a test dataset
<code>raw_phenotypes.tsv</code> from <code>process.phenotypes</code> as
an example, and provide guidance and suggestions for how to evaluate and
configure variables from messy input.</p>
</div>
<div id="an-introduction-to-process.phenotypes-configuration-blocks" class="section level2">
<h2>An Introduction to <code>process.phenotypes</code> Configuration
Blocks</h2>
<p><code>process.phenotypes</code> requires a configuration block
<code>variables:</code> with one entry per variable (column) in the
input data matrix. These variable-specific entries have a required
minimum structure, and can accept an assortment of optional additional
values depending on the context. The contextual entries will be
discussed below in the walkthrough, but the minimum required values are
as follows:</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="fu">variables</span><span class="kw">:</span></span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">VAR00001</span><span class="kw">:</span></span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">name</span><span class="kw">:</span><span class="at"> variable_name_1</span></span>
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">canonical_name</span><span class="kw">:</span><span class="at"> </span><span class="st">"descriptive text"</span></span>
<span id="cb2-5"><a href="#cb2-5" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">VAR00002</span><span class="kw">:</span></span>
<span id="cb2-6"><a href="#cb2-6" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">name</span><span class="kw">:</span><span class="at"> variable_name_2</span></span>
<span id="cb2-7"><a href="#cb2-7" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">canonical_name</span><span class="kw">:</span><span class="at"> </span><span class="st">"other text description"</span></span></code></pre></div>
<div id="variable-tag-e.g.-var00001" class="section level3">
<h3>Variable tag (e.g. <code>VAR00001</code>)</h3>
<p>Each variable block (here, the units under <code>VAR00001</code>,
<code>VAR00002</code>) corresponds to a column in the input data matrix.
The tags <code>VAR00001</code>, <code>VAR00002</code>, etc., are
arbitrarily specified with the following guidelines:</p>
<ul>
<li>they must be unique in each dataset</li>
<li>they should only consist of characters [A-Za-z0-9_]</li>
</ul>
<p>These tags are injected into the output report and data tsv as column
headers, in place of whatever is present in the input dataset (though
note that if you really like the values in the input dataset, you could
just set them as the variable tags and they will be preserved). The
order of the variable blocks matters: the first block (under
<code>VAR00001</code>) corresponds to the first column of the input
matrix; <code>VAR00002</code> to the second; and so on.</p>
<p>Users of the utility function
<code>process.phenotypes::parse.surveycto</code> will end up with a
dataset yaml that contains variable block names following our internal
convention: <code>TAG#####</code>. While this is not required in manual
configuration, we do at least recommend that users consider creating
variable tags that are never prefixes of one another:
<code>VAR00001</code> and <code>VAR00011</code> are ok, but
<code>VAR0001</code> and <code>VAR00011</code> are not. This isn’t
required for the package to function, but will cause headaches
downstream.</p>
</div>
<div id="variable-name-keyvalue-pair" class="section level3">
<h3>Variable <code>name:</code> key/value pair</h3>
<p>The <code>name:</code> key is required for each variable. The entry
should be the (if necessary quoted) column header for the variable in
the input data matrix. The name is required for two reasons:</p>
<ul>
<li>it is important for transparent recordkeeping: this is how you know
that <code>garbled_input1</code> corresponds to
<code>pretty_header_1</code> in the output</li>
<li>it provides a really important sanity check for the package during
input, when it confirms that the input data conform to the structure of
the specified dataset yaml/</li>
</ul>
</div>
<div id="variable-canonical_name-keyvalue-pair" class="section level3">
<h3>Variable <code>canonical_name:</code> key/value pair</h3>
<p>The <code>canonical_name:</code> key is required for each variable.
This entry is imagined to contain descriptive text corresponding to the
relevant variable. In certain instances, you may find that you have
descriptive text for your input data, and you want it to be
recapitulated in the cleaning report for clarity; such text can be the
value here. If no such information is available, we recommend either
replicating the value of <code>name:</code> here, or specifying
<code>.na</code>, which will be interpreted correctly as <code>NA</code>
by the package.</p>
</div>
<div id="other-entries" class="section level3">
<h3>Other entries</h3>
<p>Other combinations of optional flags will be mentioned in the full
walkthrough. We’ll mention in brief that each variable must minimally
contain either <code>type:</code> or <code>shared_model:</code>, as
described below.</p>
</div>
</div>
<div id="step-by-step-walkthrough" class="section level2">
<h2>Step-by-Step Walkthrough</h2>
<div id="data-loading" class="section level3">
<h3>Data Loading</h3>
<p>Load your dataframe into <code>R</code> for inspection. The test
example used in this vignette looks like this:</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a>example.data <span class="ot"><-</span> <span class="fu">system.file</span>(<span class="st">"extdata"</span>,</span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a> <span class="st">"raw_phenotypes.tsv"</span>,</span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a> <span class="at">package =</span> <span class="st">"process.phenotypes"</span>,</span>
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a> <span class="at">mustWork =</span> <span class="cn">TRUE</span></span>
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a>)</span>
<span id="cb3-6"><a href="#cb3-6" aria-hidden="true" tabindex="-1"></a>phenotype.data <span class="ot"><-</span> <span class="fu">read.table</span>(example.data,</span>
<span id="cb3-7"><a href="#cb3-7" aria-hidden="true" tabindex="-1"></a> <span class="at">header =</span> <span class="cn">TRUE</span>, <span class="at">stringsAsFactors =</span> <span class="cn">FALSE</span>, <span class="at">sep =</span> <span class="st">"</span><span class="sc">\t</span><span class="st">"</span>,</span>
<span id="cb3-8"><a href="#cb3-8" aria-hidden="true" tabindex="-1"></a> <span class="at">comment.char =</span> <span class="st">""</span>, <span class="at">quote =</span> <span class="st">"</span><span class="sc">\"</span><span class="st">"</span>, <span class="at">check.names =</span> <span class="cn">FALSE</span></span>
<span id="cb3-9"><a href="#cb3-9" aria-hidden="true" tabindex="-1"></a>)</span>
<span id="cb3-10"><a href="#cb3-10" aria-hidden="true" tabindex="-1"></a><span class="fu">head</span>(phenotype.data)</span>
<span id="cb3-11"><a href="#cb3-11" aria-hidden="true" tabindex="-1"></a><span class="co">#> subjid age dob height waist_circumference sex fruit</span></span>
<span id="cb3-12"><a href="#cb3-12" aria-hidden="true" tabindex="-1"></a><span class="co">#> ID29 44 1974 1.828 m 87.53 panda yes</span></span>
<span id="cb3-13"><a href="#cb3-13" aria-hidden="true" tabindex="-1"></a><span class="co">#> ID25 57 1946 1.313 m 80.04 male not answered</span></span>
<span id="cb3-14"><a href="#cb3-14" aria-hidden="true" tabindex="-1"></a><span class="co">#> ID45 18 1991-04-21 1.278m 82.67 Male no</span></span>
<span id="cb3-15"><a href="#cb3-15" aria-hidden="true" tabindex="-1"></a><span class="co">#> ID24 36 71 1.237m 77.06 Male no</span></span>
<span id="cb3-16"><a href="#cb3-16" aria-hidden="true" tabindex="-1"></a><span class="co">#> ID22 36 93 0.894cm 78.22 alive yes</span></span>
<span id="cb3-17"><a href="#cb3-17" aria-hidden="true" tabindex="-1"></a><span class="co">#> ID21 4 05 0 1.536 cm 34.34 Female not answered</span></span>
<span id="cb3-18"><a href="#cb3-18" aria-hidden="true" tabindex="-1"></a><span class="co">#> preferred fruit letters measure bloodpressure awesomeness</span></span>
<span id="cb3-19"><a href="#cb3-19" aria-hidden="true" tabindex="-1"></a><span class="co">#> apple ee 2 133 , 131 UBER AWESOME</span></span>
<span id="cb3-20"><a href="#cb3-20" aria-hidden="true" tabindex="-1"></a><span class="co">#> strawberry lv 2 234 ,137 Very Awesome</span></span>
<span id="cb3-21"><a href="#cb3-21" aria-hidden="true" tabindex="-1"></a><span class="co">#> strawberry si 4 184 / 79 UBER AWESOME</span></span>
<span id="cb3-22"><a href="#cb3-22" aria-hidden="true" tabindex="-1"></a><span class="co">#> strawberry we 1 230 - 107 Kinda awesome</span></span>
<span id="cb3-23"><a href="#cb3-23" aria-hidden="true" tabindex="-1"></a><span class="co">#> apple ld 3 248 ,143 Awesome</span></span>
<span id="cb3-24"><a href="#cb3-24" aria-hidden="true" tabindex="-1"></a><span class="co">#> pear fb 2 170/ 60 Uncertain awesomeness</span></span></code></pre></div>
</div>
<div id="subject-identifier" class="section level3">
<h3>Subject Identifier</h3>
<p>Every dataset must have exactly one variable with the tag
<code>subject_id: yes</code>, indicating that the variable’s entries
serve as an identifier for the corresponding row. Note that the entries
do not have to be unique within the file (that is, multiple rows can
have the same subject ID without issue). However, the subject ID cannot
be something that is interpreted by R as <code>NA</code> or
<code>NULL</code>; in that case, the rows will be removed from the
file.</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="fu">VAR00001</span><span class="kw">:</span></span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">name</span><span class="kw">:</span><span class="at"> </span><span class="st">"subjid"</span></span>
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">type</span><span class="kw">:</span><span class="at"> </span><span class="st">"string"</span></span>
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">subject_id</span><span class="kw">:</span><span class="at"> </span><span class="ch">yes</span></span>
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">canonical_name</span><span class="kw">:</span><span class="at"> </span><span class="st">"Subject Identifier"</span></span></code></pre></div>
</div>
<div id="subject-age" class="section level3">
<h3>Subject Age</h3>
<p>Every dataset must have exactly one variable with the tag
<code>subject_age: yes</code>, indicating which variable lists the
subjects’ age in years at time of consent. If age is not specified, the
subject will be assumed to not be consented, and will be removed from
the output dataset.</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="fu">VAR00002</span><span class="kw">:</span></span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">name</span><span class="kw">:</span><span class="at"> </span><span class="st">"age"</span></span>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">type</span><span class="kw">:</span><span class="at"> </span><span class="st">"numeric"</span></span>
<span id="cb5-5"><a href="#cb5-5" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">subject_age</span><span class="kw">:</span><span class="at"> </span><span class="ch">yes</span></span>
<span id="cb5-6"><a href="#cb5-6" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">canonical_name</span><span class="kw">:</span><span class="at"> </span><span class="st">"Subject Self-Reported Age"</span></span></code></pre></div>
</div>
<div id="dates" class="section level3">
<h3>Dates</h3>
<p>Dates in a variety of potential input formats are sanitized to a
four-digit year. The entirety of the date entry is simplified to
year-only to allow a wide variety of input formats, and to address the
preponderance of rounded entries (e.g. January 1, YYYY). If other
behavior is desired, you may want to explore reading in as a string and
creating a derived variable.</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="fu">VAR00003</span><span class="kw">:</span></span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">name</span><span class="kw">:</span><span class="at"> </span><span class="st">"dob"</span></span>
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">type</span><span class="kw">:</span><span class="at"> </span><span class="st">"date"</span></span>
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">canonical_name</span><span class="kw">:</span><span class="at"> </span><span class="st">"Subject Date of Birth"</span></span></code></pre></div>
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a><span class="do">## Note that the tolower function is used to emulate the behavior of upstream steps in the package</span></span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a>res <span class="ot"><-</span> process.phenotypes<span class="sc">:::</span><span class="fu">parse.date</span>(<span class="fu">tolower</span>(phenotype.data<span class="sc">$</span>dob), <span class="fu">list</span>())</span>
<span id="cb7-4"><a href="#cb7-4" aria-hidden="true" tabindex="-1"></a>df <span class="ot"><-</span> <span class="fu">data.frame</span>(<span class="at">before =</span> phenotype.data<span class="sc">$</span>dob, <span class="at">after =</span> res<span class="sc">$</span>phenotype.data)</span></code></pre></div>
<pre><code>#> ## Dates in a variety of formats before and after cleaning has been applied
#> before after
#> 1974 1974
#> 1946 1946
#> 1991-04-21 1991
#> 71 NA
#> 93 NA
#> 05 0 NA
#> January 1966 1966
#> 2017 2017
#> 1967-02-25 1967
#> 1919 1919
#> 1976 1976
#> 07/1924 1924
#> aug-1985 1985
#> February 1962 1962
#> 1996 1996
#> August 1926 1926
#> 2010-06-02 2010
#> 36 NA
#> 1907-05-26 1907
#> October,1986 1986
#> [ reached 'max' / getOption("max.print") -- omitted 80 rows ]</code></pre>
</div>
<div id="numeric-variables" class="section level3">
<h3>Numeric Variables</h3>
<p>Suitable for numeric values, both float and integer. Any characters
after the first detected number are removed (e.g. 100.2and200 becomes
100.2). This is especially helpful for numeric variables that are
followed by units, possibly inconsistently. You should note that if
values are reported in different units, e.g. cm vs. m, this may
obfuscate that difference; however, you may be able to detect and
correct bimodal variables (see below). Instances of different units in a
unimodal distribution are more likely errors in the unit designation, in
which case stripping them via this function is helpful.</p>
<p>To configure a numeric variable, you would start with something like
this:</p>
<div class="sourceCode" id="cb9"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a><span class="fu">VAR00004</span><span class="kw">:</span></span>
<span id="cb9-3"><a href="#cb9-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">name</span><span class="kw">:</span><span class="at"> </span><span class="st">"height"</span></span>
<span id="cb9-4"><a href="#cb9-4" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">type</span><span class="kw">:</span><span class="at"> </span><span class="st">"numeric"</span></span>
<span id="cb9-5"><a href="#cb9-5" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">canonical_name</span><span class="kw">:</span><span class="at"> </span><span class="st">"Standing Height (meters)"</span></span></code></pre></div>
<p>The function to clean numeric variables is internal, but this is an
example of usage with test height data. See below for a comparison of
input and output of the numeric cleaning process.</p>
<div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a>res <span class="ot"><-</span> process.phenotypes<span class="sc">:::</span><span class="fu">reformat.numerics</span>(phenotype.data<span class="sc">$</span>height, <span class="fu">list</span>())</span>
<span id="cb10-3"><a href="#cb10-3" aria-hidden="true" tabindex="-1"></a>df <span class="ot"><-</span> <span class="fu">data.frame</span>(<span class="at">before =</span> phenotype.data<span class="sc">$</span>height, <span class="at">after =</span> res<span class="sc">$</span>phenotype.data)</span></code></pre></div>
<div id="numeric-variables-before-and-after-cleaning-has-been-applied" class="section level4">
<h4>Numeric variables before and after cleaning has been applied</h4>
<pre><code>#> before after
#> 1.828 m 1.828
#> 1.313 m 1.313
#> 1.278m 1.278
#> 1.237m 1.237
#> 0.894cm 0.894
#> 1.536 cm 1.536
#> 1.444 cm 1.444
#> 1.347cm 1.347
#> 1.401 m 1.401
#> 1.477 cm 1.477
#> 1.403m 1.403
#> 1.782m 1.782
#> 1.094cm 1.094
#> 0.955m 0.955
#> 1.43cm 1.430
#> 1.602 cm 1.602
#> 1.785 cm 1.785
#> 1.215m 1.215
#> 1.768cm 1.768
#> 1.359m 1.359
#> [ reached 'max' / getOption("max.print") -- omitted 80 rows ]</code></pre>
<p>Once your data is cleaned, you will find a histogram in the report,
like this one:</p>
</div>
<div id="histogram-of-var00004-standing-height-meters-distribution" class="section level4">
<h4>Histogram of VAR00004 (Standing Height (meters)) Distribution</h4>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhE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AX3XjuSniQ/Z9UK8ox1TXq8/5oOFBww7rmAXaD+M3Y9+vnL/4HSzeSXlAkuiEajtcVTyVK6m8hfIrWTh61rrO9HFAUHDFlo16W3S9W3yWpK+8aNp/H/ogn5xksD9BPyvyzwPHnAukZbx0qSUXDA6L/qBkrXkbel6m3DT0hv2/lkFxP84pYtW34q/8e1m6xkgW1ktnWNPjS2FQUHjyWkhN5++XlKj8beteTB+N/gxlETeig9ReSVFUfJf1nXPhqysaOjYyFp9G81s3dkkOAzwx6tGrJQqjxGfrOFMXFES/yfrJVkGaUDl93F6m+Rzda1R+O/IH+bolfCQwYJpjlZ/z2kgtLu0Tco22+TV+KC+yZcdIrSR4ZJ/4H1f//ybuta5aeMB8nW0lS+GodkkuAPyag7KXsPxk5GnRtzozpN+phEKK3JGrt8zR1knV1NBv8GB46Bv5ZPUkwcHs8L8RjZrZ7omEIKpUlu7qgLv8tibGoMFIwEARQcclBwyEHBIQcFhxwUHHJQcMhBwSEHBYccFBxyUHDI+X+c7O7rHvoOpgAAAABJRU5ErkJggg==" /><!-- --></p>
</div>
</div>
<div id="setting-bounds" class="section level3">
<h3>Setting Bounds</h3>
<p>Upon first evaluation of numeric variable distributions, you may find
that you want to assert min and/or max bounds to remove outliers. This
can be done in the config as follows:</p>
<div class="sourceCode" id="cb12"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb12-2"><a href="#cb12-2" aria-hidden="true" tabindex="-1"></a><span class="fu">VAR00004</span><span class="kw">:</span></span>
<span id="cb12-3"><a href="#cb12-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">name</span><span class="kw">:</span><span class="at"> </span><span class="st">"height"</span></span>
<span id="cb12-4"><a href="#cb12-4" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">type</span><span class="kw">:</span><span class="at"> </span><span class="st">"numeric"</span></span>
<span id="cb12-5"><a href="#cb12-5" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">canonical_name</span><span class="kw">:</span><span class="at"> </span><span class="st">"Standing Height (meters)"</span></span>
<span id="cb12-6"><a href="#cb12-6" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">bounds</span><span class="kw">:</span></span>
<span id="cb12-7"><a href="#cb12-7" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">min</span><span class="kw">:</span><span class="at"> </span><span class="fl">1.0</span></span>
<span id="cb12-8"><a href="#cb12-8" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">max</span><span class="kw">:</span><span class="at"> </span><span class="fl">2.2</span></span></code></pre></div>
<p>You can then re-run <code>create.phenotype.report</code> and
re-assess the histogram in the HTML report. You should see that the
bounds have been applied.</p>
<div id="histogram-of-var00004-standing-height-meters-distribution-1" class="section level4">
<h4>Histogram of VAR00004 (Standing Height (meters)) Distribution</h4>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAEgCAMAAABb4lATAAAC3FBMVEUAAAABAQECAgIDAwMEBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4PDw8QEBARERESEhITExMUFBQVFRUWFhYXFxcYGBgaGhobGxscHBwdHR0eHh4fHx8gICAhISEjIyMkJCQlJSUmJiYnJycoKCgqKiorKyssLCwtLS0vLy8wMDAxMTEzMzM0NDQ1NTU2NjY3Nzc4ODg5OTk7Ozs8PDw9PT0+Pj4/Pz9AQEBBQUFCQkJDQ0NERERFRUVGRkZHR0dISEhKSkpLS0tMTExNTU1OTk5PT09QUFBRUVFSUlJTU1NUVFRVVVVWVlZXV1dYWFhZWVlaWlpbW1tcXFxdXV1eXl5gYGBhYWFiYmJjY2NkZGRlZWVmZmZnZ2doaGhpaWlqampra2tsbGxtbW1vb29wcHBxcXFycnJzc3N0dHR1dXV2dnZ3d3d4eHh5eXl6enp7e3t8fHx9fX1+fn5/f3+AgICBgYGCgoKDg4OFhYWG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Ri0b20FlnfRUt3nJ+az+lKK8N/RkKVorfkr/q7xNGRb1UDpn39bC7tMW4YJpN6ntH/kwrvU7ecC9FX+u/lb8YBStF1dDbtLcycn/0dSEpp1PObqAJwd2XZ9Fj5FGtWEl+616Kvt457hQKVoxbz9Ie7/41OURp54XXU7qFPEM1wYWRSKSudBpZSncR/SZSK7nHvaT13UpRsGLoQttHTIoWN5HnKO0ZO57G/4sm5Nsr+ugH5M/aip3kLvcSbb44KhkFK0bvJddQupFoeVFvGP5V9GM7n+zUBD+1bdu2X+j/ce0ierqnFjLHvURnX9yMgtVjCdlDJ13YSenh2KeW3B3/G1w/8uouSo8TfUbFYfI799LWIa+dOnVqIamXMGc7bQaR4Nph91UNWRgt3E+e36Yx8Zym+D9Zq8kySvsuuEUrv0S2uJfui/+AXOnTkYgwiATTnDHLh1RS2jHqGmN5E3k2Lrjn6nOPUzp3WPQ/sN4fXdjhXjr6vxp3k+1lfh4NJ4NJ8Htk5GSqfQZjF6POjL7WHCa9T0KUnhhz8dPrbyQb+yvp4N9g5ej7J/0ixcThDbGK+8ku80LHVFIUHeTmjjz7+9o6/ZQ0UDCiAig44KDggIOCAw4KDjgoOOCg4ICDggMOCg44KDjgoOCA8//yKhq4aZAe4QAAAABJRU5ErkJggg==" /><!-- --></p>
<p>A table will also be emitted that tells you how many values are
excluded by the bounds, as shown here:</p>
<table class="table table-condensed" style="width: auto !important; ">
<caption>
Numeric bounds on VAR00004 (Standing Height (meters))
</caption>
<thead>
<tr>
<th style="text-align:left;">
Type
</th>
<th style="text-align:right;">
Value
</th>
<th style="text-align:right;">
Count
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left;">
minimum
</td>
<td style="text-align:right;">
1.0
</td>
<td style="text-align:right;">
2
</td>
</tr>
<tr>
<td style="text-align:left;">
maximum
</td>
<td style="text-align:right;">
2.2
</td>
<td style="text-align:right;">
1
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="bimodal-numerics" class="section level3">
<h3>Bimodal Numerics</h3>
<p>Sometimes we have seen a bimodal distribution in some numeric
variables. This may be expected, for example in some anthropometric
measurements amongst male/female subjects. However, this can also be
indicative of different collection centers or research associates
collecting data in different units. This will often be evident in the
HTML report generated by <code>create.phenotype.report</code> when
looking at the histogram.</p>
<div class="sourceCode" id="cb13"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb13-2"><a href="#cb13-2" aria-hidden="true" tabindex="-1"></a><span class="fu">VAR00005</span><span class="kw">:</span></span>
<span id="cb13-3"><a href="#cb13-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">name</span><span class="kw">:</span><span class="at"> </span><span class="st">"waist_circumference"</span></span>
<span id="cb13-4"><a href="#cb13-4" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">type</span><span class="kw">:</span><span class="at"> </span><span class="st">"numeric"</span></span>
<span id="cb13-5"><a href="#cb13-5" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">canonical_name</span><span class="kw">:</span><span class="at"> </span><span class="st">"Waist Circumference (centimeters)"</span></span></code></pre></div>
<div id="histogram-of-var00005-waist-circumference-centimeters-distribution" class="section level4">
<h4>Histogram of VAR00005 (Waist Circumference (centimeters))
Distribution</h4>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAEgCAMAAABb4lATAAAC1lBMVEUAAAABAQECAgIDAwMEBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4PDw8QEBARERESEhITExMUFBQVFRUWFhYXFxcYGBgaGhobGxscHBwdHR0eHh4fHx8gICAhISEiIiIjIyMkJCQlJSUmJiYoKCgqKiorKyssLCwtLS0vLy8wMDAxMTEzMzM0NDQ1NTU2NjY3Nzc4ODg5OTk7Ozs8PDw9PT0+Pj4/Pz9AQEBBQUFCQkJDQ0NERERFRUVGRkZHR0dISEhKSkpLS0tMTExNTU1OTk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uk+Yg29qCS/TV2Kt7eHTPPja7ghMwQf7H///qwZRuFB8qdCk5Hntnb9yFpM5lPaeeEYs/wyWZ+6RI8dMUvbyUxfvocLMkMwzR36+6waSqODR8Tqr5PnugSfueq8fZTe19/4Bdbx7YuiqUtNZ40y+9S/jHe8AkCGCH6bZI+m5jn4bKx+asjV3d2kTSRC6aGhX3hy2c3kFafSw+T7L7zwY5Lj31dRJEMEd36FvGGsRg74NB54kGzrvtAxjqwxOrkTss+53twmdalzyfWDBoz4fXuffwO3ZIjgzAWCQw4EhxwIDjkQHHIgOORAcMiB4JADwSEHgkMOBIec/wObTA1EeooM8QAAAABJRU5ErkJggg==" /><!-- --></p>
<p>In this case, perhaps a subset of research associates or sites
collected this data in inches instead of centimeters. You can address
this in one of several ways, including 1) setting an upper or lower
bound, or 2) creating a <a href="derived-variables.html">derived</a>
variable with a more sophisticated operation to attempt to perform a
unit conversion. We explored setting bounds above, so here is an example
of creating a derived variable for this scenario:</p>
<div class="sourceCode" id="cb14"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb14-2"><a href="#cb14-2" aria-hidden="true" tabindex="-1"></a><span class="fu">derived</span><span class="kw">:</span></span>
<span id="cb14-3"><a href="#cb14-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">VAR00005_corrected</span><span class="kw">:</span></span>
<span id="cb14-4"><a href="#cb14-4" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">name</span><span class="kw">:</span><span class="at"> </span><span class="st">"Waist circumference with units harmonized"</span></span>
<span id="cb14-5"><a href="#cb14-5" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">type</span><span class="kw">:</span><span class="at"> </span><span class="st">"numeric"</span></span>
<span id="cb14-6"><a href="#cb14-6" aria-hidden="true" tabindex="-1"></a><span class="fu"> code</span><span class="kw">: </span><span class="ch">|</span></span>
<span id="cb14-7"><a href="#cb14-7" aria-hidden="true" tabindex="-1"></a> res <- VAR00005</span>
<span id="cb14-8"><a href="#cb14-8" aria-hidden="true" tabindex="-1"></a> res[res < 50] <- res[res < 50] * 2.54</span>
<span id="cb14-9"><a href="#cb14-9" aria-hidden="true" tabindex="-1"></a> res</span></code></pre></div>
<p>In the configuration above, we have created a new derived variable
based on the original waist circumference stored in VAR00005. The text
in the <code>code</code> block is executed in an isolated environment
and does not affect the underlying original data. You have access to all
of the variables in the dataset as vectors, labeled as their
user-defined names (e.g. “VAR00005”). Note the pipe symbol following
<code>code:</code> in the example above. The YAML specification defines
a variety of symbols to allow interpretation of multiline strings/
string literals; please see the <a href="https://yaml-multiline.info/">YAML multiline documentation</a> for
more information.</p>
</div>
<div id="histogram-of-var00005_corrected-waist-circumference-with-units-harmonized-distribution" class="section level4">
<h4>Histogram of VAR00005_corrected (Waist circumference with units
harmonized) Distribution</h4>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAEgCAMAAABb4lATAAAC8VBMVEUAAAABAQECAgIDAwMEBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4PDw8QEBARERESEhITExMUFBQVFRUWFhYXFxcYGBgZGRkaGhobGxscHBwdHR0eHh4fHx8gICAhISEiIiIjIyMkJCQlJSUmJiYoKCgpKSkqKiorKyssLCwtLS0vLy8wMDAxMTEyMjIzMzM0NDQ1NTU2NjY3Nzc4ODg5OTk6Ojo7Ozs8PDw9PT0+Pj4/Pz9AQEBBQUFCQkJDQ0NERERFRUVGRkZHR0dISEhJSUlKSkpLS0tMTExNTU1OTk5PT09QUFBRUVFSUlJTU1NUVFRVVVVWVlZXV1dYWFhZWVlaWlpbW1tcXFxdXV1eXl5fX19gYGBhYWFiYmJjY2NkZGRlZWVmZmZnZ2doaGhpaWlqampra2tsbGxtbW1vb29wcHBxcXFycnJzc3N0dHR1dXV2dnZ3d3d4eHh5eXl6enp7e3t8fHx9fX1/f3+AgICBgYGCgoKDg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VfRCP1imQ+nofekgs3okeBb+Hr06Cdbn+w+XPWntVb0LlOFJkurdJQoqj2DsbKs7Ta5UWQXeqezoCw4kF+GpkuZk0GwWdoHD8d4HfpM3Lyn1zHxtH0WfSsJXpqamvqofMWVgVZKBc+ihOBbuLRc2lqEPgjsPQ8tVDYOIvlW+49oDh7TR9qSl3n+/4/QS50FZcGB/ANK/nwQbJo/o2x875Xi52NBR1SndPwNrom5oQXjEsVNAfqf4Fv+/eWLDjvJQ88rG9+hF6RVIXoWj+krbcnLfDQxU6aks6AsOJDvFzwXBJumrMfTJ7rNEzeeQ39PlbizT13HRdZK9DrGvitGS9sfoR3Bt3C99NGLs9DLgZ3XoQnSqqKiBskXc7vRm2rBZ7uN0xaUBQfyTyof3eNBsHniBv61WxHGjf2HK+nP0NsdgttuuKQE46d6iFdg7Xdc2Rh8q+rikdKYerp/4KVwy6XiRXldn4fwiMsk/bPE63SVYPyfvaWP9V1zqgMFZ6NqVb5v4DWtGJ/uB4LN8xWKGYWlc3CFkm4acGPnMGk3EjAuH/jzN5LuR+tCbb2Afv/uu39CHvXOUy8aviZ5RJ8DeNdF//FZymz0GCYE/7PntUm7lva9oz1Q8DU0b0NrIP8vaPSG94bdBoLN47sGbRJXd/Y67c94DmV0ftExFm0RB7nxMb1vkcoE3/KtvqVvr+F/JV+BtfvuS2JGZYkb6ff9pOdvEttIwTjzj/16XfviOVXBit/1ua4hkN/+6qCLh65ZjgpsjkJwXC0YCA0IjnJAcJQDgtV8iTp5MtJtsQgQrOZcficWvKLKEYDgKAcERzkgOMoBwVEOCI5yQHCU8/9vh9qb4ufSxgAAAABJRU5ErkJggg==" /><!-- --></p>
</div>
</div>
<div id="categorical-variables" class="section level3">
<h3>Categorical Variables</h3>
<p>Categorical variables are useful when you have a variable with a
relatively small set of possible response values. One example could be
sex, as shown below. Sometimes categorical variables are well-structured
and conform easily to specific levels; other times you may find a wide
variety of values that could be sorted into categorical levels. You can
use alternate patterns, which are treated as <a href="https://r4ds.had.co.nz/strings.html#matching-patterns-with-regular-expressions">regular
expressions</a>, to set definitions for levels.</p>
<div class="sourceCode" id="cb15"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb15-2"><a href="#cb15-2" aria-hidden="true" tabindex="-1"></a><span class="fu">VAR00006</span><span class="kw">:</span></span>
<span id="cb15-3"><a href="#cb15-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">name</span><span class="kw">:</span><span class="at"> </span><span class="st">"sex"</span></span>
<span id="cb15-4"><a href="#cb15-4" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">canonical_name</span><span class="kw">:</span><span class="at"> </span><span class="st">"Sex"</span></span>
<span id="cb15-5"><a href="#cb15-5" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">type</span><span class="kw">:</span><span class="at"> </span><span class="st">"categorical"</span></span>