-
Notifications
You must be signed in to change notification settings - Fork 51
/
Pop_Structure.html
968 lines (894 loc) · 43.1 KB
/
Pop_Structure.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<title>Population structure: G_{ST}, genetic distance, and clustering</title>
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/sandstone.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<script src="site_libs/navigation-1.1/tabsets.js"></script>
<script src="site_libs/accessible-code-block-0.0.1/empty-anchor.js"></script>
<link href="site_libs/anchor-sections-1.0/anchor-sections.css" rel="stylesheet" />
<script src="site_libs/anchor-sections-1.0/anchor-sections.js"></script>
<!-- Global Site Tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-107144798-3"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments)};
gtag('js', new Date());
gtag('config', 'UA-107144798-3');
</script>
<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;}</style>
<style type="text/css" data-origin="pandoc">
code.sourceCode > span { display: inline-block; line-height: 1.25; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode { white-space: pre; position: relative; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
code.sourceCode { white-space: pre-wrap; }
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
{ background-color: #f8f8f8; }
@media screen {
code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span.al { color: #ef2929; } /* Alert */
code span.an { color: #8f5902; font-weight: bold; font-style: italic; } /* Annotation */
code span.at { color: #c4a000; } /* Attribute */
code span.bn { color: #0000cf; } /* BaseN */
code span.cf { color: #204a87; font-weight: bold; } /* ControlFlow */
code span.ch { color: #4e9a06; } /* Char */
code span.cn { color: #000000; } /* Constant */
code span.co { color: #8f5902; font-style: italic; } /* Comment */
code span.cv { color: #8f5902; font-weight: bold; font-style: italic; } /* CommentVar */
code span.do { color: #8f5902; font-weight: bold; font-style: italic; } /* Documentation */
code span.dt { color: #204a87; } /* DataType */
code span.dv { color: #0000cf; } /* DecVal */
code span.er { color: #a40000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #0000cf; } /* Float */
code span.fu { color: #000000; } /* Function */
code span.im { } /* Import */
code span.in { color: #8f5902; font-weight: bold; font-style: italic; } /* Information */
code span.kw { color: #204a87; font-weight: bold; } /* Keyword */
code span.op { color: #ce5c00; font-weight: bold; } /* Operator */
code span.ot { color: #8f5902; } /* Other */
code span.pp { color: #8f5902; font-style: italic; } /* Preprocessor */
code span.sc { color: #000000; } /* SpecialChar */
code span.ss { color: #4e9a06; } /* SpecialString */
code span.st { color: #4e9a06; } /* String */
code span.va { color: #000000; } /* Variable */
code span.vs { color: #4e9a06; } /* VerbatimString */
code span.wa { color: #8f5902; 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">
pre:not([class]) {
background-color: white;
}
</style>
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
<link rel="stylesheet" href="styles.css" type="text/css" />
<style type = "text/css">
.main-container {
max-width: 940px;
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
}
.tabbed-pane {
padding-top: 12px;
}
.html-widget {
margin-bottom: 20px;
}
button.code-folding-btn:focus {
outline: none;
}
summary {
display: list-item;
}
</style>
<style type="text/css">
/* padding for bootstrap navbar */
body {
padding-top: 61px;
padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar) */
.section h1 {
padding-top: 66px;
margin-top: -66px;
}
.section h2 {
padding-top: 66px;
margin-top: -66px;
}
.section h3 {
padding-top: 66px;
margin-top: -66px;
}
.section h4 {
padding-top: 66px;
margin-top: -66px;
}
.section h5 {
padding-top: 66px;
margin-top: -66px;
}
.section h6 {
padding-top: 66px;
margin-top: -66px;
}
.dropdown-submenu {
position: relative;
}
.dropdown-submenu>.dropdown-menu {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
border-radius: 0 6px 6px 6px;
}
.dropdown-submenu:hover>.dropdown-menu {
display: block;
}
.dropdown-submenu>a:after {
display: block;
content: " ";
float: right;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 5px 0 5px 5px;
border-left-color: #cccccc;
margin-top: 5px;
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #ffffff;
}
.dropdown-submenu.pull-left {
float: none;
}
.dropdown-submenu.pull-left>.dropdown-menu {
left: -100%;
margin-left: 10px;
border-radius: 6px 0 6px 6px;
}
</style>
<script>
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
href = window.location.pathname
href = href.substr(href.lastIndexOf('/') + 1)
if (href === "")
href = "index.html";
var menuAnchor = $('a[href="' + href + '"]');
// mark it active
menuAnchor.parent().addClass('active');
// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
});
</script>
<!-- tabsets -->
<style type="text/css">
.tabset-dropdown > .nav-tabs {
display: inline-table;
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}
.tabset-dropdown > .nav-tabs > li.active:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}
.tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before {
content: "";
border: none;
}
.tabset-dropdown > .nav-tabs.nav-tabs-open:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}
.tabset-dropdown > .nav-tabs > li.active {
display: block;
}
.tabset-dropdown > .nav-tabs > li > a,
.tabset-dropdown > .nav-tabs > li > a:focus,
.tabset-dropdown > .nav-tabs > li > a:hover {
border: none;
display: inline-block;
border-radius: 4px;
background-color: transparent;
}
.tabset-dropdown > .nav-tabs.nav-tabs-open > li {
display: block;
float: none;
}
.tabset-dropdown > .nav-tabs > li {
display: none;
}
</style>
<!-- code folding -->
</head>
<body>
<div class="container-fluid main-container">
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">Population genetics and genomics in R</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="TOC.html">Table of contents</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
Part I
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="Introduction.html">Introduction</a>
</li>
<li>
<a href="Getting_ready_to_use_R.html">Getting ready to use R</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
Part II
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="Data_Preparation.html">Data preparation</a>
</li>
<li>
<a href="First_Steps.html">First steps</a>
</li>
<li>
<a href="Population_Strata.html">Population strata and clone correction</a>
</li>
<li>
<a href="Locus_Stats.html">Locus-based statistics and missing data</a>
</li>
<li>
<a href="Genotypic_EvenRichDiv.html">Genotypic evenness, richness, and diversity</a>
</li>
<li>
<a href="Linkage_disequilibrium.html">Linkage disequilibrium</a>
</li>
<li>
<a href="Pop_Structure.html">Population structure</a>
</li>
<li>
<a href="Minimum_Spanning_Networks.html">Minimum Spanning Networks</a>
</li>
<li>
<a href="AMOVA.html">AMOVA</a>
</li>
<li>
<a href="DAPC.html">Discriminant analysis of principal components (DAPC)</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
Part III
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="intro_vcf.html">Population genomics and HTS</a>
</li>
<li>
<a href="reading_vcf.html">Reading VCF data</a>
</li>
<li>
<a href="analysis_of_genome.html">Analysis of genomic data</a>
</li>
<li>
<a href="gbs_analysis.html">Analysis of GBS data</a>
</li>
<li>
<a href="clustering_plot.html">Clustering plot</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
Workshops
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li class="dropdown-submenu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">ICPP</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="workshop_icpp.html">Preparation</a>
</li>
<li>
<a href="intro_vcf.html">Introduction</a>
</li>
<li>
<a href="reading_vcf.html">VCF data</a>
</li>
<li>
<a href="quality_control.html">Quality control</a>
</li>
<li>
<a href="gbs_analysis.html">Analysis of GBS data</a>
</li>
<li>
<a href="analysis_of_genome.html">Analysis of genome data</a>
</li>
</ul>
</li>
<li class="dropdown-submenu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">APS Southern Division</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="workshop_southernAPS.html">Preparation</a>
</li>
<li>
<a href="intro_vcf.html">Introduction</a>
</li>
<li>
<a href="reading_vcf.html">VCF data</a>
</li>
<li>
<a href="quality_control.html">Quality control</a>
</li>
<li>
<a href="gbs_analysis.html">Analysis of GBS data</a>
</li>
</ul>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
About
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="Authors.html">Authors</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
Appendices
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="intro_to_R.html">Introduction to R</a>
</li>
<li>
<a href="Data_sets.html">Data sets</a>
</li>
<li>
<a href="funpendix.html">Function glossary</a>
</li>
<li>
<a href="background_functions.html">Background_functions</a>
</li>
<li>
<a href="https://github.com/grunwaldlab/Population_Genetics_in_R/">Source Code</a>
</li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
<div class="fluid-row" id="header">
<h1 class="title toc-ignore">Population structure: <span class="math inline">\(G_{ST}\)</span>, genetic distance, and clustering</h1>
<h3 class="subtitle"><em>ZN Kamvar, SE Everhart and NJ Grünwald</em></h3>
</div>
<p>In this chapter we explore various ways of assessing if population are structured (e.g., differentiated). You can think of population structure as identifying clusters or groups of more closely related individuals resulting from reduced gene flow among these groups. Populations can be studied to determine if they are structured by using, for example, population differentiation summary statistics (e.g. <span class="math inline">\(G_{ST}\)</span>), clustering or <a href="Minimum_Spanning_Networks.html">minimum spanning networks</a>. Note, that this chapter will utilize many data sets due to the unique features offered by each. Let’s first look at an example of population differentiation based on <span class="math inline">\(G_{ST}\)</span>.</p>
<div id="g_st-an-example-with-felis-catus-data." class="section level2">
<h2><span class="math inline">\(G_{ST}\)</span> an example with <em>Felis catus</em> data.</h2>
<p>Assessing genetic diversity almost always starts with an analysis of a parameter such as <span class="math inline">\(G_{ST}\)</span>. There are <a href="http://www.molecularecologist.com/2011/03/should-i-use-fst-gst-or-d-2/">lengthy debates</a> as to what measure of differentiation is better <span class="citation">(Meirmans & Hedrick, 2011)</span>. Instead of going into that lengthy debate, it would be more worthwhile to point you into the direction of a package dedicated to Modern Methods of Differentiation called <em>mmod</em>. We will use the data set <em>nancycats</em> containing 17 colonies of cats collected from Nancy, France. As cats tend to stay within small groups, we expect to see some population differentiation. In terms of these diversity measures, an index of <span class="math inline">\(G_{ST} = 0\)</span> indicates no differentiation, whereas <span class="math inline">\(G_{ST} = 1\)</span> indicates that populations are segregating for differing alleles.</p>
<p>Let’s load the package and the example data set:</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb1-1"><a href="#cb1-1"></a><span class="kw">library</span>(<span class="st">"mmod"</span>)</span>
<span id="cb1-2"><a href="#cb1-2"></a><span class="kw">data</span>(<span class="st">"nancycats"</span>)</span>
<span id="cb1-3"><a href="#cb1-3"></a>nancycats</span></code></pre></div>
<pre><code>## /// GENIND OBJECT /////////
##
## // 237 individuals; 9 loci; 108 alleles; size: 150.5 Kb
##
## // Basic content
## @tab: 237 x 108 matrix of allele counts
## @loc.n.all: number of alleles per locus (range: 8-18)
## @loc.fac: locus factor for the 108 columns of @tab
## @all.names: list of allele names for each locus
## @ploidy: ploidy of each individual (range: 2-2)
## @type: codom
## @call: genind(tab = truenames(nancycats)$tab, pop = truenames(nancycats)$pop)
##
## // Optional content
## @pop: population of each individual (group size range: 9-23)
## @other: a list containing: xy</code></pre>
<p>Now we will use Hendrick’s standardized <span class="math inline">\(G_{ST}\)</span> to assess population structure among these populations <span class="citation">(Hedrick, 2005)</span>.</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb3-1"><a href="#cb3-1"></a><span class="kw">Gst_Hedrick</span>(nancycats)</span></code></pre></div>
<pre><code>## $per.locus
## fca8 fca23 fca43 fca45 fca77 fca78 fca90 fca96
## 0.4750445 0.2956688 0.2675766 0.2653163 0.4855829 0.1933327 0.3807578 0.3913924
## fca37
## 0.1609576
##
## $global
## [1] 0.3084895</code></pre>
<p>What does this output tell us?</p>
<p>Next we will look at genetic distance to find related groups of individuals.</p>
</div>
<div id="genetic-distance" class="section level2">
<h2>Genetic Distance</h2>
<p>If we wanted to analyze the relationship between individuals or populations, we would use genetic distance measures which calculate the “distance” between samples based on their genetic profile. These distances can be visualized with heatmaps, dendrograms, or minimum spanning networks. In the package <em>poppr</em>, there are several distances available:</p>
<table>
<thead>
<tr class="header">
<th>Distance</th>
<th>Function</th>
<th>Marker type</th>
<th>Can handle missing data</th>
<th></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Bruvo’s distance</td>
<td><code>bruvo.dist</code></td>
<td>microsatellite</td>
<td>yes</td>
<td></td>
</tr>
<tr class="even">
<td>Edwards’ distance</td>
<td><code>edwards.dist</code></td>
<td>any</td>
<td>no</td>
<td></td>
</tr>
<tr class="odd">
<td>Nei’s distance</td>
<td><code>nei.dist</code></td>
<td>any</td>
<td>no</td>
<td></td>
</tr>
<tr class="even">
<td>Provesti’s distance</td>
<td><code>provesti.dist</code></td>
<td>any</td>
<td>yes</td>
<td></td>
</tr>
<tr class="odd">
<td>Reynolds’ distance</td>
<td><code>reynolds.dist</code></td>
<td>any</td>
<td>no</td>
<td></td>
</tr>
<tr class="even">
<td>Rogers’ distance</td>
<td><code>rogers.dist</code></td>
<td>any</td>
<td>no</td>
<td></td>
</tr>
<tr class="odd">
<td>Provesti’s distance</td>
<td><code>bitwise.dist</code></td>
<td>SNP</td>
<td>yes</td>
<td></td>
</tr>
</tbody>
</table>
<p>One common way to visualize a genetic distance is with a dendrogram. For this example, we will use the <em>microbov</em> data set <span class="citation">(Laloe et al., 2007)</span>. This contains information on 704 cattle from both Africa and France over several different breeds. We can create a dendrogram over all 704 samples, but that would be difficult to visualize. For our purposes, let’s take ten random samples and calculate Provesti’s distance, which will return the fraction of the number of differences between samples:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb5-1"><a href="#cb5-1"></a><span class="kw">library</span>(<span class="st">"poppr"</span>)</span>
<span id="cb5-2"><a href="#cb5-2"></a><span class="kw">library</span>(<span class="st">"ape"</span>) <span class="co"># To visualize the tree using the "nj" function</span></span>
<span id="cb5-3"><a href="#cb5-3"></a><span class="kw">library</span>(<span class="st">"magrittr"</span>)</span>
<span id="cb5-4"><a href="#cb5-4"></a><span class="kw">data</span>(microbov)</span>
<span id="cb5-5"><a href="#cb5-5"></a><span class="kw">set.seed</span>(<span class="dv">10</span>)</span>
<span id="cb5-6"><a href="#cb5-6"></a>ten_samples <-<span class="st"> </span><span class="kw">sample</span>(<span class="kw">nInd</span>(microbov), <span class="dv">10</span>)</span>
<span id="cb5-7"><a href="#cb5-7"></a>mic10 <-<span class="st"> </span>microbov[ten_samples]</span>
<span id="cb5-8"><a href="#cb5-8"></a>(micdist <-<span class="st"> </span><span class="kw">provesti.dist</span>(mic10))</span></code></pre></div>
<pre><code>## FRBTGAS9057 FRBTMBE1540 FRBTBDA29852 FRBTBDA35267 FRBTCHA26798
## FRBTMBE1540 0.6000000
## FRBTBDA29852 0.6166667 0.5666667
## FRBTBDA35267 0.6333333 0.5666667 0.5666667
## FRBTCHA26798 0.5666667 0.4000000 0.5500000 0.4666667
## FRBTCHA26014 0.4500000 0.4333333 0.4666667 0.4666667 0.4500000
## FRBTMA25418 0.7500000 0.7000000 0.7666667 0.6833333 0.5500000
## FRBTCHA26011 0.5166667 0.4666667 0.5333333 0.5333333 0.3833333
## FRBTCHA15985 0.5666667 0.5666667 0.6666667 0.6166667 0.4500000
## FRBTGAS9186 0.6166667 0.5500000 0.5833333 0.5333333 0.4666667
## FRBTCHA26014 FRBTMA25418 FRBTCHA26011 FRBTCHA15985
## FRBTMBE1540
## FRBTBDA29852
## FRBTBDA35267
## FRBTCHA26798
## FRBTCHA26014
## FRBTMA25418 0.5666667
## FRBTCHA26011 0.4166667 0.5833333
## FRBTCHA15985 0.4333333 0.6000000 0.4166667
## FRBTGAS9186 0.4000000 0.7000000 0.5500000 0.5833333</code></pre>
<p>The above represents the pairwise distances between these 10 samples. We will use this distance matrix to create a neighbor-joining tree.</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb7-1"><a href="#cb7-1"></a>theTree <-<span class="st"> </span>micdist <span class="op">%>%</span></span>
<span id="cb7-2"><a href="#cb7-2"></a><span class="st"> </span><span class="kw">nj</span>() <span class="op">%>%</span><span class="st"> </span><span class="co"># calculate neighbor-joining tree</span></span>
<span id="cb7-3"><a href="#cb7-3"></a><span class="st"> </span><span class="kw">ladderize</span>() <span class="co"># organize branches by clade</span></span>
<span id="cb7-4"><a href="#cb7-4"></a><span class="kw">plot</span>(theTree)</span>
<span id="cb7-5"><a href="#cb7-5"></a><span class="kw">add.scale.bar</span>(<span class="dt">length =</span> <span class="fl">0.05</span>) <span class="co"># add a scale bar showing 5% difference.</span></span></code></pre></div>
<p><img src="Pop_Structure_files/figure-html/cattleplot-1.png" width="700px" /></p>
<p>Notice that the sample names start with either “AF” or “FR”. This indicates their country of origin and we are seeing that the populations cluster correspondingly. Of course, a tree is a hypothesis and one way of generating support is to bootstrap loci. This can be achieved with the <em>poppr</em> function <code>aboot</code>.</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb8-1"><a href="#cb8-1"></a><span class="kw">set.seed</span>(<span class="dv">999</span>)</span>
<span id="cb8-2"><a href="#cb8-2"></a><span class="kw">aboot</span>(mic10, <span class="dt">dist =</span> provesti.dist, <span class="dt">sample =</span> <span class="dv">200</span>, <span class="dt">tree =</span> <span class="st">"nj"</span>, <span class="dt">cutoff =</span> <span class="dv">50</span>, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</span></code></pre></div>
<p><img src="Pop_Structure_files/figure-html/cattleboot-1.png" width="700px" /></p>
<pre><code>##
## Phylogenetic tree with 10 tips and 8 internal nodes.
##
## Tip labels:
## FRBTGAS9057, FRBTMBE1540, FRBTBDA29852, FRBTBDA35267, FRBTCHA26798, FRBTCHA26014, ...
## Node labels:
## 100, NA, NA, NA, NA, NA, ...
##
## Unrooted; includes branch lengths.</code></pre>
<p>The bootstrap value of 100 on the node separating the French and African samples gives support that the country of origin is a factor in how these breeds are structured. If we wanted to analyze all of the breeds against one another, it would be better to create a bootstrapped dendrogram based on a genetic distance. To do this, we will add 3 stratifications to the microbov data set: Country, Breed, and Species. We will then set the population to Country by Breed, convert the data to a genpop object and then create a tree using <code>aboot</code> with Nei’s genetic distance.</p>
<div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb10-1"><a href="#cb10-1"></a><span class="co"># Setting up the data</span></span>
<span id="cb10-2"><a href="#cb10-2"></a><span class="kw">strata</span>(microbov) <-<span class="st"> </span><span class="kw">data.frame</span>(<span class="kw">other</span>(microbov))</span>
<span id="cb10-3"><a href="#cb10-3"></a>microbov</span></code></pre></div>
<pre><code>## /// GENIND OBJECT /////////
##
## // 704 individuals; 30 loci; 373 alleles; size: 1.1 Mb
##
## // Basic content
## @tab: 704 x 373 matrix of allele counts
## @loc.n.all: number of alleles per locus (range: 5-22)
## @loc.fac: locus factor for the 373 columns of @tab
## @all.names: list of allele names for each locus
## @ploidy: ploidy of each individual (range: 2-2)
## @type: codom
## @call: genind(tab = truenames(microbov)$tab, pop = truenames(microbov)$pop)
##
## // Optional content
## @pop: population of each individual (group size range: 30-61)
## @strata: a data frame with 3 columns ( coun, breed, spe )
## @other: a list containing: coun breed spe</code></pre>
<div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb12-1"><a href="#cb12-1"></a><span class="kw">nameStrata</span>(microbov) <-<span class="st"> </span><span class="er">~</span>Country<span class="op">/</span>Breed<span class="op">/</span>Species</span>
<span id="cb12-2"><a href="#cb12-2"></a></span>
<span id="cb12-3"><a href="#cb12-3"></a><span class="co"># Analysis</span></span>
<span id="cb12-4"><a href="#cb12-4"></a><span class="kw">set.seed</span>(<span class="dv">999</span>)</span>
<span id="cb12-5"><a href="#cb12-5"></a>microbov <span class="op">%>%</span></span>
<span id="cb12-6"><a href="#cb12-6"></a><span class="st"> </span><span class="kw">genind2genpop</span>(<span class="dt">pop =</span> <span class="op">~</span>Country<span class="op">/</span>Breed) <span class="op">%>%</span></span>
<span id="cb12-7"><a href="#cb12-7"></a><span class="st"> </span><span class="kw">aboot</span>(<span class="dt">cutoff =</span> <span class="dv">50</span>, <span class="dt">quiet =</span> <span class="ot">TRUE</span>, <span class="dt">sample =</span> <span class="dv">1000</span>, <span class="dt">distance =</span> nei.dist)</span></code></pre></div>
<pre><code>##
## Converting data from a genind to a genpop object...
##
## ...done.</code></pre>
<p><img src="Pop_Structure_files/figure-html/cattlepopboot-1.png" width="700px" /></p>
<pre><code>##
## Phylogenetic tree with 15 tips and 14 internal nodes.
##
## Tip labels:
## AF_Borgou, AF_Zebu, AF_Lagunaire, AF_NDama, AF_Somba, FR_Aubrac, ...
## Node labels:
## 100, 100, 99.8, 91.2, 91.1, 65.5, ...
##
## Rooted; includes branch lengths.</code></pre>
<p>Now we can see that, in all 1,000 bootstrapped trees, the African and French samples were each in separate clades. Of course, dendrograms are only one type of analysis you can use genetic distances for. Below is a table describing some of the different analyses for which you can utilize genetic distance:</p>
<table>
<colgroup>
<col width="23%" />
<col width="29%" />
<col width="23%" />
<col width="23%" />
</colgroup>
<thead>
<tr class="header">
<th>Analysis</th>
<th>Function</th>
<th>Package</th>
<th>Note</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Bootstrapped dendrograms</td>
<td><code>aboot</code></td>
<td><em>poppr</em></td>
<td></td>
</tr>
<tr class="even">
<td>Mantel Test</td>
<td><code>mantel.randtest</code></td>
<td><em>ade4</em></td>
<td>To be used with geographic distance matrix</td>
</tr>
<tr class="odd">
<td>Principle Coordinates Analysis</td>
<td><code>cmdscale</code></td>
<td><em>stats</em></td>
<td></td>
</tr>
<tr class="even">
<td><a href="DAPC.html">DAPC</a></td>
<td><code>dapc</code></td>
<td><em>adegenet</em></td>
<td>Convert to matrix with <code>as.matrix</code></td>
</tr>
<tr class="odd">
<td><a href="Minimum_Spanning_Networks.html">Minimum Spanning Networks</a></td>
<td><code>poppr.msn</code></td>
<td><em>poppr</em></td>
<td>requires a distance matrix; cannot handle genpop</td>
</tr>
</tbody>
</table>
</div>
<div id="k-means-hierarchical-clustering" class="section level2">
<h2>K-means hierarchical clustering</h2>
<p>A recent study reported that the origin of the potato late blight pathogen <em>Phytophthora infestans</em> lies in Mexico as opposed to South America <span class="citation">(Goss et al., 2014)</span>. We saw in the previous chapter that South American populations showed signatures of clonal reproduction while Mexican populations showed no evidence rejecting the null hypothesis of random mating. In this section, we will use K-means clustering in combination with bootstrapped dendrograms to see how well this pattern holds up. Clonal populations should have short terminal branch lengths and should cluster according to those branches. Panmictic populations will show no clear pattern. Let’s look at the data:</p>
<div class="sourceCode" id="cb15"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb15-1"><a href="#cb15-1"></a><span class="kw">library</span>(<span class="st">"poppr"</span>)</span>
<span id="cb15-2"><a href="#cb15-2"></a><span class="kw">data</span>(<span class="st">"Pinf"</span>)</span>
<span id="cb15-3"><a href="#cb15-3"></a>Pinf</span></code></pre></div>
<pre><code>##
## This is a genclone object
## -------------------------
## Genotype information:
##
## 72 multilocus genotypes
## 86 tetraploid individuals
## 11 codominant loci
##
## Population information:
##
## 2 strata - Continent, Country
## 2 populations defined - South America, North America</code></pre>
<p>First, we will perform a cluster analysis:</p>
<div class="sourceCode" id="cb17"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb17-1"><a href="#cb17-1"></a>MX <-<span class="st"> </span><span class="kw">popsub</span>(Pinf, <span class="st">"North America"</span>)</span>
<span id="cb17-2"><a href="#cb17-2"></a>MXclust <-<span class="st"> </span><span class="kw">find.clusters</span>(MX)</span></code></pre></div>
<div class="figure">
<img src="Pop_Structure_files/figure-html/MXPCA.png" alt="" />
<p class="caption">MX_PCA</p>
</div>
<pre><code>## Choose the number PCs to retain (>=1):</code></pre>
<pre><code>> 50</code></pre>
<p>PC stands for principal components, which are unit-less transformations of your data that explain the variance observed. For the purposes of <code>find.clusters</code>, we can keep as many as we want.</p>
<div class="figure">
<img src="Pop_Structure_files/figure-html/MXCLUST.png" alt="" />
<p class="caption">MX_CLUSTER</p>
</div>
<pre><code>## Choose the number clusters (>=2):</code></pre>
<pre><code>> 3</code></pre>
<p>BIC stands for “Bayesian Information Criterion”. The lower the BIC value, the better. On the x axis are the number of clusters. We see that there is a bend at 3 clusters, indicating that the data clusters optimally into three groups.</p>
<p>Note that the function <code>find.clusters()</code> includes the parameter <code>max.n.clust</code> which specifies the maximum number of clusters to explore. The default value is <code>round(sample_size/10)</code>. If you would like to explore a higher level of groups relative to your sample size you should consider reparameterizing this value.</p>
<p>And now we can see the cluster assignments:</p>
<div class="sourceCode" id="cb22"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb22-1"><a href="#cb22-1"></a>MXclust</span></code></pre></div>
<pre><code>## $Kstat
## NULL
##
## $stat
## NULL
##
## $grp
## PiMX01 PiMX02 PiMX03 PiMX04 PiMX05 PiMX06 PiMX07 PiMX10 PiMX11 PiMX12
## 3 3 2 1 1 1 1 2 2 1
## PiMX13 PiMX14 PiMX15 PiMX16 PiMX17 PiMX18 PiMX19 PiMX20 PiMX21 PiMX22
## 2 2 3 2 3 1 1 1 3 2
## PiMX23 PiMX24 PiMX25 PiMX26 PiMX27 PiMX28 PiMX29 PiMX30 PiMX40 PiMX41
## 3 2 1 3 2 2 1 2 2 3
## PiMX42 PiMX43 PiMX44 PiMX45 PiMX46 PiMX47 PiMX48 PiMX49 PiMX50 PiMXT01
## 3 3 3 3 3 3 2 2 2 3
## PiMXT02 PiMXT03 PiMXT04 PiMXT05 PiMXT06 PiMXT07 PiMXt48 PiMXt68
## 3 1 1 3 1 1 1 1
## Levels: 1 2 3
##
## $size
## [1] 16 15 17</code></pre>
<p>We will go through the same procedure for the South American population.</p>
<div class="sourceCode" id="cb24"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb24-1"><a href="#cb24-1"></a>SA <-<span class="st"> </span><span class="kw">popsub</span>(Pinf, <span class="st">"South America"</span>)</span>
<span id="cb24-2"><a href="#cb24-2"></a>SAclust <-<span class="st"> </span><span class="kw">find.clusters</span>(SA)</span></code></pre></div>
<div class="figure">
<img src="Pop_Structure_files/figure-html/SAPCA.png" alt="" />
<p class="caption">SA_PCA</p>
</div>
<pre><code>## Choose the number PCs to retain (>=1):</code></pre>
<pre><code>> 30</code></pre>
<div class="figure">
<img src="Pop_Structure_files/figure-html/SACLUST.png" alt="" />
<p class="caption">SA_CLUSTER</p>
</div>
<pre><code>## Choose the number clusters (>=2):</code></pre>
<pre><code>> 4</code></pre>
<p>Notice here that there is no local minimum in the curve. This indicates that there <a href="http://lists.r-forge.r-project.org/pipermail/adegenet-forum/2011-June/000303.html">might not be enough information in the data set to properly cluster</a>, or that you might have more clusters than the default value (in which case you may wish to include n.max.clust as an argument to the find.clusters function, and specify a higher value than the default). We will go ahead by choosing the highest number of clusters:</p>
<div id="trees" class="section level3">
<h3>Trees</h3>
<p>Now we will build trees. We are using Bruvo’s distance since polyploids bias calculation of other distances:</p>
<div class="sourceCode" id="cb29"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb29-1"><a href="#cb29-1"></a>pinfreps <-<span class="st"> </span><span class="kw">c</span>(<span class="dv">2</span>, <span class="dv">2</span>, <span class="dv">6</span>, <span class="dv">2</span>, <span class="dv">2</span>, <span class="dv">2</span>, <span class="dv">2</span>, <span class="dv">2</span>, <span class="dv">3</span>, <span class="dv">3</span>, <span class="dv">2</span>)</span>
<span id="cb29-2"><a href="#cb29-2"></a>MXtree <-<span class="st"> </span><span class="kw">bruvo.boot</span>(MX, <span class="dt">replen =</span> pinfreps, <span class="dt">cutoff =</span> <span class="dv">50</span>, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</span></code></pre></div>
<p><img src="Pop_Structure_files/figure-html/trees-1.png" width="700px" /></p>
<div class="sourceCode" id="cb30"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb30-1"><a href="#cb30-1"></a>SAtree <-<span class="st"> </span><span class="kw">bruvo.boot</span>(SA, <span class="dt">replen =</span> pinfreps, <span class="dt">cutoff =</span> <span class="dv">50</span>, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</span></code></pre></div>
<p><img src="Pop_Structure_files/figure-html/trees-2.png" width="700px" /></p>
<p>We see very long terminal branches in the MX tree. Let’s see how the groups we found with the clustering algorithm match up:</p>
<div class="sourceCode" id="cb31"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb31-1"><a href="#cb31-1"></a><span class="kw">library</span>(<span class="st">"ape"</span>)</span>
<span id="cb31-2"><a href="#cb31-2"></a>cols <-<span class="st"> </span><span class="kw">rainbow</span>(<span class="dv">4</span>)</span>
<span id="cb31-3"><a href="#cb31-3"></a><span class="kw">plot.phylo</span>(MXtree, <span class="dt">cex =</span> <span class="fl">0.8</span>, <span class="dt">font =</span> <span class="dv">2</span>, <span class="dt">adj =</span> <span class="dv">0</span>, <span class="dt">tip.color =</span> cols[MXclust<span class="op">$</span>grp],</span>
<span id="cb31-4"><a href="#cb31-4"></a> <span class="dt">label.offset =</span> <span class="fl">0.0125</span>)</span>
<span id="cb31-5"><a href="#cb31-5"></a><span class="kw">nodelabels</span>(MXtree<span class="op">$</span>node.label, <span class="dt">adj =</span> <span class="kw">c</span>(<span class="fl">1.3</span>, <span class="fl">-0.5</span>), <span class="dt">frame =</span> <span class="st">"n"</span>, <span class="dt">cex =</span> <span class="fl">0.8</span>,</span>
<span id="cb31-6"><a href="#cb31-6"></a> <span class="dt">font =</span> <span class="dv">3</span>, <span class="dt">xpd =</span> <span class="ot">TRUE</span>)</span>
<span id="cb31-7"><a href="#cb31-7"></a><span class="kw">axisPhylo</span>(<span class="dv">3</span>)</span></code></pre></div>
<p><img src="Pop_Structure_files/figure-html/grouptree-1.png" width="700px" /></p>
<p>You can see that the assigned clusters don’t necessarily group with the dendrogram clusters. Let’s see what happens when we view this with the South American population:</p>
<div class="sourceCode" id="cb32"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb32-1"><a href="#cb32-1"></a><span class="kw">plot.phylo</span>(SAtree, <span class="dt">cex =</span> <span class="fl">0.8</span>, <span class="dt">font =</span> <span class="dv">2</span>, <span class="dt">adj =</span> <span class="dv">0</span>, <span class="dt">tip.color =</span> cols[SAclust<span class="op">$</span>grp],</span>
<span id="cb32-2"><a href="#cb32-2"></a> <span class="dt">label.offset =</span> <span class="fl">0.0125</span>)</span>
<span id="cb32-3"><a href="#cb32-3"></a><span class="kw">nodelabels</span>(SAtree<span class="op">$</span>node.label, <span class="dt">adj =</span> <span class="kw">c</span>(<span class="fl">1.3</span>, <span class="fl">-0.5</span>), <span class="dt">frame =</span> <span class="st">"n"</span>, <span class="dt">cex =</span> <span class="fl">0.8</span>,</span>
<span id="cb32-4"><a href="#cb32-4"></a> <span class="dt">font =</span> <span class="dv">3</span>, <span class="dt">xpd =</span> <span class="ot">TRUE</span>)</span>
<span id="cb32-5"><a href="#cb32-5"></a><span class="kw">axisPhylo</span>(<span class="dv">3</span>)</span></code></pre></div>
<p><img src="Pop_Structure_files/figure-html/grouptreeSA-1.png" width="700px" /></p>
<p>Everything clusters together nicely, further supporting a non-panmictic population.</p>
</div>
</div>
<div id="references" class="section level2 unnumbered">
<h2>References</h2>
<div id="refs" class="references">
<div id="ref-goss2014irish">
<p>Goss EM., Tabima JF., Cooke DEL., Restrepo S., Fry WE., Forbes GA., Fieland VJ., Cardenas M., Grünwald NJ. 2014. The Irish potato famine pathogen <em>phytophthora infestans</em> originated in central mexico rather than the andes. <em>Proceedings of the National Academy of Sciences</em> 111:8791–8796. Available at: <a href="http://www.pnas.org/content/early/2014/05/29/1401884111.abstract">http://www.pnas.org/content/early/2014/05/29/1401884111.abstract</a></p>
</div>
<div id="ref-hedrick2005standardized">
<p>Hedrick PW. 2005. A standardized genetic differentiation measure. <em>Evolution</em> 59:1633–1638. Available at: <a href="http://dx.doi.org/10.1111/j.0014-3820.2005.tb01814.x">http://dx.doi.org/10.1111/j.0014-3820.2005.tb01814.x</a></p>
</div>
<div id="ref-laloe2007consensus">
<p>Laloe D., Jombart T., Dufour A-B., Moazami-Goudarzi K. 2007. Consensus genetic structuring and typological value of markers using multiple co-inertia analysis. <em>Genetics Selection Evolution</em> 39:545–567. Available at: <a href="http://dx.doi.org/10.1051/gse:2007021">http://dx.doi.org/10.1051/gse:2007021</a></p>
</div>
<div id="ref-meirmans2011assessing">
<p>Meirmans PG., Hedrick PW. 2011. Assessing population structure: <span class="math inline">\(F_{ST}\)</span> and related measures. <em>Molecular Ecology Resources</em> 11:5–18. Available at: <a href="http://onlinelibrary.wiley.com/doi/10.1111/j.1755-0998.2010.02927.x/full">http://onlinelibrary.wiley.com/doi/10.1111/j.1755-0998.2010.02927.x/full</a></p>
</div>
</div>
</div>
</div>
<script>
// add bootstrap table styles to pandoc tables
function bootstrapStylePandocTables() {
$('tr.odd').parent('tbody').parent('table').addClass('table table-condensed');
}
$(document).ready(function () {
bootstrapStylePandocTables();
});
</script>
<!-- tabsets -->
<script>
$(document).ready(function () {
window.buildTabsets("TOC");
});
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
});
});
</script>
<!-- code folding -->
<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
(function () {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
document.getElementsByTagName("head")[0].appendChild(script);
})();
</script>
</body>
</html>