diff --git a/404.html b/404.html index 4c0fb16..212114d 100644 --- a/404.html +++ b/404.html @@ -42,6 +42,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/LICENSE.html b/LICENSE.html index 6fb7b47..dc6a8f5 100644 --- a/LICENSE.html +++ b/LICENSE.html @@ -27,6 +27,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/articles/PCA_scatterplot.png b/articles/PCA_scatterplot.png new file mode 100644 index 0000000..85d20c7 Binary files /dev/null and b/articles/PCA_scatterplot.png differ diff --git a/articles/PCA_varplot.png b/articles/PCA_varplot.png new file mode 100644 index 0000000..1b3e301 Binary files /dev/null and b/articles/PCA_varplot.png differ diff --git a/articles/PopGenHelpR_PCA.html b/articles/PopGenHelpR_PCA.html new file mode 100644 index 0000000..97d8c7c --- /dev/null +++ b/articles/PopGenHelpR_PCA.html @@ -0,0 +1,228 @@ + + + + + + + + +Principal component analysis in PopGenHelpR • PopGenHelpR + + + + + + + + + + Skip to contents + + +
+ + + + +
+
+ + + +
+

Purpose +

+

To perform principal component analysis using the PCA +function in PopGenHelpR.

+
+
+

Overview +

+

Principal component analysis (PCA) is a widely used technique to +identify patterns of genetic structure in genomic data or any data +really. PCA is commonly paired with structure-like analyses since PCA is +model-free, meaning that it is not based on any biological model (see +Patterson et al., 2006 for a discussion on model vs model-free +approaches).

+

We will perform PCA and visualize the results. Note that +we use ggplot2 to visualize the results, not +PopGenHelpR.

+
+

Load the data +

+
+# Load PopGenHelpR
+library(PopGenHelpR)
+library(ggplot2)
+
+# Load data
+data("HornedLizard_VCF")
+data("HornedLizard_Pop")
+
+
+
+

Performing a PCA in PopGenHelpR +

+

Running a PCA in PopGenHelpR is straightforward and only +requires the genetic data. One caveat is that the data must be complete, +meaning that there is no missing data. This means that you will have to +impute most genomic data sets, or perform stringent filtering; I usually +use LEA to impute my data (Frichot et al., 2015).

+
+HL_pca <- PCA(HornedLizard_VCF)
+

Our HL_pca object is a list with two elements. First, we +have the loadings of each individual (sample) on the principal +components. Second, we have the percent variance explained by each +principal component (PC). We expect that the first few PCs will explain +the majority of the variance, and most researchers generate PCA scatter +plots using the first few PCs.

+
+
+

Visualizng the PCA results +

+

Let’s see how much variance is explained by the first 10 PCs.

+
+Var_exp <- as.data.frame(t(HL_pca$`Variance Explained`))
+Var_exp$PC <- seq(1:nrow(Var_exp))
+
+## Plot the percent variance explained
+
+ggplot(Var_exp, aes(x = PC, y = `Percent variance explained`)) + geom_bar(stat = "identity") + theme_classic() 
+

+

We see that the first two principal components account for the +majority of the variance, so we will generate a pca scatter plot using +those axes. We will color the points according to which +population/genetic cluster they belong to. This is commonly done to see +if both model-free (e.g., PCA) and model-based (e.g., sNMF) analyses +agree.

+

This will also require additional information (a population +assignment file) to color the points.

+
+# Get the population information
+Pop <- HornedLizard_Pop
+
+# Check to see if the PCA individuals and Pop indivudals are  ordered in the same way, we expect it to be TRUE
+rownames(Dat_loadings) == Pop$Sample
+
+# Isolate loadings for the first 2 PCs
+Scores_toplot <- as.data.frame(Dat_loadings[,1:2])
+Scores_toplot$group <- Pop$Population
+
+# Set colors for each group
+Scores_toplot$group[Scores_toplot$group == 'South'] <- "#d73027" 
+Scores_toplot$group[Scores_toplot$group == 'East'] <- "#74add1"
+Scores_toplot$group[Scores_toplot$group == 'West'] <- "#313695"
+
+# Create a custom theme
+theme<-theme(panel.background = element_blank(),panel.border=element_rect(fill=NA),
+             panel.grid.major = element_blank(),panel.grid.minor = element_blank(),
+             strip.background=element_blank(),axis.text.x=element_text(colour="black"),
+             axis.text.y=element_text(colour="black"),axis.ticks=element_line(colour="black"),
+             plot.margin=unit(c(1,1,1,1),"line"))
+
+# Plot and include the variance explained by the axes wer are plotting
+ggplot(Scores_toplot, aes(x = PC1, y = PC2)) + 
+  geom_point(shape = 21, color = "black", fill = Scores_toplot$group, size = 3) +
+  scale_shape_identity() + theme + ylab(paste("PC2 (", round(Dat_pc_var[2,1],2),"% variance explained)", sep = "")) + xlab(paste("PC1 (", round(Dat_pc_var[1,1],2),"% variance explained)", sep = ""))
+

+

We see that there are 3 main clusters in our PCA and that the +individuals largely cluster by the population/genetic cluster that was +assigned by sNMF, with the exception of sample E_71_7760.

+
+
+

Questions??? +

+

Please email Keaka Farleigh () if you need help generating a +q-matrix or with anything else.

+
+
+

References +

+ +
+
+
+ + + + +
+ + + + + + + diff --git a/articles/PopGenHelpR_benchmarking.html b/articles/PopGenHelpR_benchmarking.html index 2092cda..9c2b0a6 100644 --- a/articles/PopGenHelpR_benchmarking.html +++ b/articles/PopGenHelpR_benchmarking.html @@ -44,6 +44,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/articles/PopGenHelpR_createQmatrix.html b/articles/PopGenHelpR_createQmatrix.html index e24080a..3a06a70 100644 --- a/articles/PopGenHelpR_createQmatrix.html +++ b/articles/PopGenHelpR_createQmatrix.html @@ -44,6 +44,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/articles/PopGenHelpR_heterozygosity.html b/articles/PopGenHelpR_heterozygosity.html index bbd60d5..5e9dabd 100644 --- a/articles/PopGenHelpR_heterozygosity.html +++ b/articles/PopGenHelpR_heterozygosity.html @@ -44,6 +44,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/articles/PopGenHelpR_sortQmatrix.html b/articles/PopGenHelpR_sortQmatrix.html index 14dd15d..4780876 100644 --- a/articles/PopGenHelpR_sortQmatrix.html +++ b/articles/PopGenHelpR_sortQmatrix.html @@ -44,6 +44,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/articles/PopGenHelpR_vignette.html b/articles/PopGenHelpR_vignette.html index a7a097d..9a66f42 100644 --- a/articles/PopGenHelpR_vignette.html +++ b/articles/PopGenHelpR_vignette.html @@ -44,6 +44,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/articles/articles/PopGenHelpR_PCA.html b/articles/articles/PopGenHelpR_PCA.html new file mode 100644 index 0000000..55b33b2 --- /dev/null +++ b/articles/articles/PopGenHelpR_PCA.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/articles/index.html b/articles/index.html index 1c87f1b..e704289 100644 --- a/articles/index.html +++ b/articles/index.html @@ -27,6 +27,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix @@ -55,6 +56,8 @@

All vignettes

PopGenHelpR Vignette
+
+
Principal component analysis in PopGenHelpR
Benchmarking PopGenHelpR with adegenet, hierfstat, mmod, and StAMPP
diff --git a/authors.html b/authors.html index 83e3dbf..92f45a3 100644 --- a/authors.html +++ b/authors.html @@ -27,6 +27,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/index.html b/index.html index 4886afb..8c580ef 100644 --- a/index.html +++ b/index.html @@ -44,6 +44,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/news/index.html b/news/index.html index 96d362c..395cd69 100644 --- a/news/index.html +++ b/news/index.html @@ -27,6 +27,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/pkgdown.yml b/pkgdown.yml index 81918ce..7b1483d 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -3,11 +3,12 @@ pkgdown: 2.0.7 pkgdown_sha: ~ articles: PopGenHelpR_vignette: PopGenHelpR_vignette.html + PopGenHelpR_PCA: PopGenHelpR_PCA.html PopGenHelpR_benchmarking: PopGenHelpR_benchmarking.html PopGenHelpR_createQmatrix: PopGenHelpR_createQmatrix.html PopGenHelpR_heterozygosity: PopGenHelpR_heterozygosity.html PopGenHelpR_sortQmatrix: PopGenHelpR_sortQmatrix.html -last_built: 2024-04-02T17:12Z +last_built: 2024-04-02T21:19Z urls: reference: https://kfarleigh.github.io/PopGenHelpR/reference article: https://kfarleigh.github.io/PopGenHelpR/articles diff --git a/reference/Ancestry_barchart.html b/reference/Ancestry_barchart.html index a6e39e8..c7c9e39 100644 --- a/reference/Ancestry_barchart.html +++ b/reference/Ancestry_barchart.html @@ -27,6 +27,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/reference/Dif_Stats_Map.html b/reference/Dif_Stats_Map.html index bb1ffee..45a3825 100644 --- a/reference/Dif_Stats_Map.html +++ b/reference/Dif_Stats_Map.html @@ -31,6 +31,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/reference/Dif_stats.html b/reference/Dif_stats.html index e5b23cb..a04785a 100644 --- a/reference/Dif_stats.html +++ b/reference/Dif_stats.html @@ -31,6 +31,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/reference/Differentiation.html b/reference/Differentiation.html index df3526c..b5147c9 100644 --- a/reference/Differentiation.html +++ b/reference/Differentiation.html @@ -27,6 +27,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/reference/Div_Stats_Map.html b/reference/Div_Stats_Map.html index 17f2ac6..e72954e 100644 --- a/reference/Div_Stats_Map.html +++ b/reference/Div_Stats_Map.html @@ -31,6 +31,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/reference/Div_stats.html b/reference/Div_stats.html index e121c79..70e1ce5 100644 --- a/reference/Div_stats.html +++ b/reference/Div_stats.html @@ -31,6 +31,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/reference/Fst_dat.html b/reference/Fst_dat.html index 6082aad..8d294ec 100644 --- a/reference/Fst_dat.html +++ b/reference/Fst_dat.html @@ -29,6 +29,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/reference/Het_dat.html b/reference/Het_dat.html index 0bea00a..f378c12 100644 --- a/reference/Het_dat.html +++ b/reference/Het_dat.html @@ -27,6 +27,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/reference/Heterozygosity.html b/reference/Heterozygosity.html index e66171f..c30fc22 100644 --- a/reference/Heterozygosity.html +++ b/reference/Heterozygosity.html @@ -27,6 +27,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/reference/HornedLizard_Pop.html b/reference/HornedLizard_Pop.html index 1336c17..97c09de 100644 --- a/reference/HornedLizard_Pop.html +++ b/reference/HornedLizard_Pop.html @@ -27,6 +27,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/reference/HornedLizard_VCF.html b/reference/HornedLizard_VCF.html index 927490a..4352c62 100644 --- a/reference/HornedLizard_VCF.html +++ b/reference/HornedLizard_VCF.html @@ -27,6 +27,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/reference/Network_map.html b/reference/Network_map.html index c06dfd4..9a96a3e 100644 --- a/reference/Network_map.html +++ b/reference/Network_map.html @@ -27,6 +27,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/reference/PCA.html b/reference/PCA.html new file mode 100644 index 0000000..d59cc6b --- /dev/null +++ b/reference/PCA.html @@ -0,0 +1,136 @@ + +A function to perform principal component analysis (PCA) on genetic data. Loci with missing data will be removed prior to PCA. — PCA • PopGenHelpR + Skip to contents + + +
+
+
+ +
+

A function to perform principal component analysis (PCA) on genetic data. Loci with missing data will be removed prior to PCA.

+
+ +
+

Usage

+
PCA(
+  data,
+  center = TRUE,
+  scale = FALSE,
+  missing_value = NA,
+  write = FALSE,
+  prefix = NULL
+)
+
+ +
+

Arguments

+
data
+

Character. String indicating the name of the vcf file, geno file or vcfR object to be used in the analysis.

+ + +
center
+

Boolean. Whether or not to center the data before principal component analysis.

+ + +
scale
+

Boolean. Whether or not to scale the data before principal component analysis.

+ + +
missing_value
+

Character. String indicating missing data in the input data. It is assumed to be NA, but that may not be true (is likely not) in the case of geno files.

+ + +
write
+

Boolean. Whether or not to write the output to files in the current working directory. There will be two files, one for the individual loadings and the other for the percent variance explained by each axis.

+ + +
prefix
+

Character. Optional argument. String that will be appended to file output. Please provide a prefix if write is set to TRUE.

+ +
+
+

Value

+ + +

A list containing two elements: the loadings of individuals on each principal component and the variance explained by each principal component.

+
+
+

Author

+

Keaka Farleigh

+
+ +
+

Examples

+
# \donttest{
+data("HornedLizard_VCF")
+Test <- PCA(data = HornedLizard_VCF)# }
+#> [1] "vcfR object detected, proceeding to formatting."
+
+
+
+ + +
+ + + +
+ + + + + + + diff --git a/reference/Pairwise_heatmap.html b/reference/Pairwise_heatmap.html index ad2c63b..6d6b9b3 100644 --- a/reference/Pairwise_heatmap.html +++ b/reference/Pairwise_heatmap.html @@ -27,6 +27,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/reference/Piechart_map.html b/reference/Piechart_map.html index 5baa703..e3ce870 100644 --- a/reference/Piechart_map.html +++ b/reference/Piechart_map.html @@ -27,6 +27,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/reference/Plot_ancestry.html b/reference/Plot_ancestry.html index f04e4e7..d82d273 100644 --- a/reference/Plot_ancestry.html +++ b/reference/Plot_ancestry.html @@ -31,6 +31,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/reference/Plot_coordinates.html b/reference/Plot_coordinates.html index f25e664..3d0fbf3 100644 --- a/reference/Plot_coordinates.html +++ b/reference/Plot_coordinates.html @@ -27,6 +27,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/reference/Point_map.html b/reference/Point_map.html index c07b4dc..385371d 100644 --- a/reference/Point_map.html +++ b/reference/Point_map.html @@ -27,6 +27,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/reference/Private.alleles.html b/reference/Private.alleles.html index a3913b9..04a6e10 100644 --- a/reference/Private.alleles.html +++ b/reference/Private.alleles.html @@ -27,6 +27,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/reference/Q_dat.html b/reference/Q_dat.html index 9f64ff1..afa49e2 100644 --- a/reference/Q_dat.html +++ b/reference/Q_dat.html @@ -27,6 +27,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix diff --git a/reference/index.html b/reference/index.html index fa776dc..fde85e5 100644 --- a/reference/index.html +++ b/reference/index.html @@ -27,6 +27,7 @@ Vignette Benchmarking Choosing heterozygosity + Principal Component Analysis Creating a Q-matrix Sorting a Q-matrix @@ -128,6 +129,11 @@

All functionsPCA() + +
A function to perform principal component analysis (PCA) on genetic data. Loci with missing data will be removed prior to PCA.
+

+ Pairwise_heatmap()
A function to plot a heatmap from a symmetric matrix.
diff --git a/search.json b/search.json index e8d6974..8a924d7 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc.  Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_benchmarking.html","id":"purpose","dir":"Articles","previous_headings":"","what":"Purpose","title":"Benchmarking PopGenHelpR with adegenet, hierfstat, mmod, and StAMPP","text":"compare performance PopGenHelpR R packages available CRAN. , list packages compare PopGenHelpR statistics comparison. Fst Nei’s D StAMPP (Pembleton et al., 2013) Jost’s D mmod (Winter et al., 2017) Expected Observed Heterozygosity hierfstat (Goudet, 2005) adegenet (Jombart, 2008)","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_benchmarking.html","id":"lets-begin","dir":"Articles","previous_headings":"Purpose","what":"Let’s Begin","title":"Benchmarking PopGenHelpR with adegenet, hierfstat, mmod, and StAMPP","text":"First load packages data PopGenHelpR. data comes Farleigh et al. (2021). also load vcfR convert data formats (Knaus & Grunwald, 2017).","code":"# Load the packages library(PopGenHelpR) library(adegenet) #> Loading required package: ade4 #> #> /// adegenet 2.1.10 is loaded //////////// #> #> > overview: '?adegenet' #> > tutorials/doc/questions: 'adegenetWeb()' #> > bug reports/feature requests: adegenetIssues() library(hierfstat) #> #> Attaching package: 'hierfstat' #> The following objects are masked from 'package:adegenet': #> #> Hs, read.fstat library(StAMPP) #> Loading required package: pegas #> Loading required package: ape #> #> Attaching package: 'ape' #> The following objects are masked from 'package:hierfstat': #> #> pcoa, varcomp #> Registered S3 method overwritten by 'pegas': #> method from #> print.amova ade4 #> #> Attaching package: 'pegas' #> The following object is masked from 'package:ape': #> #> mst #> The following object is masked from 'package:ade4': #> #> amova library(mmod) library(vcfR) #> #> ***** *** vcfR *** ***** #> This is vcfR 1.15.0 #> browseVignettes('vcfR') # Documentation #> citation('vcfR') # Citation #> ***** ***** ***** ***** #> #> Attaching package: 'vcfR' #> The following objects are masked from 'package:pegas': #> #> getINFO, write.vcf # Load the data data(\"HornedLizard_VCF\") data(\"HornedLizard_Pop\")"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_benchmarking.html","id":"fst-and-neis-d-comparison","dir":"Articles","previous_headings":"","what":"FST and Nei’s D Comparison","title":"Benchmarking PopGenHelpR with adegenet, hierfstat, mmod, and StAMPP","text":"compare PopGenHelpR StAMPP. packages use formulas Weir Cockerham (1984) ane Nei (1972) calculate FST Nei’s D, respectively want make sure estimates consistent across packages. First, need format data StAMPP Now can calculate statistics. Let’s start FST. Let’s inspect results. Now move onto Nei’s D. can use genlight created FST calculations. calculate Nei’s D population’s individual’s. Compare results like FST. Note PopGenHelpR reports result lower triangular element set upper triangular element Stmp_popND Stmp_indND objects NA. see difference small rounding. Let’s move onto Jost’s D comparison mmod.","code":"PGH_fst <- Differentiation(dat = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"Fst\") #> [1] \"vcfR object detected, proceeding to formatting.\" #> Formatting has finished, moving onto calculations Stmp_fst <- stamppFst(Glight, nboots = 0) PGH_fst$Fst #> East South West #> East NA NA NA #> South 0.2511135 NA NA #> West 0.3905512 0.3029886 NA Stmp_fst #> East South West #> East NA NA NA #> South 0.2511135 NA NA #> West 0.3905512 0.3029886 NA # Is there a difference between the two? Fst_comparison <- PGH_fst$Fst-Stmp_fst summary(Fst_comparison) #> East South West #> Min. :0 Min. :0 Min. : NA #> 1st Qu.:0 1st Qu.:0 1st Qu.: NA #> Median :0 Median :0 Median : NA #> Mean :0 Mean :0 Mean :NaN #> 3rd Qu.:0 3rd Qu.:0 3rd Qu.: NA #> Max. :0 Max. :0 Max. : NA #> NA's :1 NA's :2 NA's :3 PGH_ND <- Differentiation(data = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"NeisD\") #> [1] \"vcfR object detected, proceeding to formatting.\" #> Formatting has finished, moving onto calculations # StAMPP population Nei's D Stmp_popND <- stamppNeisD(Glight) # StAMPP individual Nei's D Stmp_indND <- stamppNeisD(Glight, pop = FALSE) # Population comparison PGH_ND$NeisD_pop #> East South West #> East 0.00000000 NA NA #> South 0.09005846 0.0000000 NA #> West 0.19806009 0.1148848 0 Stmp_popND #> [,1] [,2] [,3] #> East 0.000000 0.090058 0.198060 #> South 0.090058 0.000000 0.114885 #> West 0.198060 0.114885 0.000000 # Set StAMPP upper diagnoals to NA Stmp_popND[upper.tri(Stmp_popND)] <- NA Stmp_indND[upper.tri(Stmp_indND)] <- NA popND_comparison <- PGH_ND$NeisD_pop-Stmp_popND summary(popND_comparison) #> East South West #> Min. :0.000e+00 Min. :-2e-07 Min. :0 #> 1st Qu.:4.518e-08 1st Qu.:-1e-07 1st Qu.:0 #> Median :9.036e-08 Median :-1e-07 Median :0 #> Mean :1.840e-07 Mean :-1e-07 Mean :0 #> 3rd Qu.:2.760e-07 3rd Qu.: 0e+00 3rd Qu.:0 #> Max. :4.615e-07 Max. : 0e+00 Max. :0 #> NA's :1 NA's :2 # Get the mean difference mean(popND_comparison, na.rm = T) #> [1] 6.038476e-08 # Individual comparison, uncomment if you want to see it #PGH_ND$NeisD_ind #Stmp_indND indND_comparison <- PGH_ND$NeisD_ind - Stmp_indND mean(indND_comparison, na.rm = T) #> [1] 5.807753e-09"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_benchmarking.html","id":"josts-d-comparison","dir":"Articles","previous_headings":"","what":"Jost’s D Comparison","title":"Benchmarking PopGenHelpR with adegenet, hierfstat, mmod, and StAMPP","text":"compare PopGenHelpR mmod. packages use formulas Jost (2008). mmod uses genind objects format conversion first. Estimate’s similar PopGenHelpR mmod, move onto heterozygosity.","code":"Genind <- vcfR2genind(HornedLizard_VCF) Genind@pop <- as.factor(HornedLizard_Pop$Population) ploidy(Genind) <- 2 # Calculate Jost's D PGH_JD <- Differentiation(data = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"JostsD\") #> [1] \"vcfR object detected, proceeding to formatting.\" #> Formatting has finished, moving onto calculations mmod_JD <- pairwise_D(Genind) PGH_JD$JostsD #> East South West #> East 0.00000000 NA NA #> South 0.08135043 0.000000 NA #> West 0.17491621 0.103915 0 mmod_JD #> East South #> South 0.08135043 #> West 0.17370519 0.10440251 # Compare differences mathematically PGH_JD$JostsD[2:3,1] - mmod_JD[1:2] #> South West #> -6.938894e-17 1.211019e-03 PGH_JD$JostsD[2,2] - mmod_JD[3] #> [1] -0.1044025"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_benchmarking.html","id":"expected-and-observed-heterozygosity-comparison","dir":"Articles","previous_headings":"","what":"Expected and Observed Heterozygosity Comparison","title":"Benchmarking PopGenHelpR with adegenet, hierfstat, mmod, and StAMPP","text":"compare PopGenHelpR, hierfstat, adegenet. , packages use formula’s, expect similar identical results. hierfstat uses ’s format, convert data calculations. Luckily can convert genind object Jost’s D comparisons. see small differences estimates. Please reach Keaka Farleigh (farleik@miamioh.edu) questions, please see references acknowledgments .","code":"Hstat <- genind2hierfstat(Genind) ### Calculate heterozygosities # Expected PGH_He <- Heterozygosity(data = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"He\") #> [1] \"vcfR object detected, proceeding to formatting.\" #> Formatting has finished, moving onto calculations # Observed PGH_Ho <- Heterozygosity(data = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"Ho\") #> [1] \"vcfR object detected, proceeding to formatting.\" #> Formatting has finished, moving onto calculations Hstat_hets <- basic.stats(Hstat) Hstat_Ho <- colMeans(Hstat_hets$Ho) He_adnet <- Hs(Genind) PGH_He$He_perpop$Expected.Heterozygosity-He_adnet #> East South West #> -0.006854206 -0.003143262 -0.006625364 PGH_Ho$Ho_perpop$Observed.Heterozygosity-Hstat_Ho #> East South West #> 7.511576e-06 -1.790920e-06 0.000000e+00"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_benchmarking.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"Benchmarking PopGenHelpR with adegenet, hierfstat, mmod, and StAMPP","text":"Farleigh, K., Vladimirova, S. ., Blair, C., Bracken, J. T., Koochekian, N., Schield, D. R., … & Jezkova, T. (2021). effects climate demographic history shaping genomic variation across populations Desert Horned Lizard (Phrynosoma platyrhinos). Molecular Ecology, 30(18), 4481-4496. Goudet, J. (2005). hierfstat, package R compute test hierarchical F‐statistics. Molecular ecology notes, 5(1), 184-186. Jost, L. (2008). GST relatives measure differentiation. Molecular ecology, 17(18), 4015-4026. Knaus, B. J., & Grünwald, N. J. (2017). vcfr: package manipulate visualize variant call format data R. Molecular ecology resources, 17(1), 44-53. Nei, M. (1972). Genetic distance populations. American Naturalist, 106(949), 283-292. Pembleton, L. W., Cogan, N. O., & Forster, J. W. (2013). St AMPP: R package calculation genetic differentiation structure mixed‐ploidy level populations. Molecular ecology resources, 13(5), 946-952. Weir, B. S., & Cockerham, C. C. (1984). Estimating F-statistics analysis population structure. evolution, 1358-1370. Winter, D., Green, P., Kamvar, Z., & Gosselin, T. (2017). mmod: modern measures population differentiation (Version 1.3.3).","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_benchmarking.html","id":"acknowledgements","dir":"Articles","previous_headings":"","what":"Acknowledgements","title":"Benchmarking PopGenHelpR with adegenet, hierfstat, mmod, and StAMPP","text":"thank authors hierfstat, mmod, StAMPP, package dependencies. provided inspiration PopGenHelpR commitment open science made possible develop benchmark package.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_createQmatrix.html","id":"purpose","dir":"Articles","previous_headings":"","what":"Purpose","title":"Creating a Q-matrix to use in PopGenHelpR","text":"generate q-matrix ancestry coefficients use PopGenHelpR functions Ancestry_barchart Piechart_map.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_createQmatrix.html","id":"what-is-a-q-matrix","dir":"Articles","previous_headings":"","what":"What is a Q-matrix?","title":"Creating a Q-matrix to use in PopGenHelpR","text":"q-matrix matrix containing many rows individuals columns genetic clusters. cell represents ancestry coefficient (also known cluster assignments), contribution genetic cluster particular individual. Q-matrices commonly used population genomics evaluate gene flow populations (e.g., admixture) species (e.g., introgression). ADMIXTURE (Alexander et al., 2009) sNMF (Frichot et al., 2014) commonly used software estimate number genetic clusters data generate ancestry bar charts q-matrices. Let’s generate q-matrices now know ! create q-matrices using programs mentioned .","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_createQmatrix.html","id":"snmf","dir":"Articles","previous_headings":"What is a Q-matrix?","what":"sNMF","title":"Creating a Q-matrix to use in PopGenHelpR","text":"start sNMF implemented R package LEA (Frichot & Francois, 2015). running sNMF (see tutorial need help) just need use Q function. need now append sample names q-matrix first column (can cbind text editor). can use PopGenHelpR. Note must careful order q-matrix order samples appending.","code":"# If I have a sNMF project named sNMFobject with K number of ancestral populations (genetic clusters), and my best run is run 1 (determined as the run with the lowets cross-entropy) Qmat <- Q(sNMFobject, K = K, run = 1)"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_createQmatrix.html","id":"example-of-formatting-the-q-matrix-for-popgenhelpr","dir":"Articles","previous_headings":"What is a Q-matrix? > sNMF","what":"Example of formatting the q-matrix for PopGenHelpR","title":"Creating a Q-matrix to use in PopGenHelpR","text":"show format q-matrix generated Q function LEA use PopGenHelpR. First, create matrix may expect LEA. also need create fake sample names Please note toy example real data. Cool! data, can use PopGenHelpR? , Ancestry_barchart Piechart_map need data.frame CSV; functions also need first column individual names. PopGenHelpR uses individual names key link q-matrix data populations coordinates. Let’s add individual names! can use Qmat_wnames now? , Qmat_wnames still matrix let’s see cbind numeric data. Notice cbind make everything character, need cluster contributions (columns 2 4 ) numeric. fix using sapply function. Notice cluster contribution columns now numeric Qmat_df object data.frame. Now can use PopGenHelpR population assignment file/data.frame generate figures.","code":"# Create fake matrix Qmat <- t(matrix(data = c(0.25, 0.4, 0.35), nrow = 3, ncol = 3)) Fake_inds <- c(\"FS_1\", \"FS_2\", \"FS_3\") # Add the names Qmat_wnames <- cbind(Fake_inds, Qmat) # Check the structure of the Qmat_wnames str(Qmat_wnames) #> chr [1:3, 1:4] \"FS_1\" \"FS_2\" \"FS_3\" \"0.25\" \"0.25\" \"0.25\" \"0.4\" \"0.4\" \"0.4\" ... #> - attr(*, \"dimnames\")=List of 2 #> ..$ : NULL #> ..$ : chr [1:4] \"Fake_inds\" \"\" \"\" \"\" Qmat_df <- as.data.frame(Qmat_wnames) Qmat_df[2:4] <- sapply(Qmat_df[2:4], as.numeric) # Check again str(Qmat_df) #> 'data.frame': 3 obs. of 4 variables: #> $ Fake_inds: chr \"FS_1\" \"FS_2\" \"FS_3\" #> $ V2 : num 0.25 0.25 0.25 #> $ V3 : num 0.4 0.4 0.4 #> $ V4 : num 0.35 0.35 0.35"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_createQmatrix.html","id":"admixture","dir":"Articles","previous_headings":"What is a Q-matrix?","what":"ADMIXTURE","title":"Creating a Q-matrix to use in PopGenHelpR","text":"ADMIXTURE little complex associated R package, nice gives us q-matrix automatically. See tutorial details. example , tell ADMIXTURE use bed file input run analysis K value 5. output file .Q extension, contains ancestry coefficients individual (q-matrix).","code":"### Run ADMIXTURE admixture --cv my_genetic_data.bed 5 > K5.out"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_createQmatrix.html","id":"questions","dir":"Articles","previous_headings":"","what":"Questions???","title":"Creating a Q-matrix to use in PopGenHelpR","text":"Please email Keaka Farleigh (farleik@miamioh.edu) need help generating q-matrix anything else.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_createQmatrix.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"Creating a Q-matrix to use in PopGenHelpR","text":"Alexander, D. H., Novembre, J., & Lange, K. (2009). Fast model-based estimation ancestry unrelated individuals. Genome research, 19(9), 1655-1664. Frichot, E., & François, O. (2015). LEA: R package landscape ecological association studies. Methods Ecology Evolution, 6(8), 925-929. Frichot, E., Mathieu, F., Trouillon, T., Bouchard, G., & François, O. (2014). Fast efficient estimation individual ancestry coefficients. Genetics, 196(4), 973-983.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"purpose","dir":"Articles","previous_headings":"","what":"Purpose","title":"Which heterozygosity should I use?","text":"help understand different measures heterozygosity PopGenHelpR determine measure appropriate question/objective.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"what-is-heterozygosity-and-why-is-it-important","dir":"Articles","previous_headings":"","what":"What is heterozygosity and why is it important?","title":"Which heterozygosity should I use?","text":"Heterozygosity refers presence two alleles locus. often use heterozygosity measure genetic diversity, essential species’ ability adapt persist.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"what-measures-of-heterozygosity-can-popgenhelpr-estimate","dir":"Articles","previous_headings":"","what":"What measures of heterozygosity can PopGenHelpR estimate?","title":"Which heterozygosity should I use?","text":"PopGenHelpR can estimate seven measures heterozygosity function Heterozygosity. list measure providing brief descriptions one. Observed heterozygosity (Ho) Expected heterozygosity () Proportion heterozygous loci (PHt) Proportion heterozygous loci standardized average expected heterozygosity (Hsexp) Proportion heterozygous loci standardized average observed heterozygosity (Hsobs) Internal relatedness (IR) Homozygosity locus (HL) PopGenHelpR can calculate measures using Heterozygosity function. See code .","code":"# Load package and toy data for all of the statistics library(PopGenHelpR) data(\"HornedLizard_Pop\") data(\"HornedLizard_VCF\") All_Het <- Heterozygosity(data = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"all\")"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"population-measures-of-heterozygosity","dir":"Articles","previous_headings":"","what":"Population measures of heterozygosity","title":"Which heterozygosity should I use?","text":"PopGenHelpR users can estimate expected observed heterozygosity (Ho, respectively) population data set.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"expected-heterozygosity-he","dir":"Articles","previous_headings":"Population measures of heterozygosity","what":"Expected heterozygosity (He)","title":"Which heterozygosity should I use?","text":"PopGenHelpR estimates per locus population following equations provided Hardy-Weinberg equation. Briefly, equation estimates one minus squared frequency allele (\\(p^2\\) \\(q^2\\), respectively), thus giving us expected frequency heterozygous genotypes (2pq) locus. overall measure calculated average per locus estimates. equation per locus , p reference allele q alternate allele: \\[ H_e = 1-p^2-q^2 \\] Thus, equation calculate overall , K number SNPs. \\[ H_e = \\frac{\\sum_{k=1}^K(1-p^2-q^2)}{K} \\]","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"how-do-we-use-he","dir":"Articles","previous_headings":"Population measures of heterozygosity > Expected heterozygosity (He)","what":"How do we use He","title":"Which heterozygosity should I use?","text":"use null model test determine Hardy-Weinberg equilibrium violated. Violations indicate mutation, non-random mating, gene flow, non-infinite population size, natural selection, combination.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"how-do-we-calculate-he-in-popgenhelpr","dir":"Articles","previous_headings":"Population measures of heterozygosity > Expected heterozygosity (He)","what":"How do we calculate He in PopGenHelpR?","title":"Which heterozygosity should I use?","text":"can calculate PopGenHelpR using command .","code":"He <- Heterozygosity(data = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"He\")"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"observed-heterozygosity-ho","dir":"Articles","previous_headings":"Population measures of heterozygosity","what":"Observed heterozygosity (Ho)","title":"Which heterozygosity should I use?","text":"PopGenHelpR estimates Ho per locus population following equations Nei (1987). Briefly, equations estimate Ho one minus proportion homozygotes population locus, thus giving us proportion heterozygotes locus. overall measure Ho calculated average per locus estimates. equation per locus : \\[ H_o = 1- \\frac{Number\\; \\; homoyzgotes}{Number\\; \\; samples} \\] Thus overall measure Ho , K number SNPs: \\[ H_o = \\frac{\\sum_{k = 1}^K{1- \\frac{Number\\; \\; homoyzgotes}{Number\\; \\; samples}}}{K} \\] formal equation Ho Nei (1987) : Pkii proportion homozygote () sample (k), np number samples: \\[ H_o = 1-\\sum_{k}\\sum_{}\\frac{Pkii}{np} \\]","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"how-do-we-use-ho","dir":"Articles","previous_headings":"Population measures of heterozygosity > Observed heterozygosity (Ho)","what":"How do we use Ho","title":"Which heterozygosity should I use?","text":"use Ho measure genetic diversity also compare determine data exhibiting different patterns, inbreeding (Ho < ) heterozygote advantage (Ho > ).","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"how-do-we-calculate-ho-in-popgenhelpr","dir":"Articles","previous_headings":"Population measures of heterozygosity > Observed heterozygosity (Ho)","what":"How do we calculate Ho in PopGenHelpR?","title":"Which heterozygosity should I use?","text":"can calculate Ho PopGenHelpR using command .","code":"Ho <- Heterozygosity(data = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"Ho\")"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"individual-measures-of-heterozygosity","dir":"Articles","previous_headings":"","what":"Individual measures of heterozygosity","title":"Which heterozygosity should I use?","text":"PopGenHelpR users can estimate proportion heterozygous loci (PHt), proportion heterozygous loci standardized average expected heterozygosity (Hsexp), proportion heterozygous loci standardized average observed heterozygosity (Hsobs), internal relatedness (IR), homozygosity locus (HL) individuals data set.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"proportion-of-heterozygous-loci-pht","dir":"Articles","previous_headings":"Individual measures of heterozygosity","what":"Proportion of heterozygous loci (PHt)","title":"Which heterozygosity should I use?","text":"proportion heterozygous loci (PHt) calculated number heterozygous SNPs divided number genotyped SNPs individual. \\[ PHt = \\frac{Number\\; \\; heterozygous\\; SNPs}{Number\\; \\; genotyped\\; SNPs} \\]","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"how-do-we-use-pht","dir":"Articles","previous_headings":"Individual measures of heterozygosity > Proportion of heterozygous loci (PHt)","what":"How do we use PHt","title":"Which heterozygosity should I use?","text":"PHt helpful evaluating diversity within individual comparing samples. Individual heterozygosity also commonly used investigate inbreeding (Miller et al., 2014). Individual heterozygosity used heterozygosity-fitness correlations (HFC), assuming heterozygosity positively correlates fitness. Thus, increased heterozygosity (decreased inbreeding) indicates higher fitness.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"how-do-we-calculate-pht-in-popgenhelpr","dir":"Articles","previous_headings":"Individual measures of heterozygosity > Proportion of heterozygous loci (PHt)","what":"How do we calculate PHt in PopGenHelpR?","title":"Which heterozygosity should I use?","text":"can calculate PHt PopGenHelpR using command .","code":"PHt <- Heterozygosity(data = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"PHt\")"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"proportion-of-heterozygous-loci-standardized-by-the-average-expected-heterozygosity-hsexp","dir":"Articles","previous_headings":"Individual measures of heterozygosity","what":"Proportion of heterozygous loci standardized by the average expected heterozygosity (Hsexp)","title":"Which heterozygosity should I use?","text":"proportion heterozygous loci standardized average expected heterozygosity (Hsexp) calculated PHt divided mean expected heterozygosity () individual. Please see equation . \\[ Hs_{exp} = \\frac{PHt}{H_e} \\]","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"how-do-we-use-hsexp","dir":"Articles","previous_headings":"Individual measures of heterozygosity > Proportion of heterozygous loci standardized by the average expected heterozygosity (Hsexp)","what":"How do we use Hsexp","title":"Which heterozygosity should I use?","text":"Hsexp introduced Coltman et al. (1999) evaluate individual heterozygosity across individuals genotyped different markers; allows us compare individual heterozygosity scale assess inbreeding. Like PHt, higher Hsexp indicates less inbreeding.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"how-do-we-calculate-hsexp-in-popgenhelpr","dir":"Articles","previous_headings":"Individual measures of heterozygosity > Proportion of heterozygous loci standardized by the average expected heterozygosity (Hsexp)","what":"How do we calculate Hsexp in PopGenHelpR?","title":"Which heterozygosity should I use?","text":"can calculate Hsexp PopGenHelpR using command .","code":"Hs_exp <- Heterozygosity(data = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"Hs_exp\")"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"proportion-of-heterozygous-loci-standardized-by-the-average-observed-heterozygosity-hsobs","dir":"Articles","previous_headings":"Individual measures of heterozygosity","what":"Proportion of heterozygous loci standardized by the average observed heterozygosity (Hsobs)","title":"Which heterozygosity should I use?","text":"proportion heterozygous loci standardized average observed heterozygosity (Hsobs) calculated PHt divided mean observed heterozygosity (Ho) individual. Please see equation . \\[ Hs_{obs} = \\frac{PHt}{H_o} \\]","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"how-do-we-use-hsobs","dir":"Articles","previous_headings":"Individual measures of heterozygosity > Proportion of heterozygous loci standardized by the average observed heterozygosity (Hsobs)","what":"How do we use Hsobs","title":"Which heterozygosity should I use?","text":"Hsobs introduced Coltman et al. (1999) evaluate individual heterozygosity across individuals genotyped different markers; allows us compare individual heterozygosity scale assess inbreeding. Like PHt, higher Hsobs indicates less inbreeding.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"how-do-we-calculate-hsobs-in-popgenhelpr","dir":"Articles","previous_headings":"Individual measures of heterozygosity > Proportion of heterozygous loci standardized by the average observed heterozygosity (Hsobs)","what":"How do we calculate Hsobs in PopGenHelpR?","title":"Which heterozygosity should I use?","text":"can calculate Hsobs PopGenHelpR using command .","code":"Hs_obs <- Heterozygosity(data = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"Hs_obs\")"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"internal-relatedness-ir","dir":"Articles","previous_headings":"Individual measures of heterozygosity","what":"Internal relatedness (IR)","title":"Which heterozygosity should I use?","text":"equation Internal relatedness (IR) complex qutie mouthful(sentence full?). Please see equation . IR calculated two times number homozygous loci minus sum frequency ith allele divided two times number loci minus sum frequency ith allele (see equation 2.1 Amos et al., 2001). \\[ IR = \\frac{(2H-\\sum{f_i})}{(2N-\\sum{f_i})} \\]","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"how-do-we-use-ir","dir":"Articles","previous_headings":"Individual measures of heterozygosity > Internal relatedness (IR)","what":"How do we use IR?","title":"Which heterozygosity should I use?","text":"IR developed Amos et al. (2001) measure diversity within individuals (Amos et al., 2001). Negative IR values suggest individuals outbred (tend heterozygous), positive values indicate individuals inbred (tend homozygous).","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"how-do-we-calculate-ir-in-popgenhelpr","dir":"Articles","previous_headings":"Individual measures of heterozygosity > Internal relatedness (IR)","what":"How do we calculate IR in PopGenHelpR?","title":"Which heterozygosity should I use?","text":"can calculate IR PopGenHelpR using command .","code":"IR <- Heterozygosity(data = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"IR\")"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"homozygosity-by-locus-hl","dir":"Articles","previous_headings":"Individual measures of heterozygosity","what":"Homozygosity by locus (HL)","title":"Which heterozygosity should I use?","text":"Homozygosity locus (HL) calculated expected heterozygosity loci homozygosis (\\(E_h\\)) divided sum expected heterozygosity loci homozygosis (\\(E_h\\)) expected heterozygosity loci heterozygosis (\\(E_j\\); see Aparicio et al., 2006). Please see equation . \\[ HL = \\frac{\\sum{E_h}}{\\sum{E_h} + \\sum{E_j}} \\]","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"how-do-we-use-hl","dir":"Articles","previous_headings":"Individual measures of heterozygosity > Homozygosity by locus (HL)","what":"How do we use HL?","title":"Which heterozygosity should I use?","text":"HL proposed Aparicio et al. (2006) improve IR weighing contribution locus index depending allelic variability (Aparicio et al., 2006). HL, like IR, useful evaluating diversity within individual. HL ranges 0 loci heterozygous 1 loci homozygous (Aparicio et al., 2006).","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"how-do-we-calculate-hl-in-popgenhelpr","dir":"Articles","previous_headings":"Individual measures of heterozygosity > Homozygosity by locus (HL)","what":"How do we calculate HL in PopGenHelpR?","title":"Which heterozygosity should I use?","text":"can calculate HL PopGenHelpR using command . Please reach Keaka Farleigh (farleik@miamioh.edu) questions need help.","code":"HL <- Heterozygosity(data = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"HL\")"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"Which heterozygosity should I use?","text":"Amos W., Worthington Wilmer J., Fullard K., Burg T. M., Croxall J. P., Bloch D., Coulson T. 2001. influence parental relatedness reproductive success. Proceedings Royal Society B: Biological Sciences. 268: 2021-2027. Aparicio J. M., Ortego J., Cordero P. J. 2006. weigh estimate heterozygosity, alleles loci? Molecular Ecology. 15: 4659-4665 Coltman D. W., Pilkington J. G., Smith J. ., Pemberton J. M. 1999. Parasite-mediated selection inbred Soay sheep free-living, island population. Evolution. 53: 1259-1267. Miller, J. M., Malenfant, R. M., David, P., Davis, C. S., Poissant, J., Hogg, J. T., … & Coltman, D. (2014). Estimating genome-wide heterozygosity: effects demographic history marker type. Heredity, 112(3), 240-247. Nei, M. (1987). Molecular evolutionary genetics. Columbia university press.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_sortQmatrix.html","id":"purpose","dir":"Articles","previous_headings":"","what":"Purpose","title":"Sorting a Q-matrix for plotting in PopGenHelpR","text":"sort q-matrix ancestry coefficients use PopGenHelpR function Ancestry_barchart.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_sortQmatrix.html","id":"overview","dir":"Articles","previous_headings":"","what":"Overview","title":"Sorting a Q-matrix for plotting in PopGenHelpR","text":"often want plot structure-like ancestry bar chart specific order. may wish visualize ancestry chart grouping individuals cluster together (e.g., ordered cluster) latitude longitude (match pie chart map). , can use ind.ord pop.ord arguments Ancestry_barchart function.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_sortQmatrix.html","id":"load-the-data","dir":"Articles","previous_headings":"Overview","what":"Load the data","title":"Sorting a Q-matrix for plotting in PopGenHelpR","text":"","code":"# Load PopGenHelpR library(PopGenHelpR) # Load data data(\"Q_dat\") # First, we separate the list elements into two separate objects. The q-matrix (Qmat) and the locality information for each individual (Loc). Qmat <- Q_dat[[1]] Loc <- Q_dat[[2]]"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_sortQmatrix.html","id":"sorting-a-q-matrix","dir":"Articles","previous_headings":"","what":"Sorting a Q-matrix","title":"Sorting a Q-matrix for plotting in PopGenHelpR","text":"First, create vector contains order individuals populations want barcharts . use ind.order pop.order arguments specify . ***Note individuals populations ind.order pop.order must match individual population names population assignment file (pops argument). can thing sample population names character strings; just remember PopGenHelpR requires individual population names type; must characters numeric.","code":"# Set orders Ind_ord <- rev(seq(1,30)) Pop_ord <- rev(seq(1,5)) Anc_ord <- Ancestry_barchart(Qmat, Loc, K = 5, col = c('#d73027', '#f46d43', '#e0f3f8', '#74add1', '#313695'), ind.order = Ind_ord, pop.order = Pop_ord) Anc_ord$`Individual Ancestry Plot` Anc_ord$`Population Ancestry Plot` # Make the sample and population names characters Qmat_char <- Qmat Qmat_char$Ind <- paste(\"Sample\", Qmat_char$Ind, sep = '_') Loc_char <- Loc Loc_char$Sample <- paste(\"Sample\", Loc_char$Sample, sep = '_') Loc_char$Population <- paste(\"Population\", Loc_char$Population, sep = '_') Ind_ord_char <- paste('Sample', Ind_ord, sep = '_') Pop_ord_char <- paste('Population', Pop_ord, sep = '_') Anc_ord_char <- Ancestry_barchart(Qmat_char, Loc_char, K = 5, col = c('#d73027', '#f46d43', '#e0f3f8', '#74add1', '#313695'), ind.order = Ind_ord_char, pop.order = Pop_ord_char) Anc_ord_char$`Individual Ancestry Plot` Anc_ord_char$`Population Ancestry Plot`"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_sortQmatrix.html","id":"questions","dir":"Articles","previous_headings":"","what":"Questions???","title":"Sorting a Q-matrix for plotting in PopGenHelpR","text":"Please email Keaka Farleigh (farleik@miamioh.edu) need help generating q-matrix anything else.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_vignette.html","id":"welcome","dir":"Articles","previous_headings":"","what":"Welcome","title":"PopGenHelpR Vignette","text":"Welcome PopGenHelpR vignette, please contact authors questions package. can also visit Github additional examples (https://kfarleigh.github.io/PopGenHelpR/).","code":"# Load the package library(PopGenHelpR)"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_vignette.html","id":"overview-of-popgenhelpr","dir":"Articles","previous_headings":"","what":"Overview of PopGenHelpR","title":"PopGenHelpR Vignette","text":"PopGenHelpR one-stop package data analysis visualization. PopGenHelpR can calculate commonly used population genomic statistics heterozygosity genetic differentiation, functions Heterozygosity, Differentiation, Private.alleles. also producing publication-quality figures using functions Ancestry_barchart, Network_map, Pairwise_heatmap, Piechart_map. Check vignette see functions action! Fig 1. visualization PopGenHelpR workflow.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_vignette.html","id":"assumptions-of-popgenhelpr","dir":"Articles","previous_headings":"Overview of PopGenHelpR","what":"Assumptions of PopGenHelpR","title":"PopGenHelpR Vignette","text":"PopGenHelpR designed easy use, also means need ensure data order analysis pay attention warnings output functions. Data assumed bi-allelic. Please see examples filtering vcf files contain biallelic SNPs using vcftools bcftools, respectively.","code":"# vcftools vcftools --vcf myfile.vcf --max-alleles 2 --recode --recode-INFO-all --out my_biallelic_file.vcf # bcftools bcftools view -m2 -M2 -v snps myfile.vcf > my_biallelic_file.vcf"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_vignette.html","id":"load-the-data","dir":"Articles","previous_headings":"Overview of PopGenHelpR > Assumptions of PopGenHelpR","what":"Load the data","title":"PopGenHelpR Vignette","text":"First, load data. data objects examples data types can used functions PopGenHelpR.","code":"data(\"Fst_dat\") data(\"Het_dat\") data(\"Q_dat\") data(\"HornedLizard_Pop\") data(\"HornedLizard_VCF\")"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_vignette.html","id":"genomic-analysis","dir":"Articles","previous_headings":"Overview of PopGenHelpR","what":"Genomic Analysis","title":"PopGenHelpR Vignette","text":"Statistical analysis critical component population genomics study, many R packages calculate subset commonly used population genomic statistics. PopGenHelpR seeks remedy allowing researchers calculate widely used diversity differentiation measures single package.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_vignette.html","id":"heterozygosity","dir":"Articles","previous_headings":"Overview of PopGenHelpR > Genomic Analysis","what":"Heterozygosity","title":"PopGenHelpR Vignette","text":"Heterozygosity fundamental statistic population genomics allows researchers evaluate genetic diversity individuals populations. PopGenHelpR can estimate seven measures heterozygosity (individual population). , calculate observed heterozygosity, please see documentation Heterozygosity see options. Better yet, check article heterozygosity use measure! need vcf geno file, population assignment file, statistic wish estimate (PopGenHelpR default). Note PopGenHelpR assumes first column indicates sample names second column indicates population individual assigned. can use arguments individual_col population_col specify column indicates sample population names, respectively. can also write results csv set write = TRUE.","code":"Obs_Het <- Heterozygosity(data = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"Ho\")"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_vignette.html","id":"differentiaton","dir":"Articles","previous_headings":"Overview of PopGenHelpR > Genomic Analysis","what":"Differentiaton","title":"PopGenHelpR Vignette","text":"Differentiation another basic analysis population genomic studies. PopGenHelpR allows estimate FST, Nei’s D (individual population), Jost’s D. Like Heterozygosity, need vcf geno file, population assignment file, statistic want calculate (PopGenHelpR default). , individual population columns assumed first second columns can indicated users individual_col population_col, respectively.","code":"Fst <- Differentiation(data = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"Fst\")"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_vignette.html","id":"private-alleles","dir":"Articles","previous_headings":"Overview of PopGenHelpR > Genomic Analysis","what":"Private alleles","title":"PopGenHelpR Vignette","text":"Finally, calculate number private alleles population. analysis often used evaluate signals range expansion helps researchers identify populations harbor unique alleles. Note Private.alleles can use vcf (geno files) require specify statistic (absolutely need vcf population file). Otherwise, operates just like Heterozygosity Differentiation. Let’s move onto visualizations (fun part), can get work submitted!","code":"PA <- Private.alleles(data = HornedLizard_VCF, pops = HornedLizard_Pop)"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_vignette.html","id":"visualizations","dir":"Articles","previous_headings":"Overview of PopGenHelpR","what":"Visualizations","title":"PopGenHelpR Vignette","text":"strength PopGenHelpR ability generate publication-quality figures. can generate commonly used figures ancestry plots (bar charts piechart maps), sample maps, figures Network_map visualizes relationships points map.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_vignette.html","id":"ancestry-plots","dir":"Articles","previous_headings":"Overview of PopGenHelpR > Visualizations","what":"Ancestry Plots","title":"PopGenHelpR Vignette","text":"PopGenHelpR can generate commonly used ancestry visualizations structure-like plots ancestry piechart maps. First, create structure-like plots individuals populations. need q-matrix, population assignments individual, number genetic clusters (K). q-matrix represents contribution cluster (K) individual population can obtained programs like STRUCTURE, ADMIXTURE, sNMF. Please see article extract q-matrix programs email Keaka Farleigh. can also generate ancestry matrix population. ancestry population calculated averaging ancestry individuals particular population. Now, generate piechart maps ancestry using Piechart_map function. Piechart_map requires input Ancestry_barchart additional requirement coordinates individual/population. ’ll notice individual map looks weird; pie charts bunch partitions. ’s multiple individuals location, population map probably better choice. Instead layering individuals top , population map averages ancestry individuals population mapping. See GitHub additional examples (https://kfarleigh.github.io/PopGenHelpR/). Notice weird partitions? can take care using population piechart map.","code":"# First, we separate the list elements into two separate objects. The q-matrix (Qmat) and the locality information for each individual (Loc). Qmat <- Q_dat[[1]] Loc <- Q_dat[[2]] # Now we will generate both population and individual plots by setting plot.type to 'all'. If you wanted, you could only generate individual or population plots by setting plot.type to \"individual\" and \"population\", respectively. Test_all <- Ancestry_barchart(anc.mat = Qmat, pops = Loc, K = 5, plot.type = 'all', col = c('#d73027', '#f46d43', '#e0f3f8', '#74add1', '#313695')) Test_all$`Individual Ancestry Plot` Test_all$`Population Ancestry Plot` # First, we seperate the list elements into two seperate objects. The q-matrix (Qmat) and the locality information for each individual (Loc). Qmat <- Q_dat[[1]] Loc <- Q_dat[[2]] # Now we will generate both population and individual plots by setting plot.type to 'all'. If you wanted, you could only generate individual or population plots by setting plot.type to \"individual\" and \"population\", respectively. Test_all_piemap <- Piechart_map(anc.mat = Qmat, pops = Loc, K = 5,plot.type = 'all', col = c('#d73027', '#f46d43', '#e0f3f8', '#74add1', '#313695'), Lat_buffer = 1, Long_buffer = 1) Test_all_piemap$`Individual Map` Test_all_piemap$`Population Map`"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_vignette.html","id":"differentiation-visualizations","dir":"Articles","previous_headings":"Overview of PopGenHelpR > Visualizations","what":"Differentiation visualizations","title":"PopGenHelpR Vignette","text":"PopGenHelpR can use symmetric matrices output Differentiation function plot heatmaps network maps. plots can great understanding relationships populations individuals. First, use Pairwise_heatmap function, allows us see relationships populations individuals requires symmetric matrix legend label (statistic argument). can also supply color vector like , required. can also visualize relationships map using Network_map function. function allows us visualize pairwise relationships color links points. must supply symmetric matrix (dat argument) population assignment file (pops argument). remaining arguments optional, allow greater customization. neighbors argument, example, tells function many relationships visualize, can also use specify relationships want see. Please see documentation details. Network_map can also used plot specific relationships. Let’s isolate populations highest lowest Fst supplying character vector neighbors argument.","code":"PW_hmap <- Pairwise_heatmap(Fst_dat[[1]], statistic = \"Fst\", col = c(\"#0000FF\", \"#FF0000\")) NW_map <- Network_map(Fst_dat[[1]], pops = Fst_dat[[2]], neighbors = 2, statistic = \"Fst\") NW_map$Map NW_map2 <- Network_map(Fst_dat[[1]], pops = Fst_dat[[2]], neighbors = c(\"East_West\", \"East_South\"), statistic = \"Fst\") NW_map2$Map"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_vignette.html","id":"heterozygosity-and-other-visualizations","dir":"Articles","previous_headings":"Overview of PopGenHelpR > Visualizations","what":"Heterozygosity and Other Visualizations","title":"PopGenHelpR Vignette","text":"PopGenHelpR can create maps using output Heterozygosity csv files external programs understand diversity (statistics) distributed across geographic space. plot observed heterozygosity data function Point_map. need data frame (csv) name whatever statistic plotting (statistic argument). Point_map also assumes coordinate column names Latitude Longitude. can also outline points setting .col argument. Finally, can just plot coordinates using Plot_coordinates. need data frame csv file coordinates row indicated columns names Latitude Longitude. can change size points size argument. Thank interest package; please reach Keaka Farleigh (farleik@miamioh.edu) questions, things included future versions package, like kept date PopGenHelpR.","code":"Het_map <- Point_map(Het_dat, statistic = \"Heterozygosity\") Het_map$`Heterozygosity Map` Het_map2 <- Point_map(Het_dat, statistic = \"Heterozygosity\", out.col = \"#000000\") Het_map2$`Heterozygosity Map` Sample_map <- Plot_coordinates(HornedLizard_Pop) Sample_map"},{"path":"https://kfarleigh.github.io/PopGenHelpR/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Keaka Farleigh. Author, copyright holder, maintainer. Mason Murphy. Author, copyright holder, contributor. Christopher Blair. Author, copyright holder, contributor. Tereza Jezkova. Author, copyright holder, contributor.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Farleigh K, Murphy M, Blair C, Jezkova T (2024). PopGenHelpR: Streamline Population Genomic Genetic Analyses. R package version 1.3.0, https://kfarleigh.github.io/PopGenHelpR/.","code":"@Manual{, title = {PopGenHelpR: Streamline Population Genomic and Genetic Analyses}, author = {Keaka Farleigh and Mason Murphy and Christopher Blair and Tereza Jezkova}, year = {2024}, note = {R package version 1.3.0}, url = {https://kfarleigh.github.io/PopGenHelpR/}, }"},{"path":[]},{"path":"https://kfarleigh.github.io/PopGenHelpR/index.html","id":"what-is-popgenhelpr","dir":"","previous_headings":"","what":"What is PopGenHelpR?","title":"Streamline Population Genomic and Genetic Analyses","text":"PopGenHelpR R package designed estimate commonly used population genomic statistics generate publication quality figures. current version PopGenHelpR uses vcf, geno (012), csv files generate output, however, future implementations expand input file type options. Please see vignette articles examples. plan continue developing package include functions, feel free reach Keaka Farleigh suggestions like collaborate.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/index.html","id":"do-you-use-popgenhelpr-in-your-research-or-class-and-want-to-be-kept-up-to-date","dir":"","previous_headings":"What is PopGenHelpR?","what":"Do you use PopGenHelpR in your research or class and want to be kept up to date?","title":"Streamline Population Genomic and Genetic Analyses","text":"Please email Keaka Farleigh (farleik@miamioh.edu) informed updates pending changes PopGenHelpR.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Streamline Population Genomic and Genetic Analyses","text":"can install PopGenHelpR using: can install development version PopGenHelpR using devtools:","code":"install.packages(\"PopGenHelpR\") devtools::install_github(\"kfarleigh/PopGenHelpR\")"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Ancestry_barchart.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an ancestry matrix for individuals and(or) populations. — Ancestry_barchart","title":"Plot an ancestry matrix for individuals and(or) populations. — Ancestry_barchart","text":"Plot ancestry matrix individuals () populations.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Ancestry_barchart.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an ancestry matrix for individuals and(or) populations. — Ancestry_barchart","text":"","code":"Ancestry_barchart( anc.mat, pops, K, plot.type = \"all\", col, ind.order = NULL, pop.order = NULL )"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Ancestry_barchart.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an ancestry matrix for individuals and(or) populations. — Ancestry_barchart","text":"anc.mat Data frame character string supplies input data. character string, file csv. first column names sample/population, followed estimated contribution cluster individual/pop. pops Data frame character string supplies input data. character string, file csv. columns named Sample, containing sample IDs; Population indicating population assignment individual, population sample names must type (.e., numeric characters); Long, indicating longitude sample; Lat, indicating latitude sample. K Numeric.number genetic clusters data set, please contact package authors need help . plot.type Character string. Options , individual, population. default recommended, plot barchart individuals populations. col Character vector indicating colors wish use plotting. ind.order Character vector indicating order plot individuals individual ancestry bar chart. pop.order Chracter vector indicating order plot populations population ancesyry bar chart.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Ancestry_barchart.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot an ancestry matrix for individuals and(or) populations. — Ancestry_barchart","text":"list containing plots data frames used generate plots.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Ancestry_barchart.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot an ancestry matrix for individuals and(or) populations. — Ancestry_barchart","text":"Keaka Farleigh","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Ancestry_barchart.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot an ancestry matrix for individuals and(or) populations. — Ancestry_barchart","text":"","code":"# \\donttest{ data(Q_dat) Qmat <- Q_dat[[1]] rownames(Qmat) <- Qmat[,1] Loc <- Q_dat[[2]] Test_all <- Ancestry_barchart(anc.mat = Qmat, pops = Loc, K = 5, plot.type = 'all',col = c('#d73027', '#fc8d59', '#e0f3f8', '#91bfdb', '#4575b4'))# }"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Dif_Stats_Map.html","id":null,"dir":"Reference","previous_headings":"","what":"WARNING! This function has been deprecated and is no longer supported. Please use the Network_map function.\nA function to map differentiation statistics. — Dif_Stats_Map","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Network_map function.\nA function to map differentiation statistics. — Dif_Stats_Map","text":"WARNING! function deprecated longer supported. Please use Network_map function. function map differentiation statistics.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Dif_Stats_Map.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Network_map function.\nA function to map differentiation statistics. — Dif_Stats_Map","text":"","code":"Dif_Stats_Map( dat, pops, neighbors, col, breaks = NULL, Lat_buffer, Long_buffer )"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Dif_Stats_Map.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Network_map function.\nA function to map differentiation statistics. — Dif_Stats_Map","text":"dat Data frame character string supplies input data. character string, file csv. csv, 1st row contain individual/population names. columns also named fashion. pops Data frame character string supplies input data. character string, file csv. columns named Sample, containing sample IDs; Population indicating population assignment individual; Long, indicating longitude sample; Lat, indicating latitude sample. neighbors Numeric. number neighbors plot connections . col Character vector indicating colors wish use plotting. breaks Numeric. breaks used generate color ramp plotting. Users supply 3 values custom breaks desired. Lat_buffer Numeric. buffer customize visualization. Long_buffer Numeric. buffer customize visualization.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Dif_Stats_Map.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Network_map function.\nA function to map differentiation statistics. — Dif_Stats_Map","text":"list containing map matrix used plot map.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Dif_Stats_Map.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Network_map function.\nA function to map differentiation statistics. — Dif_Stats_Map","text":"Keaka Farleigh","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Dif_Stats_Map.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Network_map function.\nA function to map differentiation statistics. — Dif_Stats_Map","text":"","code":"# \\donttest{ data(Fst_dat) Fst <- Fst_dat[[1]] Loc <- Fst_dat[[2]] Test <- Dif_Stats_Map(dat = Fst, pops = Loc, neighbors = 2, col = c('#fd8d3c','#fc4e2a','#e31a1c','#bd0026','#800026'),Lat_buffer = 1, Long_buffer = 1)# } #> Warning: k greater than one-third of the number of data points"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Dif_stats.html","id":null,"dir":"Reference","previous_headings":"","what":"WARNING! This function has been deprecated and is no longer supported. Please use the Differentiation function.\nA function to calculate differentiation statistics and perform significance testing with a vcf file. — Dif_stats","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Differentiation function.\nA function to calculate differentiation statistics and perform significance testing with a vcf file. — Dif_stats","text":"WARNING! function deprecated longer supported. Please use Differentiation function. function calculate differentiation statistics perform significance testing vcf file.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Dif_stats.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Differentiation function.\nA function to calculate differentiation statistics and perform significance testing with a vcf file. — Dif_stats","text":"","code":"Dif_stats( VCF, pops, ploidy, statistic = \"both\", boots, write = FALSE, prefix = NULL )"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Dif_stats.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Differentiation function.\nA function to calculate differentiation statistics and perform significance testing with a vcf file. — Dif_stats","text":"VCF Character string indicating name vcf file used analysis. pops Character string indicating name population assignment file. file four columns order vcf file. first column named Sample indicates sample name. second column named Population indicates population assignment individual. third column named Long indicates longitude sample. fourth column named Lat indicates latitude sample. ploidy Numeric. ploidy data. statistic Character string. Options , FST, NeisD. boots Numeric. number boostraps use evaluate statistical significance. relevant FST estimation. write Boolean. Whether write output file current working directory. prefix Character string appended file output.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Dif_stats.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Differentiation function.\nA function to calculate differentiation statistics and perform significance testing with a vcf file. — Dif_stats","text":"list contianing data frames requested statistic.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Dif_stats.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Differentiation function.\nA function to calculate differentiation statistics and perform significance testing with a vcf file. — Dif_stats","text":"","code":"# \\donttest{ data(\"HornedLizard_Pop\") data(\"HornedLizard_VCF\") Test <- Dif_stats(VCF = HornedLizard_VCF, pops = HornedLizard_Pop, ploidy = 2, statistic = \"both\", boots = 10, write = FALSE)# } #> Warning: The Div_Stats function has been deprecated as of PopGenHelpR v1.3.0 and will dissappear in v2.0.0. Please use the Differentiation function if you wish to estimate Fst, Nei's D, or Jost's D. #> Loading required package: vcfR #> Registered S3 method overwritten by 'ape': #> method from #> plot.mst spdep #> #> ***** *** vcfR *** ***** #> This is vcfR 1.15.0 #> browseVignettes('vcfR') # Documentation #> citation('vcfR') # Citation #> ***** ***** ***** ***** #> Loading required namespace: adegenet #> Formatting has finished, moving onto calculations #> Registered S3 method overwritten by 'pegas': #> method from #> print.amova ade4"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Differentiation.html","id":null,"dir":"Reference","previous_headings":"","what":"A function to estimate three measures of genetic differentiation using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Differentiation","title":"A function to estimate three measures of genetic differentiation using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Differentiation","text":"function estimate three measures genetic differentiation using geno files, vcf files, vcfR objects. Data assumed bi-allelic.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Differentiation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A function to estimate three measures of genetic differentiation using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Differentiation","text":"","code":"Differentiation( data, pops, statistic = \"all\", missing_value = NA, write = FALSE, prefix = NULL, population_col = NULL, individual_col = NULL )"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Differentiation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A function to estimate three measures of genetic differentiation using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Differentiation","text":"data Character. String indicating name vcf file, geno file vcfR object used analysis. pops Character. String indicating name population assignment file dataframe containing population assignment information individual data. file must order vcf file include columns specifying individual population individual belongs . first column contain individual names second column indicate population assignment individual. Alternatively, can indicate column containing individual population information using individual_col population_col arguments. statistic Character. String vector indicating statistic calculate. Options : ; statistics; Fst, Weir Cockerham (1984) Fst; NeisD, Nei's D statistic; JostsD, Jost's D. missing_value Character. String indicating missing data input data. assumed NA, may true (likely ) case geno files. write Boolean. Whether write output files current working directory. one two files statistic. Files named based statistic Fst_perpop.csv. prefix Character. Optional argument. String appended file output. Please provide prefix write set TRUE. population_col Numeric. Optional argument (number) indicating column contains population assignment information. individual_col Numeric. Optional argument (number) indicating column contains individuals (.e., sample name) data.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Differentiation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"A function to estimate three measures of genetic differentiation using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Differentiation","text":"list containing estimated heterozygosity statistics. per pop values calculated taking average per locus estimates.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Differentiation.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"A function to estimate three measures of genetic differentiation using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Differentiation","text":"Fst: Pembleton, L. W., Cogan, N. O., & Forster, J. W. (2013). StAMPP: R package calculation genetic differentiation structure mixed‐ploidy level populations. Molecular ecology resources, 13(5), 946-952. Weir, B. S., & Cockerham, C. C. (1984). Estimating F-statistics analysis population structure. evolution, 1358-1370. Nei's D: Nei, M. (1972). Genetic distance populations. American Naturalist, 106(949), 283-292. Pembleton, L. W., Cogan, N. O., & Forster, J. W. (2013). StAMPP: R package calculation genetic differentiation structure mixed‐ploidy level populations. Molecular ecology resources, 13(5), 946-952. Jost's D: Jost L (2008). GST relatives measure differentiation. Molecular Ecology, 17, 4015–4026.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Differentiation.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"A function to estimate three measures of genetic differentiation using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Differentiation","text":"Keaka Farleigh","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Differentiation.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A function to estimate three measures of genetic differentiation using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Differentiation","text":"","code":"# \\donttest{ data(\"HornedLizard_Pop\") data(\"HornedLizard_VCF\") Test <- Differentiation(data = HornedLizard_VCF, pops = HornedLizard_Pop, write = FALSE)# } #> [1] \"vcfR object detected, proceeding to formatting.\" #> Formatting has finished, moving onto calculations"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Div_Stats_Map.html","id":null,"dir":"Reference","previous_headings":"","what":"WARNING! This function has been deprecated and is no longer supported. Please use the Point_map function instead.\nA function to map diversity statistics. — Div_Stats_Map","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Point_map function instead.\nA function to map diversity statistics. — Div_Stats_Map","text":"WARNING! function deprecated longer supported. Please use Point_map function instead. function map diversity statistics.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Div_Stats_Map.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Point_map function instead.\nA function to map diversity statistics. — Div_Stats_Map","text":"","code":"Div_Stats_Map( dat, plot.type = \"all\", statistic, breaks = NULL, col, Lat_buffer = 1, Long_buffer = 1, write = FALSE, prefix = NULL )"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Div_Stats_Map.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Point_map function instead.\nA function to map diversity statistics. — Div_Stats_Map","text":"dat Data frame character string supplies input data. character string, file csv. first column statistic plotted named statistic argument. second column Population indicating population row belongs . third column standard deviation, fourth column Long indicating longitude, fifth column Lat, indicating latitude. plot.type Character string. Options , point, interpolated. recommended generate map points colored according heterozygosity well rater interpolated heterozygosity values. statistic Character string. statistic plotted. breaks Numeric. breaks used generate color ramp plotting. Users supply 3 values custom breaks desired. col Character vector indicating colors wish use plotting, three colors allowed (low, mid, high). first color low color, second middle, third high. Lat_buffer Numeric. buffer customize visualization. Long_buffer Numeric. buffer customize visualization. write Boolean. Whether write output file current working directory. prefix Character string appended file output.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Div_Stats_Map.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Point_map function instead.\nA function to map diversity statistics. — Div_Stats_Map","text":"list containing maps data frames used generate .","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Div_Stats_Map.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Point_map function instead.\nA function to map diversity statistics. — Div_Stats_Map","text":"","code":"# \\donttest{ data(Het_dat) Test_het <- Div_Stats_Map(dat = Het_dat, plot.type = 'all', statistic = \"Heterozygosity\", Lat_buffer = 1, Long_buffer = 1, write = FALSE, prefix = 'Test_het')# } #> [inverse distance weighted interpolation]"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Div_stats.html","id":null,"dir":"Reference","previous_headings":"","what":"WARNING! This function has been deprecated and is no longer supported. Please use the Heterozygosity and Private.alleles functions.\nA function to estimate heterozygosity and the number of private alleles from a vcf file. — Div_stats","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Heterozygosity and Private.alleles functions.\nA function to estimate heterozygosity and the number of private alleles from a vcf file. — Div_stats","text":"WARNING! function deprecated longer supported. Please use Heterozygosity Private.alleles functions. function estimate heterozygosity number private alleles vcf file.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Div_stats.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Heterozygosity and Private.alleles functions.\nA function to estimate heterozygosity and the number of private alleles from a vcf file. — Div_stats","text":"","code":"Div_stats(VCF, pops, ploidy, write = FALSE, prefix)"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Div_stats.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Heterozygosity and Private.alleles functions.\nA function to estimate heterozygosity and the number of private alleles from a vcf file. — Div_stats","text":"VCF Character string indicating name vcf file used analysis. pops Character string indicating name population assignment file. file four columns order vcf file. first column named Sample indicates sample name. second column named Population indicates population assignment individual. third column named Longitude indicates longitude sample. fourth column named Latitude indicates latitude sample. ploidy Numeric. ploidy data. write Boolean. Whether write output file current working directory. prefix Character string appended file output.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Div_stats.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Heterozygosity and Private.alleles functions.\nA function to estimate heterozygosity and the number of private alleles from a vcf file. — Div_stats","text":"list containing estimated diversity statistics, model output linear regression statistics latitude, model plots.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Div_stats.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Heterozygosity and Private.alleles functions.\nA function to estimate heterozygosity and the number of private alleles from a vcf file. — Div_stats","text":"","code":"# \\donttest{ data(\"HornedLizard_Pop\") data(\"HornedLizard_VCF\") Test <- Div_stats(VCF = HornedLizard_VCF, pops = HornedLizard_Pop, ploidy = 2, write = FALSE)# } #> Warning: The Div_Stats function has been deprecated as of PopGenHelpR v1.3.0 and will dissappear in v2.0.0. Please use the Heterozygosity function if you wish to estimate heterozygosity or the Private.alleles function if you wish to calculate the number of private alleles per population. Please use the Point_Map function if you wish to visualize the results on a map or plot. #> Registered S3 method overwritten by 'GGally': #> method from #> +.gg ggplot2 #> Registered S3 method overwritten by 'genetics': #> method from #> [.haplotype pegas #> Formatting has finished, moving onto calculations #> Heterozygosity calculated, moving to private alleles #> Private Alleles have been calculated, moving onto plotting #> Calculations have finished, the packages used to perform file formatting and calculations were #> vcfR, adegenet, and dartR for formatting, hierfstat to calculate heterozygosity, and poppr to calculate private alleles"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Fst_dat.html","id":null,"dir":"Reference","previous_headings":"","what":"A genetic differentiation matrix and locality information for each population. This data was generated\nby subsetting data of Farleigh et al., 2021. — Fst_dat","title":"A genetic differentiation matrix and locality information for each population. This data was generated\nby subsetting data of Farleigh et al., 2021. — Fst_dat","text":"symmetric matrix estimated genetic differentiation (Fst) 3 populations.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Fst_dat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A genetic differentiation matrix and locality information for each population. This data was generated\nby subsetting data of Farleigh et al., 2021. — Fst_dat","text":"","code":"data(Fst_dat)"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Fst_dat.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"A genetic differentiation matrix and locality information for each population. This data was generated\nby subsetting data of Farleigh et al., 2021. — Fst_dat","text":"list two elements: Fst_dat Data frame three rows three columns Loc_dat Data frame containing locality information population","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Fst_dat.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"A genetic differentiation matrix and locality information for each population. This data was generated\nby subsetting data of Farleigh et al., 2021. — Fst_dat","text":"Farleigh, K., Vladimirova, S. ., Blair, C., Bracken, J. T., Koochekian, N., Schield, D. R., ... & Jezkova, T. (2021). effects climate demographic history shaping genomic variation across populations Desert Horned Lizard (Phrynosoma platyrhinos). Molecular Ecology, 30(18), 4481-4496.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Fst_dat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A genetic differentiation matrix and locality information for each population. This data was generated\nby subsetting data of Farleigh et al., 2021. — Fst_dat","text":"","code":"data(Fst_dat) Fst <- Fst_dat[[1]] Loc <- Fst_dat[[2]] # \\donttest{ Test <- Dif_Stats_Map(dat = Fst, pops = Loc, neighbors = 2, col = c('#fd8d3c','#fc4e2a','#e31a1c','#bd0026','#800026'),Lat_buffer = 1, Long_buffer = 1)# } #> Warning: k greater than one-third of the number of data points Fstat_plot <- Pairwise_heatmap(dat = Fst, statistic = 'FST')"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Het_dat.html","id":null,"dir":"Reference","previous_headings":"","what":"A data frame of hypothetical heterozygosity data produced by Div_Stats. — Het_dat","title":"A data frame of hypothetical heterozygosity data produced by Div_Stats. — Het_dat","text":"Data frame containing 5 columns 3 rows","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Het_dat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A data frame of hypothetical heterozygosity data produced by Div_Stats. — Het_dat","text":"","code":"data(Het_dat)"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Het_dat.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"A data frame of hypothetical heterozygosity data produced by Div_Stats. — Het_dat","text":"data frame 5 columns 3 rows: Heterozygosity Estimated heterozygosity Pop Population assignment Standard.Deviation standard deviation Longitude Longitude Latitude Latitude","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Het_dat.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"A data frame of hypothetical heterozygosity data produced by Div_Stats. — Het_dat","text":"Coordinates population names taken Farleigh, K., Vladimirova, S. ., Blair, C., Bracken, J. T., Koochekian, N., Schield, D. R., ... & Jezkova, T. (2021). effects climate demographic history shaping genomic variation across populations Desert Horned Lizard (Phrynosoma platyrhinos). Molecular Ecology, 30(18), 4481-4496.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Het_dat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A data frame of hypothetical heterozygosity data produced by Div_Stats. — Het_dat","text":"","code":"# \\donttest{ data(Het_dat) Test_het <- Div_Stats_Map(dat = Het_dat, plot.type = 'all', statistic = \"Heterozygosity\", Lat_buffer = 1, Long_buffer = 1, write = FALSE, prefix = 'Test_het')# } #> [inverse distance weighted interpolation]"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Heterozygosity.html","id":null,"dir":"Reference","previous_headings":"","what":"A function to estimate seven measures of heterozygosity using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Heterozygosity","title":"A function to estimate seven measures of heterozygosity using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Heterozygosity","text":"function estimate seven measures heterozygosity using geno files, vcf files, vcfR objects. Data assumed bi-allelic.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Heterozygosity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A function to estimate seven measures of heterozygosity using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Heterozygosity","text":"","code":"Heterozygosity( data, pops, statistic = \"all\", missing_value = NA, write = FALSE, prefix = NULL, population_col = NULL, individual_col = NULL )"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Heterozygosity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A function to estimate seven measures of heterozygosity using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Heterozygosity","text":"data Character. String indicating name vcf file, geno file vcfR object used analysis. pops Character. String indicating name population assignment file dataframe containing population assignment information individual data. file must order vcf file include columns specifying individual population individual belongs . first column contain individual names second column indicate population assignment individual. Alternatively, can indicate column containing individual population information using individual_col population_col arguments. statistic Character. String vector indicating statistic calculate. Options : ; statistics; Ho, observed heterozygosity; , expected heterozygosity; PHt, proportion heterozygous loci; Hs_exp, heterozygosity standardized average expected heterozygosity; Hs_obs, heterozygosity standardized average observed heterozygosity; IR, internal relatedness; HL, homozygosity locus. missing_value Character. String indicating missing data input data. assumed NA, may true (likely ) case geno files. write Boolean. Whether write output files current working directory. one two files statistic. Files named based statistic Ho_perpop.csv Ho_perloc.csv. prefix Character. Optional argument. String appended file output. Please provide prefix write set TRUE. population_col Numeric. Optional argument (number) indicating column contains population assignment information. individual_col Numeric. Optional argument (number) indicating column contains individuals (.e., sample name) data.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Heterozygosity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"A function to estimate seven measures of heterozygosity using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Heterozygosity","text":"list containing estimated heterozygosity statistics. per pop values calculated taking average per locus estimates.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Heterozygosity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"A function to estimate seven measures of heterozygosity using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Heterozygosity","text":"Expected () observed heterozygosity (Ho): Nei, M. (1987) Molecular Evolutionary Genetics. Columbia University Press Homozygosity locus (HL) internal relatedness (IR): Alho, J. S., Välimäki, K., & Merilä, J. (2010). Rhh: R extension estimating multilocus heterozygosity heterozygosity–heterozygosity correlation. Molecular ecology resources, 10(4), 720-722. Amos, W., Worthington Wilmer, J., Fullard, K., Burg, T. M., Croxall, J. P., Bloch, D., & Coulson, T. (2001). influence parental relatedness reproductive success. Proceedings Royal Society London. Series B: Biological Sciences, 268(1480), 2021-2027. Aparicio, J. M., Ortego, J., & Cordero, P. J. (2006). weigh estimate heterozygosity, alleles loci?. Molecular Ecology, 15(14), 4659-4665. Heterozygosity standardized expected (Hs_exp) observed heterozygosity (Hs_obs): Coltman, D. W., Pilkington, J. G., Smith, J. ., & Pemberton, J. M. (1999). Parasite‐mediated selection Inbred Soay sheep free‐living island populaton. Evolution, 53(4), 1259-1267.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Heterozygosity.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"A function to estimate seven measures of heterozygosity using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Heterozygosity","text":"Keaka Farleigh","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Heterozygosity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A function to estimate seven measures of heterozygosity using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Heterozygosity","text":"","code":"# \\donttest{ data(\"HornedLizard_Pop\") data(\"HornedLizard_VCF\") Test <- Heterozygosity(data = HornedLizard_VCF, pops = HornedLizard_Pop, write = FALSE)# } #> [1] \"vcfR object detected, proceeding to formatting.\" #> Formatting has finished, moving onto calculations"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/HornedLizard_Pop.html","id":null,"dir":"Reference","previous_headings":"","what":"A population assignment data frame to be used in Div_stats and Dif_stats. — HornedLizard_Pop","title":"A population assignment data frame to be used in Div_stats and Dif_stats. — HornedLizard_Pop","text":"Data frame containing 4 columns 72 rows","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/HornedLizard_Pop.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A population assignment data frame to be used in Div_stats and Dif_stats. — HornedLizard_Pop","text":"","code":"data(HornedLizard_Pop)"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/HornedLizard_Pop.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"A population assignment data frame to be used in Div_stats and Dif_stats. — HornedLizard_Pop","text":"data frame 4 columns 72 rows: Sample Sample Name Population Population assignment according sNMF results (see citation) Longitude Longitude Latitude Latitude","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/HornedLizard_Pop.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"A population assignment data frame to be used in Div_stats and Dif_stats. — HornedLizard_Pop","text":"Coordinates population names taken Farleigh, K., Vladimirova, S. ., Blair, C., Bracken, J. T., Koochekian, N., Schield, D. R., ... & Jezkova, T. (2021). effects climate demographic history shaping genomic variation across populations Desert Horned Lizard (Phrynosoma platyrhinos). Molecular Ecology, 30(18), 4481-4496.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/HornedLizard_Pop.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A population assignment data frame to be used in Div_stats and Dif_stats. — HornedLizard_Pop","text":"","code":"# \\donttest{ data(\"HornedLizard_Pop\") data(\"HornedLizard_VCF\") Test <- Div_stats(VCF = HornedLizard_VCF, pops = HornedLizard_Pop, ploidy = 2, write = FALSE)# } #> Warning: The Div_Stats function has been deprecated as of PopGenHelpR v1.3.0 and will dissappear in v2.0.0. Please use the Heterozygosity function if you wish to estimate heterozygosity or the Private.alleles function if you wish to calculate the number of private alleles per population. Please use the Point_Map function if you wish to visualize the results on a map or plot. #> Formatting has finished, moving onto calculations #> Heterozygosity calculated, moving to private alleles #> Private Alleles have been calculated, moving onto plotting #> Calculations have finished, the packages used to perform file formatting and calculations were #> vcfR, adegenet, and dartR for formatting, hierfstat to calculate heterozygosity, and poppr to calculate private alleles"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/HornedLizard_VCF.html","id":null,"dir":"Reference","previous_headings":"","what":"A vcfR object to be used in Div_stats and Dif_stats. — HornedLizard_VCF","title":"A vcfR object to be used in Div_stats and Dif_stats. — HornedLizard_VCF","text":"Data frame containing 4 columns 72 rows","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/HornedLizard_VCF.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A vcfR object to be used in Div_stats and Dif_stats. — HornedLizard_VCF","text":"","code":"data(HornedLizard_Pop)"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/HornedLizard_VCF.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"A vcfR object to be used in Div_stats and Dif_stats. — HornedLizard_VCF","text":"vcfR object vcfR object vcfR object containing genotype sample informaiton 72 individuals.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/HornedLizard_VCF.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"A vcfR object to be used in Div_stats and Dif_stats. — HornedLizard_VCF","text":"Farleigh, K., Vladimirova, S. ., Blair, C., Bracken, J. T., Koochekian, N., Schield, D. R., ... & Jezkova, T. (2021). effects climate demographic history shaping genomic variation across populations Desert Horned Lizard (Phrynosoma platyrhinos). Molecular Ecology, 30(18), 4481-4496.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/HornedLizard_VCF.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A vcfR object to be used in Div_stats and Dif_stats. — HornedLizard_VCF","text":"","code":"# \\donttest{ data(\"HornedLizard_Pop\") data(\"HornedLizard_VCF\") Test <- Div_stats(VCF = HornedLizard_VCF, pops = HornedLizard_Pop, ploidy = 2, write = FALSE)# } #> Warning: The Div_Stats function has been deprecated as of PopGenHelpR v1.3.0 and will dissappear in v2.0.0. Please use the Heterozygosity function if you wish to estimate heterozygosity or the Private.alleles function if you wish to calculate the number of private alleles per population. Please use the Point_Map function if you wish to visualize the results on a map or plot. #> Formatting has finished, moving onto calculations #> Heterozygosity calculated, moving to private alleles #> Private Alleles have been calculated, moving onto plotting #> Calculations have finished, the packages used to perform file formatting and calculations were #> vcfR, adegenet, and dartR for formatting, hierfstat to calculate heterozygosity, and poppr to calculate private alleles"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Network_map.html","id":null,"dir":"Reference","previous_headings":"","what":"A function to map statistics (i.e., genetic differentiation) between points as a network on a map. — Network_map","title":"A function to map statistics (i.e., genetic differentiation) between points as a network on a map. — Network_map","text":"function map statistics (.e., genetic differentiation) points network map.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Network_map.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A function to map statistics (i.e., genetic differentiation) between points as a network on a map. — Network_map","text":"","code":"Network_map( dat, pops, neighbors, col, statistic = NULL, breaks = NULL, Lat_buffer = 1, Long_buffer = 1 )"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Network_map.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A function to map statistics (i.e., genetic differentiation) between points as a network on a map. — Network_map","text":"dat Data frame character string supplies input data. character string, file csv. csv, 1st row contain individual/population names. columns also named fashion. pops Data frame character string supplies input data. character string, file csv. columns named Sample, containing sample IDs; Population indicating population assignment individual; Long, indicating longitude sample; Lat, indicating latitude sample. neighbors Numeric character. number neighbors plot connections , specific relationship want visualize. Names match population assignment file seperated underscore. want visualize relationship East West, example, set neighbors = \"East_West\". col Character vector indicating colors wish use plotting. statistic Character indicating statistic plotted. used title legend. legend title blank left NULL. breaks Numeric. breaks used generate color ramp plotting. Users supply 3 values custom breaks desired. Lat_buffer Numeric. buffer customize visualization. Long_buffer Numeric. buffer customize visualization.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Network_map.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"A function to map statistics (i.e., genetic differentiation) between points as a network on a map. — Network_map","text":"list containing map matrix used plot map.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Network_map.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"A function to map statistics (i.e., genetic differentiation) between points as a network on a map. — Network_map","text":"Keaka Farleigh","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Network_map.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A function to map statistics (i.e., genetic differentiation) between points as a network on a map. — Network_map","text":"","code":"# \\donttest{ data(Fst_dat) Fst <- Fst_dat[[1]] Loc <- Fst_dat[[2]] Test <- Network_map(dat = Fst, pops = Loc, neighbors = 2,col = c('#4575b4', '#91bfdb', '#e0f3f8','#fd8d3c','#fc4e2a'), statistic = \"Fst\", Lat_buffer = 1, Long_buffer = 1)# } #> Warning: k greater than one-third of the number of data points"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Pairwise_heatmap.html","id":null,"dir":"Reference","previous_headings":"","what":"A function to plot a heatmap from a symmetric matrix. — Pairwise_heatmap","title":"A function to plot a heatmap from a symmetric matrix. — Pairwise_heatmap","text":"function plot heatmap symmetric matrix.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Pairwise_heatmap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A function to plot a heatmap from a symmetric matrix. — Pairwise_heatmap","text":"","code":"Pairwise_heatmap(dat, statistic, col = NULL)"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Pairwise_heatmap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A function to plot a heatmap from a symmetric matrix. — Pairwise_heatmap","text":"dat Data frame character string supplies input data. character string, file csv. csv, 1st row contain individual/population names. columns also named fashion. statistic Character indicating statistic represented matrix, used label plot. col Character vector indicating colors used plotting. vector contain two colors, first low value, second high value.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Pairwise_heatmap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"A function to plot a heatmap from a symmetric matrix. — Pairwise_heatmap","text":"heatmap plot","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Pairwise_heatmap.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A function to plot a heatmap from a symmetric matrix. — Pairwise_heatmap","text":"","code":"# \\donttest{ #' data(Fst_dat) Fst <- Fst_dat[[1]] Fstat_plot <- Pairwise_heatmap(dat = Fst, statistic = 'FST')# }"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Piechart_map.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot a map of ancestry pie charts. — Piechart_map","title":"Plot a map of ancestry pie charts. — Piechart_map","text":"Plot map ancestry pie charts.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Piechart_map.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot a map of ancestry pie charts. — Piechart_map","text":"","code":"Piechart_map( anc.mat, pops, K, plot.type = \"all\", col, piesize = 0.35, Lat_buffer, Long_buffer )"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Piechart_map.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot a map of ancestry pie charts. — Piechart_map","text":"anc.mat Data frame character string supplies input data. character string, file csv. first column names sample/population, followed estimated contribution cluster individual/pop. pops Data frame character string supplies input data. character string, file csv. columns named Sample, containing sample IDs; Population indicating population assignment individual, population sample names must type (.e., numeric characters); Long, indicating longitude sample; Lat, indicating latitude sample. K Numeric.number genetic clusters data set, please contact package authors need help . plot.type Character string. Options , individual, population. default recommended, plot piechart map individuals populations. col Character vector indicating colors wish use plotting. piesize Numeric. radius pie chart ancestry mapping. Lat_buffer Numeric. buffer customize visualization. Long_buffer Numeric. buffer customize visualization.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Piechart_map.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot a map of ancestry pie charts. — Piechart_map","text":"list containing plots data frames used generate plots.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Piechart_map.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot a map of ancestry pie charts. — Piechart_map","text":"Keaka Farleigh","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Piechart_map.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot a map of ancestry pie charts. — Piechart_map","text":"","code":"# \\donttest{ data(Q_dat) Qmat <- Q_dat[[1]] rownames(Qmat) <- Qmat[,1] Loc <- Q_dat[[2]] Test_all <- Piechart_map(anc.mat = Qmat, pops = Loc, K = 5, plot.type = 'all', col = c('#d73027', '#fc8d59', '#e0f3f8', '#91bfdb', '#4575b4'), piesize = 0.35, Lat_buffer = 1, Long_buffer = 1)# }"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Plot_ancestry.html","id":null,"dir":"Reference","previous_headings":"","what":"WARNING! This function has been deprecated and is no longer supported. Please use the Ancestry_barchart and Piechart_map functions.\nPlot an ancestry matrix and map of ancestry pie charts. — Plot_ancestry","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Ancestry_barchart and Piechart_map functions.\nPlot an ancestry matrix and map of ancestry pie charts. — Plot_ancestry","text":"WARNING! function deprecated longer supported. Please use Ancestry_barchart Piechart_map functions. Plot ancestry matrix map ancestry pie charts.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Plot_ancestry.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Ancestry_barchart and Piechart_map functions.\nPlot an ancestry matrix and map of ancestry pie charts. — Plot_ancestry","text":"","code":"Plot_ancestry( anc.mat, pops, K, plot.type = \"all\", col, piesize = 0.35, Lat_buffer, Long_buffer )"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Plot_ancestry.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Ancestry_barchart and Piechart_map functions.\nPlot an ancestry matrix and map of ancestry pie charts. — Plot_ancestry","text":"anc.mat Data frame character string supplies input data. character string, file csv. first column names sample/population, followed estimated contribution cluster individual/pop. pops Data frame character string supplies input data. character string, file csv. columns named Sample, containing sample IDs; Population indicating population assignment individual, population sample names must type (.e., numeric characters); Long, indicating longitude sample; Lat, indicating latitude sample. K Numeric.number genetic clusters data set, please contact package authors need help . plot.type Character string. Options , individual, population. default recommended, plot barchart piechart map individuals populations. col Character vector indicating colors wish use plotting. piesize Numeric. radius pie chart ancestry mapping. Lat_buffer Numeric. buffer customize visualization. Long_buffer Numeric. buffer customize visualization.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Plot_ancestry.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Ancestry_barchart and Piechart_map functions.\nPlot an ancestry matrix and map of ancestry pie charts. — Plot_ancestry","text":"list containing plots data frames used generate plots.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Plot_ancestry.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Ancestry_barchart and Piechart_map functions.\nPlot an ancestry matrix and map of ancestry pie charts. — Plot_ancestry","text":"","code":"# \\donttest{ data(Q_dat) Qmat <- Q_dat[[1]] rownames(Qmat) <- Qmat[,1] Loc <- Q_dat[[2]] Test_all <- Plot_ancestry(anc.mat = Qmat, pops = Loc, K = 5, plot.type = 'all', col <- c('red', 'maroon', 'navy', 'cyan', 'blue'), piesize = 0.35, Lat_buffer = 1, Long_buffer = 1)# } #> Warning: The Plot_ancestry function has been deprecated as of PopGenHelpR v1.3.0 and will dissappear in v2.0.0. Please use the Piechart_map and Ancestry_barchart function(s) if you wish to plot ancestry maps or barcharts."},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Plot_coordinates.html","id":null,"dir":"Reference","previous_headings":"","what":"A function to plot coordinates on a map. — Plot_coordinates","title":"A function to plot coordinates on a map. — Plot_coordinates","text":"function plot coordinates map.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Plot_coordinates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A function to plot coordinates on a map. — Plot_coordinates","text":"","code":"Plot_coordinates( dat, col = c(\"#A9A9A9\", \"#000000\"), size = 3, Lat_buffer = 1, Long_buffer = 1 )"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Plot_coordinates.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A function to plot coordinates on a map. — Plot_coordinates","text":"dat Data frame character string supplies input data. character string, file csv. coordinates row indicated columns named Longitude Latitude. col Character vector indicating colors wish use plotting, two colors allowed. first color fill color, second outline color. example, want red points black outline set col col = c(\"#FF0000\", \"#000000\"). size Numeric. size points plot. Lat_buffer Numeric. buffer customize visualization. Long_buffer Numeric. buffer customize visualization.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Plot_coordinates.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"A function to plot coordinates on a map. — Plot_coordinates","text":"ggplot object.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Plot_coordinates.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"A function to plot coordinates on a map. — Plot_coordinates","text":"Keaka Farleigh","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Plot_coordinates.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A function to plot coordinates on a map. — Plot_coordinates","text":"","code":"# \\donttest{ data(\"HornedLizard_Pop\") Test <- Plot_coordinates(HornedLizard_Pop)# }"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Point_map.html","id":null,"dir":"Reference","previous_headings":"","what":"A function to map statistics as colored points on a map. — Point_map","title":"A function to map statistics as colored points on a map. — Point_map","text":"function map statistics colored points map.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Point_map.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A function to map statistics as colored points on a map. — Point_map","text":"","code":"Point_map( dat, statistic, size = 3, breaks = NULL, col, out.col = NULL, Lat_buffer = 1, Long_buffer = 1 )"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Point_map.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A function to map statistics as colored points on a map. — Point_map","text":"dat Data frame character string supplies input data. character string, file csv. first column statistic plotted. coordinates row indicated columns named Longitude Latitude. statistic Character string. statistic plotted. size Numeric. size points plot. breaks Numeric. breaks used generate color ramp plotting. Users supply 3 values custom breaks desired. col Character vector indicating colors wish use plotting, three colors allowed (low, mid, high). first color low color, second middle, third high. .col Character. color outlining points map. visible outline left NULL. Lat_buffer Numeric. buffer customize visualization. Long_buffer Numeric. buffer customize visualization.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Point_map.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"A function to map statistics as colored points on a map. — Point_map","text":"list containing maps data frames used generate .","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Point_map.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"A function to map statistics as colored points on a map. — Point_map","text":"Keaka Farleigh","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Point_map.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A function to map statistics as colored points on a map. — Point_map","text":"","code":"# \\donttest{ data(Het_dat) Test <- Point_map(Het_dat, statistic = \"Heterozygosity\")# }"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Private.alleles.html","id":null,"dir":"Reference","previous_headings":"","what":"A function to estimate the number of private alleles in each population. — Private.alleles","title":"A function to estimate the number of private alleles in each population. — Private.alleles","text":"function estimate number private alleles population.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Private.alleles.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A function to estimate the number of private alleles in each population. — Private.alleles","text":"","code":"Private.alleles( data, pops, write = FALSE, prefix = NULL, population_col = NULL, individual_col = NULL )"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Private.alleles.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A function to estimate the number of private alleles in each population. — Private.alleles","text":"data Character. String indicating name vcf file vcfR object used analysis. pops Character. String indicating name population assignment file dataframe containing population assignment information individual data. file must order vcf file include columns specifying individual population individual belongs . first column contain individual names second column indicate population assignment individual. Alternatively, can indicate column containing individual population information using individual_col population_col arguments. write Boolean. Optional argument indicating Whether write output file current working directory. output files; 1) table private allele counts per population (named prefix_PrivateAlleles_countperpop) 2) metadata associated private alleles (named prefix_PrivateAlleles_metadata). Please supply prefix write files working directory best practice. prefix Character. Optional argument indicating string appended file output. Please set prefix write TRUE. population_col Numeric. Optional argument (number) indicating column contains population assignment information. individual_col Numeric. Optional argument (number) indicating column contains individuals (.e., sample name) data.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Private.alleles.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"A function to estimate the number of private alleles in each population. — Private.alleles","text":"list containing count private alleles population metadata alleles. metadata list contains private allele locus name population.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Private.alleles.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"A function to estimate the number of private alleles in each population. — Private.alleles","text":"Keaka Farleigh","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Private.alleles.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A function to estimate the number of private alleles in each population. — Private.alleles","text":"","code":"# \\donttest{ data(\"HornedLizard_Pop\") data(\"HornedLizard_VCF\") Test <- Private.alleles(data = HornedLizard_VCF, pops = HornedLizard_Pop, write = FALSE)# } #> [1] \"vcfR object detected, proceeding to formatting.\" #> Formatting has finished, moving onto calculations #> [1] \"Finished private allele calculations for East\" #> [1] \"Finished private allele calculations for South\" #> [1] \"Finished private allele calculations for West\""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Q_dat.html","id":null,"dir":"Reference","previous_headings":"","what":"A list representing a q-matrix and the locality information associated with the qmatrix — Q_dat","title":"A list representing a q-matrix and the locality information associated with the qmatrix — Q_dat","text":"List two elements","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Q_dat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A list representing a q-matrix and the locality information associated with the qmatrix — Q_dat","text":"","code":"data(Q_dat)"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Q_dat.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"A list representing a q-matrix and the locality information associated with the qmatrix — Q_dat","text":"list two elements: Qmat q-matrix 6 columns 30 rows, first column lists sample name remaining 5 represent contribution genetic cluster individuals ancestry Loc_dat locality information individual q-matrix","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Q_dat.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"A list representing a q-matrix and the locality information associated with the qmatrix — Q_dat","text":"Data generated package authors.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Q_dat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A list representing a q-matrix and the locality information associated with the qmatrix — Q_dat","text":"","code":"# \\donttest{ data(Q_dat) Qmat <- Q_dat[[1]] rownames(Qmat) <- Qmat[,1] Loc <- Q_dat[[2]] Test_all <- Plot_ancestry(anc.mat = Qmat, pops = Loc, K = 5, plot.type = 'all', col <- c('red', 'maroon', 'navy', 'cyan', 'blue'), piesize = 0.35, Lat_buffer = 1, Long_buffer = 1)# } #> Warning: The Plot_ancestry function has been deprecated as of PopGenHelpR v1.3.0 and will dissappear in v2.0.0. Please use the Piechart_map and Ancestry_barchart function(s) if you wish to plot ancestry maps or barcharts."},{"path":"https://kfarleigh.github.io/PopGenHelpR/news/index.html","id":"popgenhelpr-130","dir":"Changelog","previous_headings":"","what":"PopGenHelpR 1.3.0","title":"PopGenHelpR 1.3.0","text":"February 15th, 2024 Plot_coordinates function added make sample maps coordinates. Point_map function replaced Div_stats_map statistic argument added highlight functions utility allow users name map legend. Dif_stats_map changed Network_map statistic argument added highlight functions utility allow users name map legend. Plot_ancestry split Piechart_Map Ancestry_barchart easier users determine function appropriate analysis. Differentiation added estimate Fst, Nei’s D, Jost’s D. Please see documentation details. Heterozygosity added estimate 7 different measures heterozygosity. Please see documentation details. Private.alleles added calculate number private alleles population. Dif_Stats function deprecated, please used Differentiation function calculate pairwise differentiation populations (Fst, Nei’s D, Jost’s D) individuals (Nei’s D). Div_Stats function deprecated, please use Heterozygosity function wish estimate heterozygosity Private.alleles function wish calculate number private alleles per population. Please use Point_Map function wish visualize results map plot.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/news/index.html","id":"popgenhelpr-122","dir":"Changelog","previous_headings":"","what":"PopGenHelpR 1.2.2","title":"PopGenHelpR 1.2.2","text":"October 2nd, 2023 Dif_stats_Map, Div_Stats_Map, Plot_ancestry updated use base color #f4f4f4 instead grey99 throwing error users. piesize argument added Plot_ancestry, original value 0.35 found high, especially cases users mapping smaller geographic area.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/news/index.html","id":"popgenhelpr-121","dir":"Changelog","previous_headings":"","what":"PopGenHelpR 1.2.1","title":"PopGenHelpR 1.2.1","text":"CRAN release: 2023-08-16 August 14th, 2023 Div_Stats Dif_stats updated accept vcf file vcfR object input. Div_Stats Dif_stats updated accept csv file data frame population assignment. Plot_ancestry updated generate structure-like plots using ggplot2 instead base R handle character numeric values individual population names. Note individual populations must type (.e., numeric characters). dependency rnaturalearth longer used. now use spData mapping data. vignette updated accommodate changes noted .","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/news/index.html","id":"popgenhelpr-111","dir":"Changelog","previous_headings":"","what":"PopGenHelpR 1.1.1","title":"PopGenHelpR 1.1.1","text":"July 17th, 2023 horned lizard data added examples can run users. write argument added Div_Stats Dif_stats files automatically written working directory.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/news/index.html","id":"popgenhelpr-101","dir":"Changelog","previous_headings":"","what":"PopGenHelpR 1.0.1","title":"PopGenHelpR 1.0.1","text":"July 17th, 2023 PopGenHelpR updated rnaturalearthhires Suggests field DESCRIPTION file now use conditonally.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/news/index.html","id":"popgenhelpr-100","dir":"Changelog","previous_headings":"","what":"PopGenHelpR 1.0.0","title":"PopGenHelpR 1.0.0","text":"CRAN release: 2023-02-13 First development PopGenHelpR, publication Github, submission CRAN (02/06/2023)","code":""}] +[{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc.  Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_PCA.html","id":"purpose","dir":"Articles","previous_headings":"","what":"Purpose","title":"Principal component analysis in PopGenHelpR","text":"perform principal component analysis using PCA function PopGenHelpR.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_PCA.html","id":"overview","dir":"Articles","previous_headings":"","what":"Overview","title":"Principal component analysis in PopGenHelpR","text":"Principal component analysis (PCA) widely used technique identify patterns genetic structure genomic data data really. PCA commonly paired structure-like analyses since PCA model-free, meaning based biological model (see Patterson et al., 2006 discussion model vs model-free approaches). perform PCA visualize results. Note use ggplot2 visualize results, PopGenHelpR.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_PCA.html","id":"load-the-data","dir":"Articles","previous_headings":"Overview","what":"Load the data","title":"Principal component analysis in PopGenHelpR","text":"","code":"# Load PopGenHelpR library(PopGenHelpR) library(ggplot2) # Load data data(\"HornedLizard_VCF\") data(\"HornedLizard_Pop\")"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_PCA.html","id":"performing-a-pca-in-popgenhelpr","dir":"Articles","previous_headings":"","what":"Performing a PCA in PopGenHelpR","title":"Principal component analysis in PopGenHelpR","text":"Running PCA PopGenHelpR straightforward requires genetic data. One caveat data must complete, meaning missing data. means impute genomic data sets, perform stringent filtering; usually use LEA impute data (Frichot et al., 2015). HL_pca object list two elements. First, loadings individual (sample) principal components. Second, percent variance explained principal component (PC). expect first PCs explain majority variance, researchers generate PCA scatter plots using first PCs.","code":"HL_pca <- PCA(HornedLizard_VCF)"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_PCA.html","id":"visualizng-the-pca-results","dir":"Articles","previous_headings":"","what":"Visualizng the PCA results","title":"Principal component analysis in PopGenHelpR","text":"Let’s see much variance explained first 10 PCs. see first two principal components account majority variance, generate pca scatter plot using axes. color points according population/genetic cluster belong . commonly done see model-free (e.g., PCA) model-based (e.g., sNMF) analyses agree. also require additional information (population assignment file) color points. see 3 main clusters PCA individuals largely cluster population/genetic cluster assigned sNMF, exception sample E_71_7760.","code":"Var_exp <- as.data.frame(t(HL_pca$`Variance Explained`)) Var_exp$PC <- seq(1:nrow(Var_exp)) ## Plot the percent variance explained ggplot(Var_exp, aes(x = PC, y = `Percent variance explained`)) + geom_bar(stat = \"identity\") + theme_classic() # Get the population information Pop <- HornedLizard_Pop # Check to see if the PCA individuals and Pop indivudals are ordered in the same way, we expect it to be TRUE rownames(Dat_loadings) == Pop$Sample # Isolate loadings for the first 2 PCs Scores_toplot <- as.data.frame(Dat_loadings[,1:2]) Scores_toplot$group <- Pop$Population # Set colors for each group Scores_toplot$group[Scores_toplot$group == 'South'] <- \"#d73027\" Scores_toplot$group[Scores_toplot$group == 'East'] <- \"#74add1\" Scores_toplot$group[Scores_toplot$group == 'West'] <- \"#313695\" # Create a custom theme theme<-theme(panel.background = element_blank(),panel.border=element_rect(fill=NA), panel.grid.major = element_blank(),panel.grid.minor = element_blank(), strip.background=element_blank(),axis.text.x=element_text(colour=\"black\"), axis.text.y=element_text(colour=\"black\"),axis.ticks=element_line(colour=\"black\"), plot.margin=unit(c(1,1,1,1),\"line\")) # Plot and include the variance explained by the axes wer are plotting ggplot(Scores_toplot, aes(x = PC1, y = PC2)) + geom_point(shape = 21, color = \"black\", fill = Scores_toplot$group, size = 3) + scale_shape_identity() + theme + ylab(paste(\"PC2 (\", round(Dat_pc_var[2,1],2),\"% variance explained)\", sep = \"\")) + xlab(paste(\"PC1 (\", round(Dat_pc_var[1,1],2),\"% variance explained)\", sep = \"\"))"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_PCA.html","id":"questions","dir":"Articles","previous_headings":"","what":"Questions???","title":"Principal component analysis in PopGenHelpR","text":"Please email Keaka Farleigh (farleik@miamioh.edu) need help generating q-matrix anything else.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_PCA.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"Principal component analysis in PopGenHelpR","text":"Frichot, E., & François, O. (2015). LEA: R package landscape ecological association studies. Methods Ecology Evolution, 6(8), 925-929. https://doi.org/10.1111/2041-210X.12382 Patterson, N., Price, . L., & Reich, D. (2006). Population structure eigenanalysis. PLoS genetics, 2(12), e190. https://doi.org/10.1371/journal.pgen.0020190","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_benchmarking.html","id":"purpose","dir":"Articles","previous_headings":"","what":"Purpose","title":"Benchmarking PopGenHelpR with adegenet, hierfstat, mmod, and StAMPP","text":"compare performance PopGenHelpR R packages available CRAN. , list packages compare PopGenHelpR statistics comparison. Fst Nei’s D StAMPP (Pembleton et al., 2013) Jost’s D mmod (Winter et al., 2017) Expected Observed Heterozygosity hierfstat (Goudet, 2005) adegenet (Jombart, 2008)","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_benchmarking.html","id":"lets-begin","dir":"Articles","previous_headings":"Purpose","what":"Let’s Begin","title":"Benchmarking PopGenHelpR with adegenet, hierfstat, mmod, and StAMPP","text":"First load packages data PopGenHelpR. data comes Farleigh et al. (2021). also load vcfR convert data formats (Knaus & Grunwald, 2017).","code":"# Load the packages library(PopGenHelpR) library(adegenet) #> Loading required package: ade4 #> #> /// adegenet 2.1.10 is loaded //////////// #> #> > overview: '?adegenet' #> > tutorials/doc/questions: 'adegenetWeb()' #> > bug reports/feature requests: adegenetIssues() library(hierfstat) #> #> Attaching package: 'hierfstat' #> The following objects are masked from 'package:adegenet': #> #> Hs, read.fstat library(StAMPP) #> Loading required package: pegas #> Loading required package: ape #> #> Attaching package: 'ape' #> The following objects are masked from 'package:hierfstat': #> #> pcoa, varcomp #> Registered S3 method overwritten by 'pegas': #> method from #> print.amova ade4 #> #> Attaching package: 'pegas' #> The following object is masked from 'package:ape': #> #> mst #> The following object is masked from 'package:ade4': #> #> amova library(mmod) library(vcfR) #> #> ***** *** vcfR *** ***** #> This is vcfR 1.15.0 #> browseVignettes('vcfR') # Documentation #> citation('vcfR') # Citation #> ***** ***** ***** ***** #> #> Attaching package: 'vcfR' #> The following objects are masked from 'package:pegas': #> #> getINFO, write.vcf # Load the data data(\"HornedLizard_VCF\") data(\"HornedLizard_Pop\")"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_benchmarking.html","id":"fst-and-neis-d-comparison","dir":"Articles","previous_headings":"","what":"FST and Nei’s D Comparison","title":"Benchmarking PopGenHelpR with adegenet, hierfstat, mmod, and StAMPP","text":"compare PopGenHelpR StAMPP. packages use formulas Weir Cockerham (1984) ane Nei (1972) calculate FST Nei’s D, respectively want make sure estimates consistent across packages. First, need format data StAMPP Now can calculate statistics. Let’s start FST. Let’s inspect results. Now move onto Nei’s D. can use genlight created FST calculations. calculate Nei’s D population’s individual’s. Compare results like FST. Note PopGenHelpR reports result lower triangular element set upper triangular element Stmp_popND Stmp_indND objects NA. see difference small rounding. Let’s move onto Jost’s D comparison mmod.","code":"PGH_fst <- Differentiation(dat = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"Fst\") #> [1] \"vcfR object detected, proceeding to formatting.\" #> Formatting has finished, moving onto calculations Stmp_fst <- stamppFst(Glight, nboots = 0) PGH_fst$Fst #> East South West #> East NA NA NA #> South 0.2511135 NA NA #> West 0.3905512 0.3029886 NA Stmp_fst #> East South West #> East NA NA NA #> South 0.2511135 NA NA #> West 0.3905512 0.3029886 NA # Is there a difference between the two? Fst_comparison <- PGH_fst$Fst-Stmp_fst summary(Fst_comparison) #> East South West #> Min. :0 Min. :0 Min. : NA #> 1st Qu.:0 1st Qu.:0 1st Qu.: NA #> Median :0 Median :0 Median : NA #> Mean :0 Mean :0 Mean :NaN #> 3rd Qu.:0 3rd Qu.:0 3rd Qu.: NA #> Max. :0 Max. :0 Max. : NA #> NA's :1 NA's :2 NA's :3 PGH_ND <- Differentiation(data = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"NeisD\") #> [1] \"vcfR object detected, proceeding to formatting.\" #> Formatting has finished, moving onto calculations # StAMPP population Nei's D Stmp_popND <- stamppNeisD(Glight) # StAMPP individual Nei's D Stmp_indND <- stamppNeisD(Glight, pop = FALSE) # Population comparison PGH_ND$NeisD_pop #> East South West #> East 0.00000000 NA NA #> South 0.09005846 0.0000000 NA #> West 0.19806009 0.1148848 0 Stmp_popND #> [,1] [,2] [,3] #> East 0.000000 0.090058 0.198060 #> South 0.090058 0.000000 0.114885 #> West 0.198060 0.114885 0.000000 # Set StAMPP upper diagnoals to NA Stmp_popND[upper.tri(Stmp_popND)] <- NA Stmp_indND[upper.tri(Stmp_indND)] <- NA popND_comparison <- PGH_ND$NeisD_pop-Stmp_popND summary(popND_comparison) #> East South West #> Min. :0.000e+00 Min. :-2e-07 Min. :0 #> 1st Qu.:4.518e-08 1st Qu.:-1e-07 1st Qu.:0 #> Median :9.036e-08 Median :-1e-07 Median :0 #> Mean :1.840e-07 Mean :-1e-07 Mean :0 #> 3rd Qu.:2.760e-07 3rd Qu.: 0e+00 3rd Qu.:0 #> Max. :4.615e-07 Max. : 0e+00 Max. :0 #> NA's :1 NA's :2 # Get the mean difference mean(popND_comparison, na.rm = T) #> [1] 6.038476e-08 # Individual comparison, uncomment if you want to see it #PGH_ND$NeisD_ind #Stmp_indND indND_comparison <- PGH_ND$NeisD_ind - Stmp_indND mean(indND_comparison, na.rm = T) #> [1] 5.807753e-09"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_benchmarking.html","id":"josts-d-comparison","dir":"Articles","previous_headings":"","what":"Jost’s D Comparison","title":"Benchmarking PopGenHelpR with adegenet, hierfstat, mmod, and StAMPP","text":"compare PopGenHelpR mmod. packages use formulas Jost (2008). mmod uses genind objects format conversion first. Estimate’s similar PopGenHelpR mmod, move onto heterozygosity.","code":"Genind <- vcfR2genind(HornedLizard_VCF) Genind@pop <- as.factor(HornedLizard_Pop$Population) ploidy(Genind) <- 2 # Calculate Jost's D PGH_JD <- Differentiation(data = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"JostsD\") #> [1] \"vcfR object detected, proceeding to formatting.\" #> Formatting has finished, moving onto calculations mmod_JD <- pairwise_D(Genind) PGH_JD$JostsD #> East South West #> East 0.00000000 NA NA #> South 0.08135043 0.000000 NA #> West 0.17491621 0.103915 0 mmod_JD #> East South #> South 0.08135043 #> West 0.17370519 0.10440251 # Compare differences mathematically PGH_JD$JostsD[2:3,1] - mmod_JD[1:2] #> South West #> -6.938894e-17 1.211019e-03 PGH_JD$JostsD[2,2] - mmod_JD[3] #> [1] -0.1044025"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_benchmarking.html","id":"expected-and-observed-heterozygosity-comparison","dir":"Articles","previous_headings":"","what":"Expected and Observed Heterozygosity Comparison","title":"Benchmarking PopGenHelpR with adegenet, hierfstat, mmod, and StAMPP","text":"compare PopGenHelpR, hierfstat, adegenet. , packages use formula’s, expect similar identical results. hierfstat uses ’s format, convert data calculations. Luckily can convert genind object Jost’s D comparisons. see small differences estimates. Please reach Keaka Farleigh (farleik@miamioh.edu) questions, please see references acknowledgments .","code":"Hstat <- genind2hierfstat(Genind) ### Calculate heterozygosities # Expected PGH_He <- Heterozygosity(data = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"He\") #> [1] \"vcfR object detected, proceeding to formatting.\" #> Formatting has finished, moving onto calculations # Observed PGH_Ho <- Heterozygosity(data = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"Ho\") #> [1] \"vcfR object detected, proceeding to formatting.\" #> Formatting has finished, moving onto calculations Hstat_hets <- basic.stats(Hstat) Hstat_Ho <- colMeans(Hstat_hets$Ho) He_adnet <- Hs(Genind) PGH_He$He_perpop$Expected.Heterozygosity-He_adnet #> East South West #> -0.006854206 -0.003143262 -0.006625364 PGH_Ho$Ho_perpop$Observed.Heterozygosity-Hstat_Ho #> East South West #> 7.511576e-06 -1.790920e-06 0.000000e+00"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_benchmarking.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"Benchmarking PopGenHelpR with adegenet, hierfstat, mmod, and StAMPP","text":"Farleigh, K., Vladimirova, S. ., Blair, C., Bracken, J. T., Koochekian, N., Schield, D. R., … & Jezkova, T. (2021). effects climate demographic history shaping genomic variation across populations Desert Horned Lizard (Phrynosoma platyrhinos). Molecular Ecology, 30(18), 4481-4496. Goudet, J. (2005). hierfstat, package R compute test hierarchical F‐statistics. Molecular ecology notes, 5(1), 184-186. Jost, L. (2008). GST relatives measure differentiation. Molecular ecology, 17(18), 4015-4026. Knaus, B. J., & Grünwald, N. J. (2017). vcfr: package manipulate visualize variant call format data R. Molecular ecology resources, 17(1), 44-53. Nei, M. (1972). Genetic distance populations. American Naturalist, 106(949), 283-292. Pembleton, L. W., Cogan, N. O., & Forster, J. W. (2013). St AMPP: R package calculation genetic differentiation structure mixed‐ploidy level populations. Molecular ecology resources, 13(5), 946-952. Weir, B. S., & Cockerham, C. C. (1984). Estimating F-statistics analysis population structure. evolution, 1358-1370. Winter, D., Green, P., Kamvar, Z., & Gosselin, T. (2017). mmod: modern measures population differentiation (Version 1.3.3).","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_benchmarking.html","id":"acknowledgements","dir":"Articles","previous_headings":"","what":"Acknowledgements","title":"Benchmarking PopGenHelpR with adegenet, hierfstat, mmod, and StAMPP","text":"thank authors hierfstat, mmod, StAMPP, package dependencies. provided inspiration PopGenHelpR commitment open science made possible develop benchmark package.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_createQmatrix.html","id":"purpose","dir":"Articles","previous_headings":"","what":"Purpose","title":"Creating a Q-matrix to use in PopGenHelpR","text":"generate q-matrix ancestry coefficients use PopGenHelpR functions Ancestry_barchart Piechart_map.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_createQmatrix.html","id":"what-is-a-q-matrix","dir":"Articles","previous_headings":"","what":"What is a Q-matrix?","title":"Creating a Q-matrix to use in PopGenHelpR","text":"q-matrix matrix containing many rows individuals columns genetic clusters. cell represents ancestry coefficient (also known cluster assignments), contribution genetic cluster particular individual. Q-matrices commonly used population genomics evaluate gene flow populations (e.g., admixture) species (e.g., introgression). ADMIXTURE (Alexander et al., 2009) sNMF (Frichot et al., 2014) commonly used software estimate number genetic clusters data generate ancestry bar charts q-matrices. Let’s generate q-matrices now know ! create q-matrices using programs mentioned .","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_createQmatrix.html","id":"snmf","dir":"Articles","previous_headings":"What is a Q-matrix?","what":"sNMF","title":"Creating a Q-matrix to use in PopGenHelpR","text":"start sNMF implemented R package LEA (Frichot & Francois, 2015). running sNMF (see tutorial need help) just need use Q function. need now append sample names q-matrix first column (can cbind text editor). can use PopGenHelpR. Note must careful order q-matrix order samples appending.","code":"# If I have a sNMF project named sNMFobject with K number of ancestral populations (genetic clusters), and my best run is run 1 (determined as the run with the lowets cross-entropy) Qmat <- Q(sNMFobject, K = K, run = 1)"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_createQmatrix.html","id":"example-of-formatting-the-q-matrix-for-popgenhelpr","dir":"Articles","previous_headings":"What is a Q-matrix? > sNMF","what":"Example of formatting the q-matrix for PopGenHelpR","title":"Creating a Q-matrix to use in PopGenHelpR","text":"show format q-matrix generated Q function LEA use PopGenHelpR. First, create matrix may expect LEA. also need create fake sample names Please note toy example real data. Cool! data, can use PopGenHelpR? , Ancestry_barchart Piechart_map need data.frame CSV; functions also need first column individual names. PopGenHelpR uses individual names key link q-matrix data populations coordinates. Let’s add individual names! can use Qmat_wnames now? , Qmat_wnames still matrix let’s see cbind numeric data. Notice cbind make everything character, need cluster contributions (columns 2 4 ) numeric. fix using sapply function. Notice cluster contribution columns now numeric Qmat_df object data.frame. Now can use PopGenHelpR population assignment file/data.frame generate figures.","code":"# Create fake matrix Qmat <- t(matrix(data = c(0.25, 0.4, 0.35), nrow = 3, ncol = 3)) Fake_inds <- c(\"FS_1\", \"FS_2\", \"FS_3\") # Add the names Qmat_wnames <- cbind(Fake_inds, Qmat) # Check the structure of the Qmat_wnames str(Qmat_wnames) #> chr [1:3, 1:4] \"FS_1\" \"FS_2\" \"FS_3\" \"0.25\" \"0.25\" \"0.25\" \"0.4\" \"0.4\" \"0.4\" ... #> - attr(*, \"dimnames\")=List of 2 #> ..$ : NULL #> ..$ : chr [1:4] \"Fake_inds\" \"\" \"\" \"\" Qmat_df <- as.data.frame(Qmat_wnames) Qmat_df[2:4] <- sapply(Qmat_df[2:4], as.numeric) # Check again str(Qmat_df) #> 'data.frame': 3 obs. of 4 variables: #> $ Fake_inds: chr \"FS_1\" \"FS_2\" \"FS_3\" #> $ V2 : num 0.25 0.25 0.25 #> $ V3 : num 0.4 0.4 0.4 #> $ V4 : num 0.35 0.35 0.35"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_createQmatrix.html","id":"admixture","dir":"Articles","previous_headings":"What is a Q-matrix?","what":"ADMIXTURE","title":"Creating a Q-matrix to use in PopGenHelpR","text":"ADMIXTURE little complex associated R package, nice gives us q-matrix automatically. See tutorial details. example , tell ADMIXTURE use bed file input run analysis K value 5. output file .Q extension, contains ancestry coefficients individual (q-matrix).","code":"### Run ADMIXTURE admixture --cv my_genetic_data.bed 5 > K5.out"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_createQmatrix.html","id":"questions","dir":"Articles","previous_headings":"","what":"Questions???","title":"Creating a Q-matrix to use in PopGenHelpR","text":"Please email Keaka Farleigh (farleik@miamioh.edu) need help generating q-matrix anything else.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_createQmatrix.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"Creating a Q-matrix to use in PopGenHelpR","text":"Alexander, D. H., Novembre, J., & Lange, K. (2009). Fast model-based estimation ancestry unrelated individuals. Genome research, 19(9), 1655-1664. Frichot, E., & François, O. (2015). LEA: R package landscape ecological association studies. Methods Ecology Evolution, 6(8), 925-929. Frichot, E., Mathieu, F., Trouillon, T., Bouchard, G., & François, O. (2014). Fast efficient estimation individual ancestry coefficients. Genetics, 196(4), 973-983.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"purpose","dir":"Articles","previous_headings":"","what":"Purpose","title":"Which heterozygosity should I use?","text":"help understand different measures heterozygosity PopGenHelpR determine measure appropriate question/objective.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"what-is-heterozygosity-and-why-is-it-important","dir":"Articles","previous_headings":"","what":"What is heterozygosity and why is it important?","title":"Which heterozygosity should I use?","text":"Heterozygosity refers presence two alleles locus. often use heterozygosity measure genetic diversity, essential species’ ability adapt persist.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"what-measures-of-heterozygosity-can-popgenhelpr-estimate","dir":"Articles","previous_headings":"","what":"What measures of heterozygosity can PopGenHelpR estimate?","title":"Which heterozygosity should I use?","text":"PopGenHelpR can estimate seven measures heterozygosity function Heterozygosity. list measure providing brief descriptions one. Observed heterozygosity (Ho) Expected heterozygosity () Proportion heterozygous loci (PHt) Proportion heterozygous loci standardized average expected heterozygosity (Hsexp) Proportion heterozygous loci standardized average observed heterozygosity (Hsobs) Internal relatedness (IR) Homozygosity locus (HL) PopGenHelpR can calculate measures using Heterozygosity function. See code .","code":"# Load package and toy data for all of the statistics library(PopGenHelpR) data(\"HornedLizard_Pop\") data(\"HornedLizard_VCF\") All_Het <- Heterozygosity(data = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"all\")"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"population-measures-of-heterozygosity","dir":"Articles","previous_headings":"","what":"Population measures of heterozygosity","title":"Which heterozygosity should I use?","text":"PopGenHelpR users can estimate expected observed heterozygosity (Ho, respectively) population data set.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"expected-heterozygosity-he","dir":"Articles","previous_headings":"Population measures of heterozygosity","what":"Expected heterozygosity (He)","title":"Which heterozygosity should I use?","text":"PopGenHelpR estimates per locus population following equations provided Hardy-Weinberg equation. Briefly, equation estimates one minus squared frequency allele (\\(p^2\\) \\(q^2\\), respectively), thus giving us expected frequency heterozygous genotypes (2pq) locus. overall measure calculated average per locus estimates. equation per locus , p reference allele q alternate allele: \\[ H_e = 1-p^2-q^2 \\] Thus, equation calculate overall , K number SNPs. \\[ H_e = \\frac{\\sum_{k=1}^K(1-p^2-q^2)}{K} \\]","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"how-do-we-use-he","dir":"Articles","previous_headings":"Population measures of heterozygosity > Expected heterozygosity (He)","what":"How do we use He","title":"Which heterozygosity should I use?","text":"use null model test determine Hardy-Weinberg equilibrium violated. Violations indicate mutation, non-random mating, gene flow, non-infinite population size, natural selection, combination.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"how-do-we-calculate-he-in-popgenhelpr","dir":"Articles","previous_headings":"Population measures of heterozygosity > Expected heterozygosity (He)","what":"How do we calculate He in PopGenHelpR?","title":"Which heterozygosity should I use?","text":"can calculate PopGenHelpR using command .","code":"He <- Heterozygosity(data = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"He\")"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"observed-heterozygosity-ho","dir":"Articles","previous_headings":"Population measures of heterozygosity","what":"Observed heterozygosity (Ho)","title":"Which heterozygosity should I use?","text":"PopGenHelpR estimates Ho per locus population following equations Nei (1987). Briefly, equations estimate Ho one minus proportion homozygotes population locus, thus giving us proportion heterozygotes locus. overall measure Ho calculated average per locus estimates. equation per locus : \\[ H_o = 1- \\frac{Number\\; \\; homoyzgotes}{Number\\; \\; samples} \\] Thus overall measure Ho , K number SNPs: \\[ H_o = \\frac{\\sum_{k = 1}^K{1- \\frac{Number\\; \\; homoyzgotes}{Number\\; \\; samples}}}{K} \\] formal equation Ho Nei (1987) : Pkii proportion homozygote () sample (k), np number samples: \\[ H_o = 1-\\sum_{k}\\sum_{}\\frac{Pkii}{np} \\]","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"how-do-we-use-ho","dir":"Articles","previous_headings":"Population measures of heterozygosity > Observed heterozygosity (Ho)","what":"How do we use Ho","title":"Which heterozygosity should I use?","text":"use Ho measure genetic diversity also compare determine data exhibiting different patterns, inbreeding (Ho < ) heterozygote advantage (Ho > ).","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"how-do-we-calculate-ho-in-popgenhelpr","dir":"Articles","previous_headings":"Population measures of heterozygosity > Observed heterozygosity (Ho)","what":"How do we calculate Ho in PopGenHelpR?","title":"Which heterozygosity should I use?","text":"can calculate Ho PopGenHelpR using command .","code":"Ho <- Heterozygosity(data = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"Ho\")"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"individual-measures-of-heterozygosity","dir":"Articles","previous_headings":"","what":"Individual measures of heterozygosity","title":"Which heterozygosity should I use?","text":"PopGenHelpR users can estimate proportion heterozygous loci (PHt), proportion heterozygous loci standardized average expected heterozygosity (Hsexp), proportion heterozygous loci standardized average observed heterozygosity (Hsobs), internal relatedness (IR), homozygosity locus (HL) individuals data set.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"proportion-of-heterozygous-loci-pht","dir":"Articles","previous_headings":"Individual measures of heterozygosity","what":"Proportion of heterozygous loci (PHt)","title":"Which heterozygosity should I use?","text":"proportion heterozygous loci (PHt) calculated number heterozygous SNPs divided number genotyped SNPs individual. \\[ PHt = \\frac{Number\\; \\; heterozygous\\; SNPs}{Number\\; \\; genotyped\\; SNPs} \\]","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"how-do-we-use-pht","dir":"Articles","previous_headings":"Individual measures of heterozygosity > Proportion of heterozygous loci (PHt)","what":"How do we use PHt","title":"Which heterozygosity should I use?","text":"PHt helpful evaluating diversity within individual comparing samples. Individual heterozygosity also commonly used investigate inbreeding (Miller et al., 2014). Individual heterozygosity used heterozygosity-fitness correlations (HFC), assuming heterozygosity positively correlates fitness. Thus, increased heterozygosity (decreased inbreeding) indicates higher fitness.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"how-do-we-calculate-pht-in-popgenhelpr","dir":"Articles","previous_headings":"Individual measures of heterozygosity > Proportion of heterozygous loci (PHt)","what":"How do we calculate PHt in PopGenHelpR?","title":"Which heterozygosity should I use?","text":"can calculate PHt PopGenHelpR using command .","code":"PHt <- Heterozygosity(data = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"PHt\")"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"proportion-of-heterozygous-loci-standardized-by-the-average-expected-heterozygosity-hsexp","dir":"Articles","previous_headings":"Individual measures of heterozygosity","what":"Proportion of heterozygous loci standardized by the average expected heterozygosity (Hsexp)","title":"Which heterozygosity should I use?","text":"proportion heterozygous loci standardized average expected heterozygosity (Hsexp) calculated PHt divided mean expected heterozygosity () individual. Please see equation . \\[ Hs_{exp} = \\frac{PHt}{H_e} \\]","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"how-do-we-use-hsexp","dir":"Articles","previous_headings":"Individual measures of heterozygosity > Proportion of heterozygous loci standardized by the average expected heterozygosity (Hsexp)","what":"How do we use Hsexp","title":"Which heterozygosity should I use?","text":"Hsexp introduced Coltman et al. (1999) evaluate individual heterozygosity across individuals genotyped different markers; allows us compare individual heterozygosity scale assess inbreeding. Like PHt, higher Hsexp indicates less inbreeding.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"how-do-we-calculate-hsexp-in-popgenhelpr","dir":"Articles","previous_headings":"Individual measures of heterozygosity > Proportion of heterozygous loci standardized by the average expected heterozygosity (Hsexp)","what":"How do we calculate Hsexp in PopGenHelpR?","title":"Which heterozygosity should I use?","text":"can calculate Hsexp PopGenHelpR using command .","code":"Hs_exp <- Heterozygosity(data = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"Hs_exp\")"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"proportion-of-heterozygous-loci-standardized-by-the-average-observed-heterozygosity-hsobs","dir":"Articles","previous_headings":"Individual measures of heterozygosity","what":"Proportion of heterozygous loci standardized by the average observed heterozygosity (Hsobs)","title":"Which heterozygosity should I use?","text":"proportion heterozygous loci standardized average observed heterozygosity (Hsobs) calculated PHt divided mean observed heterozygosity (Ho) individual. Please see equation . \\[ Hs_{obs} = \\frac{PHt}{H_o} \\]","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"how-do-we-use-hsobs","dir":"Articles","previous_headings":"Individual measures of heterozygosity > Proportion of heterozygous loci standardized by the average observed heterozygosity (Hsobs)","what":"How do we use Hsobs","title":"Which heterozygosity should I use?","text":"Hsobs introduced Coltman et al. (1999) evaluate individual heterozygosity across individuals genotyped different markers; allows us compare individual heterozygosity scale assess inbreeding. Like PHt, higher Hsobs indicates less inbreeding.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"how-do-we-calculate-hsobs-in-popgenhelpr","dir":"Articles","previous_headings":"Individual measures of heterozygosity > Proportion of heterozygous loci standardized by the average observed heterozygosity (Hsobs)","what":"How do we calculate Hsobs in PopGenHelpR?","title":"Which heterozygosity should I use?","text":"can calculate Hsobs PopGenHelpR using command .","code":"Hs_obs <- Heterozygosity(data = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"Hs_obs\")"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"internal-relatedness-ir","dir":"Articles","previous_headings":"Individual measures of heterozygosity","what":"Internal relatedness (IR)","title":"Which heterozygosity should I use?","text":"equation Internal relatedness (IR) complex qutie mouthful(sentence full?). Please see equation . IR calculated two times number homozygous loci minus sum frequency ith allele divided two times number loci minus sum frequency ith allele (see equation 2.1 Amos et al., 2001). \\[ IR = \\frac{(2H-\\sum{f_i})}{(2N-\\sum{f_i})} \\]","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"how-do-we-use-ir","dir":"Articles","previous_headings":"Individual measures of heterozygosity > Internal relatedness (IR)","what":"How do we use IR?","title":"Which heterozygosity should I use?","text":"IR developed Amos et al. (2001) measure diversity within individuals (Amos et al., 2001). Negative IR values suggest individuals outbred (tend heterozygous), positive values indicate individuals inbred (tend homozygous).","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"how-do-we-calculate-ir-in-popgenhelpr","dir":"Articles","previous_headings":"Individual measures of heterozygosity > Internal relatedness (IR)","what":"How do we calculate IR in PopGenHelpR?","title":"Which heterozygosity should I use?","text":"can calculate IR PopGenHelpR using command .","code":"IR <- Heterozygosity(data = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"IR\")"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"homozygosity-by-locus-hl","dir":"Articles","previous_headings":"Individual measures of heterozygosity","what":"Homozygosity by locus (HL)","title":"Which heterozygosity should I use?","text":"Homozygosity locus (HL) calculated expected heterozygosity loci homozygosis (\\(E_h\\)) divided sum expected heterozygosity loci homozygosis (\\(E_h\\)) expected heterozygosity loci heterozygosis (\\(E_j\\); see Aparicio et al., 2006). Please see equation . \\[ HL = \\frac{\\sum{E_h}}{\\sum{E_h} + \\sum{E_j}} \\]","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"how-do-we-use-hl","dir":"Articles","previous_headings":"Individual measures of heterozygosity > Homozygosity by locus (HL)","what":"How do we use HL?","title":"Which heterozygosity should I use?","text":"HL proposed Aparicio et al. (2006) improve IR weighing contribution locus index depending allelic variability (Aparicio et al., 2006). HL, like IR, useful evaluating diversity within individual. HL ranges 0 loci heterozygous 1 loci homozygous (Aparicio et al., 2006).","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"how-do-we-calculate-hl-in-popgenhelpr","dir":"Articles","previous_headings":"Individual measures of heterozygosity > Homozygosity by locus (HL)","what":"How do we calculate HL in PopGenHelpR?","title":"Which heterozygosity should I use?","text":"can calculate HL PopGenHelpR using command . Please reach Keaka Farleigh (farleik@miamioh.edu) questions need help.","code":"HL <- Heterozygosity(data = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"HL\")"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_heterozygosity.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"Which heterozygosity should I use?","text":"Amos W., Worthington Wilmer J., Fullard K., Burg T. M., Croxall J. P., Bloch D., Coulson T. 2001. influence parental relatedness reproductive success. Proceedings Royal Society B: Biological Sciences. 268: 2021-2027. Aparicio J. M., Ortego J., Cordero P. J. 2006. weigh estimate heterozygosity, alleles loci? Molecular Ecology. 15: 4659-4665 Coltman D. W., Pilkington J. G., Smith J. ., Pemberton J. M. 1999. Parasite-mediated selection inbred Soay sheep free-living, island population. Evolution. 53: 1259-1267. Miller, J. M., Malenfant, R. M., David, P., Davis, C. S., Poissant, J., Hogg, J. T., … & Coltman, D. (2014). Estimating genome-wide heterozygosity: effects demographic history marker type. Heredity, 112(3), 240-247. Nei, M. (1987). Molecular evolutionary genetics. Columbia university press.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_sortQmatrix.html","id":"purpose","dir":"Articles","previous_headings":"","what":"Purpose","title":"Sorting a Q-matrix for plotting in PopGenHelpR","text":"sort q-matrix ancestry coefficients use PopGenHelpR function Ancestry_barchart.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_sortQmatrix.html","id":"overview","dir":"Articles","previous_headings":"","what":"Overview","title":"Sorting a Q-matrix for plotting in PopGenHelpR","text":"often want plot structure-like ancestry bar chart specific order. may wish visualize ancestry chart grouping individuals cluster together (e.g., ordered cluster) latitude longitude (match pie chart map). , can use ind.ord pop.ord arguments Ancestry_barchart function.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_sortQmatrix.html","id":"load-the-data","dir":"Articles","previous_headings":"Overview","what":"Load the data","title":"Sorting a Q-matrix for plotting in PopGenHelpR","text":"","code":"# Load PopGenHelpR library(PopGenHelpR) # Load data data(\"Q_dat\") # First, we separate the list elements into two separate objects. The q-matrix (Qmat) and the locality information for each individual (Loc). Qmat <- Q_dat[[1]] Loc <- Q_dat[[2]]"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_sortQmatrix.html","id":"sorting-a-q-matrix","dir":"Articles","previous_headings":"","what":"Sorting a Q-matrix","title":"Sorting a Q-matrix for plotting in PopGenHelpR","text":"First, create vector contains order individuals populations want barcharts . use ind.order pop.order arguments specify . ***Note individuals populations ind.order pop.order must match individual population names population assignment file (pops argument). can thing sample population names character strings; just remember PopGenHelpR requires individual population names type; must characters numeric.","code":"# Set orders Ind_ord <- rev(seq(1,30)) Pop_ord <- rev(seq(1,5)) Anc_ord <- Ancestry_barchart(Qmat, Loc, K = 5, col = c('#d73027', '#f46d43', '#e0f3f8', '#74add1', '#313695'), ind.order = Ind_ord, pop.order = Pop_ord) Anc_ord$`Individual Ancestry Plot` Anc_ord$`Population Ancestry Plot` # Make the sample and population names characters Qmat_char <- Qmat Qmat_char$Ind <- paste(\"Sample\", Qmat_char$Ind, sep = '_') Loc_char <- Loc Loc_char$Sample <- paste(\"Sample\", Loc_char$Sample, sep = '_') Loc_char$Population <- paste(\"Population\", Loc_char$Population, sep = '_') Ind_ord_char <- paste('Sample', Ind_ord, sep = '_') Pop_ord_char <- paste('Population', Pop_ord, sep = '_') Anc_ord_char <- Ancestry_barchart(Qmat_char, Loc_char, K = 5, col = c('#d73027', '#f46d43', '#e0f3f8', '#74add1', '#313695'), ind.order = Ind_ord_char, pop.order = Pop_ord_char) Anc_ord_char$`Individual Ancestry Plot` Anc_ord_char$`Population Ancestry Plot`"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_sortQmatrix.html","id":"questions","dir":"Articles","previous_headings":"","what":"Questions???","title":"Sorting a Q-matrix for plotting in PopGenHelpR","text":"Please email Keaka Farleigh (farleik@miamioh.edu) need help generating q-matrix anything else.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_vignette.html","id":"welcome","dir":"Articles","previous_headings":"","what":"Welcome","title":"PopGenHelpR Vignette","text":"Welcome PopGenHelpR vignette, please contact authors questions package. can also visit Github additional examples (https://kfarleigh.github.io/PopGenHelpR/).","code":"# Load the package library(PopGenHelpR)"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_vignette.html","id":"overview-of-popgenhelpr","dir":"Articles","previous_headings":"","what":"Overview of PopGenHelpR","title":"PopGenHelpR Vignette","text":"PopGenHelpR one-stop package data analysis visualization. PopGenHelpR can calculate commonly used population genomic statistics heterozygosity genetic differentiation, functions Heterozygosity, Differentiation, Private.alleles. also producing publication-quality figures using functions Ancestry_barchart, Network_map, Pairwise_heatmap, Piechart_map. Check vignette see functions action! Fig 1. visualization PopGenHelpR workflow.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_vignette.html","id":"assumptions-of-popgenhelpr","dir":"Articles","previous_headings":"Overview of PopGenHelpR","what":"Assumptions of PopGenHelpR","title":"PopGenHelpR Vignette","text":"PopGenHelpR designed easy use, also means need ensure data order analysis pay attention warnings output functions. Data assumed bi-allelic. Please see examples filtering vcf files contain biallelic SNPs using vcftools bcftools, respectively.","code":"# vcftools vcftools --vcf myfile.vcf --max-alleles 2 --recode --recode-INFO-all --out my_biallelic_file.vcf # bcftools bcftools view -m2 -M2 -v snps myfile.vcf > my_biallelic_file.vcf"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_vignette.html","id":"load-the-data","dir":"Articles","previous_headings":"Overview of PopGenHelpR > Assumptions of PopGenHelpR","what":"Load the data","title":"PopGenHelpR Vignette","text":"First, load data. data objects examples data types can used functions PopGenHelpR.","code":"data(\"Fst_dat\") data(\"Het_dat\") data(\"Q_dat\") data(\"HornedLizard_Pop\") data(\"HornedLizard_VCF\")"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_vignette.html","id":"genomic-analysis","dir":"Articles","previous_headings":"Overview of PopGenHelpR","what":"Genomic Analysis","title":"PopGenHelpR Vignette","text":"Statistical analysis critical component population genomics study, many R packages calculate subset commonly used population genomic statistics. PopGenHelpR seeks remedy allowing researchers calculate widely used diversity differentiation measures single package.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_vignette.html","id":"heterozygosity","dir":"Articles","previous_headings":"Overview of PopGenHelpR > Genomic Analysis","what":"Heterozygosity","title":"PopGenHelpR Vignette","text":"Heterozygosity fundamental statistic population genomics allows researchers evaluate genetic diversity individuals populations. PopGenHelpR can estimate seven measures heterozygosity (individual population). , calculate observed heterozygosity, please see documentation Heterozygosity see options. Better yet, check article heterozygosity use measure! need vcf geno file, population assignment file, statistic wish estimate (PopGenHelpR default). Note PopGenHelpR assumes first column indicates sample names second column indicates population individual assigned. can use arguments individual_col population_col specify column indicates sample population names, respectively. can also write results csv set write = TRUE.","code":"Obs_Het <- Heterozygosity(data = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"Ho\")"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_vignette.html","id":"differentiaton","dir":"Articles","previous_headings":"Overview of PopGenHelpR > Genomic Analysis","what":"Differentiaton","title":"PopGenHelpR Vignette","text":"Differentiation another basic analysis population genomic studies. PopGenHelpR allows estimate FST, Nei’s D (individual population), Jost’s D. Like Heterozygosity, need vcf geno file, population assignment file, statistic want calculate (PopGenHelpR default). , individual population columns assumed first second columns can indicated users individual_col population_col, respectively.","code":"Fst <- Differentiation(data = HornedLizard_VCF, pops = HornedLizard_Pop, statistic = \"Fst\")"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_vignette.html","id":"private-alleles","dir":"Articles","previous_headings":"Overview of PopGenHelpR > Genomic Analysis","what":"Private alleles","title":"PopGenHelpR Vignette","text":"Finally, calculate number private alleles population. analysis often used evaluate signals range expansion helps researchers identify populations harbor unique alleles. Note Private.alleles can use vcf (geno files) require specify statistic (absolutely need vcf population file). Otherwise, operates just like Heterozygosity Differentiation. Let’s move onto visualizations (fun part), can get work submitted!","code":"PA <- Private.alleles(data = HornedLizard_VCF, pops = HornedLizard_Pop)"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_vignette.html","id":"visualizations","dir":"Articles","previous_headings":"Overview of PopGenHelpR","what":"Visualizations","title":"PopGenHelpR Vignette","text":"strength PopGenHelpR ability generate publication-quality figures. can generate commonly used figures ancestry plots (bar charts piechart maps), sample maps, figures Network_map visualizes relationships points map.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_vignette.html","id":"ancestry-plots","dir":"Articles","previous_headings":"Overview of PopGenHelpR > Visualizations","what":"Ancestry Plots","title":"PopGenHelpR Vignette","text":"PopGenHelpR can generate commonly used ancestry visualizations structure-like plots ancestry piechart maps. First, create structure-like plots individuals populations. need q-matrix, population assignments individual, number genetic clusters (K). q-matrix represents contribution cluster (K) individual population can obtained programs like STRUCTURE, ADMIXTURE, sNMF. Please see article extract q-matrix programs email Keaka Farleigh. can also generate ancestry matrix population. ancestry population calculated averaging ancestry individuals particular population. Now, generate piechart maps ancestry using Piechart_map function. Piechart_map requires input Ancestry_barchart additional requirement coordinates individual/population. ’ll notice individual map looks weird; pie charts bunch partitions. ’s multiple individuals location, population map probably better choice. Instead layering individuals top , population map averages ancestry individuals population mapping. See GitHub additional examples (https://kfarleigh.github.io/PopGenHelpR/). Notice weird partitions? can take care using population piechart map.","code":"# First, we separate the list elements into two separate objects. The q-matrix (Qmat) and the locality information for each individual (Loc). Qmat <- Q_dat[[1]] Loc <- Q_dat[[2]] # Now we will generate both population and individual plots by setting plot.type to 'all'. If you wanted, you could only generate individual or population plots by setting plot.type to \"individual\" and \"population\", respectively. Test_all <- Ancestry_barchart(anc.mat = Qmat, pops = Loc, K = 5, plot.type = 'all', col = c('#d73027', '#f46d43', '#e0f3f8', '#74add1', '#313695')) Test_all$`Individual Ancestry Plot` Test_all$`Population Ancestry Plot` # First, we seperate the list elements into two seperate objects. The q-matrix (Qmat) and the locality information for each individual (Loc). Qmat <- Q_dat[[1]] Loc <- Q_dat[[2]] # Now we will generate both population and individual plots by setting plot.type to 'all'. If you wanted, you could only generate individual or population plots by setting plot.type to \"individual\" and \"population\", respectively. Test_all_piemap <- Piechart_map(anc.mat = Qmat, pops = Loc, K = 5,plot.type = 'all', col = c('#d73027', '#f46d43', '#e0f3f8', '#74add1', '#313695'), Lat_buffer = 1, Long_buffer = 1) Test_all_piemap$`Individual Map` Test_all_piemap$`Population Map`"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_vignette.html","id":"differentiation-visualizations","dir":"Articles","previous_headings":"Overview of PopGenHelpR > Visualizations","what":"Differentiation visualizations","title":"PopGenHelpR Vignette","text":"PopGenHelpR can use symmetric matrices output Differentiation function plot heatmaps network maps. plots can great understanding relationships populations individuals. First, use Pairwise_heatmap function, allows us see relationships populations individuals requires symmetric matrix legend label (statistic argument). can also supply color vector like , required. can also visualize relationships map using Network_map function. function allows us visualize pairwise relationships color links points. must supply symmetric matrix (dat argument) population assignment file (pops argument). remaining arguments optional, allow greater customization. neighbors argument, example, tells function many relationships visualize, can also use specify relationships want see. Please see documentation details. Network_map can also used plot specific relationships. Let’s isolate populations highest lowest Fst supplying character vector neighbors argument.","code":"PW_hmap <- Pairwise_heatmap(Fst_dat[[1]], statistic = \"Fst\", col = c(\"#0000FF\", \"#FF0000\")) NW_map <- Network_map(Fst_dat[[1]], pops = Fst_dat[[2]], neighbors = 2, statistic = \"Fst\") NW_map$Map NW_map2 <- Network_map(Fst_dat[[1]], pops = Fst_dat[[2]], neighbors = c(\"East_West\", \"East_South\"), statistic = \"Fst\") NW_map2$Map"},{"path":"https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_vignette.html","id":"heterozygosity-and-other-visualizations","dir":"Articles","previous_headings":"Overview of PopGenHelpR > Visualizations","what":"Heterozygosity and Other Visualizations","title":"PopGenHelpR Vignette","text":"PopGenHelpR can create maps using output Heterozygosity csv files external programs understand diversity (statistics) distributed across geographic space. plot observed heterozygosity data function Point_map. need data frame (csv) name whatever statistic plotting (statistic argument). Point_map also assumes coordinate column names Latitude Longitude. can also outline points setting .col argument. Finally, can just plot coordinates using Plot_coordinates. need data frame csv file coordinates row indicated columns names Latitude Longitude. can change size points size argument. Thank interest package; please reach Keaka Farleigh (farleik@miamioh.edu) questions, things included future versions package, like kept date PopGenHelpR.","code":"Het_map <- Point_map(Het_dat, statistic = \"Heterozygosity\") Het_map$`Heterozygosity Map` Het_map2 <- Point_map(Het_dat, statistic = \"Heterozygosity\", out.col = \"#000000\") Het_map2$`Heterozygosity Map` Sample_map <- Plot_coordinates(HornedLizard_Pop) Sample_map"},{"path":"https://kfarleigh.github.io/PopGenHelpR/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Keaka Farleigh. Author, copyright holder, maintainer. Mason Murphy. Author, copyright holder, contributor. Christopher Blair. Author, copyright holder, contributor. Tereza Jezkova. Author, copyright holder, contributor.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Farleigh K, Murphy M, Blair C, Jezkova T (2024). PopGenHelpR: Streamline Population Genomic Genetic Analyses. R package version 1.3.0, https://kfarleigh.github.io/PopGenHelpR/.","code":"@Manual{, title = {PopGenHelpR: Streamline Population Genomic and Genetic Analyses}, author = {Keaka Farleigh and Mason Murphy and Christopher Blair and Tereza Jezkova}, year = {2024}, note = {R package version 1.3.0}, url = {https://kfarleigh.github.io/PopGenHelpR/}, }"},{"path":[]},{"path":"https://kfarleigh.github.io/PopGenHelpR/index.html","id":"what-is-popgenhelpr","dir":"","previous_headings":"","what":"What is PopGenHelpR?","title":"Streamline Population Genomic and Genetic Analyses","text":"PopGenHelpR R package designed estimate commonly used population genomic statistics generate publication quality figures. current version PopGenHelpR uses vcf, geno (012), csv files generate output, however, future implementations expand input file type options. Please see vignette articles examples. plan continue developing package include functions, feel free reach Keaka Farleigh suggestions like collaborate.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/index.html","id":"do-you-use-popgenhelpr-in-your-research-or-class-and-want-to-be-kept-up-to-date","dir":"","previous_headings":"What is PopGenHelpR?","what":"Do you use PopGenHelpR in your research or class and want to be kept up to date?","title":"Streamline Population Genomic and Genetic Analyses","text":"Please email Keaka Farleigh (farleik@miamioh.edu) informed updates pending changes PopGenHelpR.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Streamline Population Genomic and Genetic Analyses","text":"can install PopGenHelpR using: can install development version PopGenHelpR using devtools:","code":"install.packages(\"PopGenHelpR\") devtools::install_github(\"kfarleigh/PopGenHelpR\")"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Ancestry_barchart.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an ancestry matrix for individuals and(or) populations. — Ancestry_barchart","title":"Plot an ancestry matrix for individuals and(or) populations. — Ancestry_barchart","text":"Plot ancestry matrix individuals () populations.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Ancestry_barchart.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an ancestry matrix for individuals and(or) populations. — Ancestry_barchart","text":"","code":"Ancestry_barchart( anc.mat, pops, K, plot.type = \"all\", col, ind.order = NULL, pop.order = NULL )"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Ancestry_barchart.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an ancestry matrix for individuals and(or) populations. — Ancestry_barchart","text":"anc.mat Data frame character string supplies input data. character string, file csv. first column names sample/population, followed estimated contribution cluster individual/pop. pops Data frame character string supplies input data. character string, file csv. columns named Sample, containing sample IDs; Population indicating population assignment individual, population sample names must type (.e., numeric characters); Long, indicating longitude sample; Lat, indicating latitude sample. K Numeric.number genetic clusters data set, please contact package authors need help . plot.type Character string. Options , individual, population. default recommended, plot barchart individuals populations. col Character vector indicating colors wish use plotting. ind.order Character vector indicating order plot individuals individual ancestry bar chart. pop.order Chracter vector indicating order plot populations population ancesyry bar chart.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Ancestry_barchart.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot an ancestry matrix for individuals and(or) populations. — Ancestry_barchart","text":"list containing plots data frames used generate plots.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Ancestry_barchart.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot an ancestry matrix for individuals and(or) populations. — Ancestry_barchart","text":"Keaka Farleigh","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Ancestry_barchart.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot an ancestry matrix for individuals and(or) populations. — Ancestry_barchart","text":"","code":"# \\donttest{ data(Q_dat) Qmat <- Q_dat[[1]] rownames(Qmat) <- Qmat[,1] Loc <- Q_dat[[2]] Test_all <- Ancestry_barchart(anc.mat = Qmat, pops = Loc, K = 5, plot.type = 'all',col = c('#d73027', '#fc8d59', '#e0f3f8', '#91bfdb', '#4575b4'))# }"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Dif_Stats_Map.html","id":null,"dir":"Reference","previous_headings":"","what":"WARNING! This function has been deprecated and is no longer supported. Please use the Network_map function.\nA function to map differentiation statistics. — Dif_Stats_Map","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Network_map function.\nA function to map differentiation statistics. — Dif_Stats_Map","text":"WARNING! function deprecated longer supported. Please use Network_map function. function map differentiation statistics.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Dif_Stats_Map.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Network_map function.\nA function to map differentiation statistics. — Dif_Stats_Map","text":"","code":"Dif_Stats_Map( dat, pops, neighbors, col, breaks = NULL, Lat_buffer, Long_buffer )"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Dif_Stats_Map.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Network_map function.\nA function to map differentiation statistics. — Dif_Stats_Map","text":"dat Data frame character string supplies input data. character string, file csv. csv, 1st row contain individual/population names. columns also named fashion. pops Data frame character string supplies input data. character string, file csv. columns named Sample, containing sample IDs; Population indicating population assignment individual; Long, indicating longitude sample; Lat, indicating latitude sample. neighbors Numeric. number neighbors plot connections . col Character vector indicating colors wish use plotting. breaks Numeric. breaks used generate color ramp plotting. Users supply 3 values custom breaks desired. Lat_buffer Numeric. buffer customize visualization. Long_buffer Numeric. buffer customize visualization.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Dif_Stats_Map.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Network_map function.\nA function to map differentiation statistics. — Dif_Stats_Map","text":"list containing map matrix used plot map.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Dif_Stats_Map.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Network_map function.\nA function to map differentiation statistics. — Dif_Stats_Map","text":"Keaka Farleigh","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Dif_Stats_Map.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Network_map function.\nA function to map differentiation statistics. — Dif_Stats_Map","text":"","code":"# \\donttest{ data(Fst_dat) Fst <- Fst_dat[[1]] Loc <- Fst_dat[[2]] Test <- Dif_Stats_Map(dat = Fst, pops = Loc, neighbors = 2, col = c('#fd8d3c','#fc4e2a','#e31a1c','#bd0026','#800026'),Lat_buffer = 1, Long_buffer = 1)# } #> Warning: k greater than one-third of the number of data points"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Dif_stats.html","id":null,"dir":"Reference","previous_headings":"","what":"WARNING! This function has been deprecated and is no longer supported. Please use the Differentiation function.\nA function to calculate differentiation statistics and perform significance testing with a vcf file. — Dif_stats","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Differentiation function.\nA function to calculate differentiation statistics and perform significance testing with a vcf file. — Dif_stats","text":"WARNING! function deprecated longer supported. Please use Differentiation function. function calculate differentiation statistics perform significance testing vcf file.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Dif_stats.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Differentiation function.\nA function to calculate differentiation statistics and perform significance testing with a vcf file. — Dif_stats","text":"","code":"Dif_stats( VCF, pops, ploidy, statistic = \"both\", boots, write = FALSE, prefix = NULL )"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Dif_stats.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Differentiation function.\nA function to calculate differentiation statistics and perform significance testing with a vcf file. — Dif_stats","text":"VCF Character string indicating name vcf file used analysis. pops Character string indicating name population assignment file. file four columns order vcf file. first column named Sample indicates sample name. second column named Population indicates population assignment individual. third column named Long indicates longitude sample. fourth column named Lat indicates latitude sample. ploidy Numeric. ploidy data. statistic Character string. Options , FST, NeisD. boots Numeric. number boostraps use evaluate statistical significance. relevant FST estimation. write Boolean. Whether write output file current working directory. prefix Character string appended file output.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Dif_stats.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Differentiation function.\nA function to calculate differentiation statistics and perform significance testing with a vcf file. — Dif_stats","text":"list contianing data frames requested statistic.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Dif_stats.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Differentiation function.\nA function to calculate differentiation statistics and perform significance testing with a vcf file. — Dif_stats","text":"","code":"# \\donttest{ data(\"HornedLizard_Pop\") data(\"HornedLizard_VCF\") Test <- Dif_stats(VCF = HornedLizard_VCF, pops = HornedLizard_Pop, ploidy = 2, statistic = \"both\", boots = 10, write = FALSE)# } #> Warning: The Div_Stats function has been deprecated as of PopGenHelpR v1.3.0 and will dissappear in v2.0.0. Please use the Differentiation function if you wish to estimate Fst, Nei's D, or Jost's D. #> Loading required package: vcfR #> Registered S3 method overwritten by 'ape': #> method from #> plot.mst spdep #> #> ***** *** vcfR *** ***** #> This is vcfR 1.15.0 #> browseVignettes('vcfR') # Documentation #> citation('vcfR') # Citation #> ***** ***** ***** ***** #> Loading required namespace: adegenet #> Formatting has finished, moving onto calculations #> Registered S3 method overwritten by 'pegas': #> method from #> print.amova ade4"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Differentiation.html","id":null,"dir":"Reference","previous_headings":"","what":"A function to estimate three measures of genetic differentiation using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Differentiation","title":"A function to estimate three measures of genetic differentiation using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Differentiation","text":"function estimate three measures genetic differentiation using geno files, vcf files, vcfR objects. Data assumed bi-allelic.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Differentiation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A function to estimate three measures of genetic differentiation using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Differentiation","text":"","code":"Differentiation( data, pops, statistic = \"all\", missing_value = NA, write = FALSE, prefix = NULL, population_col = NULL, individual_col = NULL )"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Differentiation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A function to estimate three measures of genetic differentiation using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Differentiation","text":"data Character. String indicating name vcf file, geno file vcfR object used analysis. pops Character. String indicating name population assignment file dataframe containing population assignment information individual data. file must order vcf file include columns specifying individual population individual belongs . first column contain individual names second column indicate population assignment individual. Alternatively, can indicate column containing individual population information using individual_col population_col arguments. statistic Character. String vector indicating statistic calculate. Options : ; statistics; Fst, Weir Cockerham (1984) Fst; NeisD, Nei's D statistic; JostsD, Jost's D. missing_value Character. String indicating missing data input data. assumed NA, may true (likely ) case geno files. write Boolean. Whether write output files current working directory. one two files statistic. Files named based statistic Fst_perpop.csv. prefix Character. Optional argument. String appended file output. Please provide prefix write set TRUE. population_col Numeric. Optional argument (number) indicating column contains population assignment information. individual_col Numeric. Optional argument (number) indicating column contains individuals (.e., sample name) data.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Differentiation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"A function to estimate three measures of genetic differentiation using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Differentiation","text":"list containing estimated heterozygosity statistics. per pop values calculated taking average per locus estimates.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Differentiation.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"A function to estimate three measures of genetic differentiation using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Differentiation","text":"Fst: Pembleton, L. W., Cogan, N. O., & Forster, J. W. (2013). StAMPP: R package calculation genetic differentiation structure mixed‐ploidy level populations. Molecular ecology resources, 13(5), 946-952. Weir, B. S., & Cockerham, C. C. (1984). Estimating F-statistics analysis population structure. evolution, 1358-1370. Nei's D: Nei, M. (1972). Genetic distance populations. American Naturalist, 106(949), 283-292. Pembleton, L. W., Cogan, N. O., & Forster, J. W. (2013). StAMPP: R package calculation genetic differentiation structure mixed‐ploidy level populations. Molecular ecology resources, 13(5), 946-952. Jost's D: Jost L (2008). GST relatives measure differentiation. Molecular Ecology, 17, 4015–4026.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Differentiation.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"A function to estimate three measures of genetic differentiation using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Differentiation","text":"Keaka Farleigh","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Differentiation.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A function to estimate three measures of genetic differentiation using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Differentiation","text":"","code":"# \\donttest{ data(\"HornedLizard_Pop\") data(\"HornedLizard_VCF\") Test <- Differentiation(data = HornedLizard_VCF, pops = HornedLizard_Pop, write = FALSE)# } #> [1] \"vcfR object detected, proceeding to formatting.\" #> Formatting has finished, moving onto calculations"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Div_Stats_Map.html","id":null,"dir":"Reference","previous_headings":"","what":"WARNING! This function has been deprecated and is no longer supported. Please use the Point_map function instead.\nA function to map diversity statistics. — Div_Stats_Map","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Point_map function instead.\nA function to map diversity statistics. — Div_Stats_Map","text":"WARNING! function deprecated longer supported. Please use Point_map function instead. function map diversity statistics.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Div_Stats_Map.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Point_map function instead.\nA function to map diversity statistics. — Div_Stats_Map","text":"","code":"Div_Stats_Map( dat, plot.type = \"all\", statistic, breaks = NULL, col, Lat_buffer = 1, Long_buffer = 1, write = FALSE, prefix = NULL )"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Div_Stats_Map.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Point_map function instead.\nA function to map diversity statistics. — Div_Stats_Map","text":"dat Data frame character string supplies input data. character string, file csv. first column statistic plotted named statistic argument. second column Population indicating population row belongs . third column standard deviation, fourth column Long indicating longitude, fifth column Lat, indicating latitude. plot.type Character string. Options , point, interpolated. recommended generate map points colored according heterozygosity well rater interpolated heterozygosity values. statistic Character string. statistic plotted. breaks Numeric. breaks used generate color ramp plotting. Users supply 3 values custom breaks desired. col Character vector indicating colors wish use plotting, three colors allowed (low, mid, high). first color low color, second middle, third high. Lat_buffer Numeric. buffer customize visualization. Long_buffer Numeric. buffer customize visualization. write Boolean. Whether write output file current working directory. prefix Character string appended file output.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Div_Stats_Map.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Point_map function instead.\nA function to map diversity statistics. — Div_Stats_Map","text":"list containing maps data frames used generate .","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Div_Stats_Map.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Point_map function instead.\nA function to map diversity statistics. — Div_Stats_Map","text":"","code":"# \\donttest{ data(Het_dat) Test_het <- Div_Stats_Map(dat = Het_dat, plot.type = 'all', statistic = \"Heterozygosity\", Lat_buffer = 1, Long_buffer = 1, write = FALSE, prefix = 'Test_het')# } #> [inverse distance weighted interpolation]"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Div_stats.html","id":null,"dir":"Reference","previous_headings":"","what":"WARNING! This function has been deprecated and is no longer supported. Please use the Heterozygosity and Private.alleles functions.\nA function to estimate heterozygosity and the number of private alleles from a vcf file. — Div_stats","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Heterozygosity and Private.alleles functions.\nA function to estimate heterozygosity and the number of private alleles from a vcf file. — Div_stats","text":"WARNING! function deprecated longer supported. Please use Heterozygosity Private.alleles functions. function estimate heterozygosity number private alleles vcf file.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Div_stats.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Heterozygosity and Private.alleles functions.\nA function to estimate heterozygosity and the number of private alleles from a vcf file. — Div_stats","text":"","code":"Div_stats(VCF, pops, ploidy, write = FALSE, prefix)"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Div_stats.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Heterozygosity and Private.alleles functions.\nA function to estimate heterozygosity and the number of private alleles from a vcf file. — Div_stats","text":"VCF Character string indicating name vcf file used analysis. pops Character string indicating name population assignment file. file four columns order vcf file. first column named Sample indicates sample name. second column named Population indicates population assignment individual. third column named Longitude indicates longitude sample. fourth column named Latitude indicates latitude sample. ploidy Numeric. ploidy data. write Boolean. Whether write output file current working directory. prefix Character string appended file output.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Div_stats.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Heterozygosity and Private.alleles functions.\nA function to estimate heterozygosity and the number of private alleles from a vcf file. — Div_stats","text":"list containing estimated diversity statistics, model output linear regression statistics latitude, model plots.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Div_stats.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Heterozygosity and Private.alleles functions.\nA function to estimate heterozygosity and the number of private alleles from a vcf file. — Div_stats","text":"","code":"# \\donttest{ data(\"HornedLizard_Pop\") data(\"HornedLizard_VCF\") Test <- Div_stats(VCF = HornedLizard_VCF, pops = HornedLizard_Pop, ploidy = 2, write = FALSE)# } #> Warning: The Div_Stats function has been deprecated as of PopGenHelpR v1.3.0 and will dissappear in v2.0.0. Please use the Heterozygosity function if you wish to estimate heterozygosity or the Private.alleles function if you wish to calculate the number of private alleles per population. Please use the Point_Map function if you wish to visualize the results on a map or plot. #> Registered S3 method overwritten by 'GGally': #> method from #> +.gg ggplot2 #> Registered S3 method overwritten by 'genetics': #> method from #> [.haplotype pegas #> Formatting has finished, moving onto calculations #> Heterozygosity calculated, moving to private alleles #> Private Alleles have been calculated, moving onto plotting #> Calculations have finished, the packages used to perform file formatting and calculations were #> vcfR, adegenet, and dartR for formatting, hierfstat to calculate heterozygosity, and poppr to calculate private alleles"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Fst_dat.html","id":null,"dir":"Reference","previous_headings":"","what":"A genetic differentiation matrix and locality information for each population. This data was generated\nby subsetting data of Farleigh et al., 2021. — Fst_dat","title":"A genetic differentiation matrix and locality information for each population. This data was generated\nby subsetting data of Farleigh et al., 2021. — Fst_dat","text":"symmetric matrix estimated genetic differentiation (Fst) 3 populations.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Fst_dat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A genetic differentiation matrix and locality information for each population. This data was generated\nby subsetting data of Farleigh et al., 2021. — Fst_dat","text":"","code":"data(Fst_dat)"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Fst_dat.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"A genetic differentiation matrix and locality information for each population. This data was generated\nby subsetting data of Farleigh et al., 2021. — Fst_dat","text":"list two elements: Fst_dat Data frame three rows three columns Loc_dat Data frame containing locality information population","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Fst_dat.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"A genetic differentiation matrix and locality information for each population. This data was generated\nby subsetting data of Farleigh et al., 2021. — Fst_dat","text":"Farleigh, K., Vladimirova, S. ., Blair, C., Bracken, J. T., Koochekian, N., Schield, D. R., ... & Jezkova, T. (2021). effects climate demographic history shaping genomic variation across populations Desert Horned Lizard (Phrynosoma platyrhinos). Molecular Ecology, 30(18), 4481-4496.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Fst_dat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A genetic differentiation matrix and locality information for each population. This data was generated\nby subsetting data of Farleigh et al., 2021. — Fst_dat","text":"","code":"data(Fst_dat) Fst <- Fst_dat[[1]] Loc <- Fst_dat[[2]] # \\donttest{ Test <- Dif_Stats_Map(dat = Fst, pops = Loc, neighbors = 2, col = c('#fd8d3c','#fc4e2a','#e31a1c','#bd0026','#800026'),Lat_buffer = 1, Long_buffer = 1)# } #> Warning: k greater than one-third of the number of data points Fstat_plot <- Pairwise_heatmap(dat = Fst, statistic = 'FST')"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Het_dat.html","id":null,"dir":"Reference","previous_headings":"","what":"A data frame of hypothetical heterozygosity data produced by Div_Stats. — Het_dat","title":"A data frame of hypothetical heterozygosity data produced by Div_Stats. — Het_dat","text":"Data frame containing 5 columns 3 rows","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Het_dat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A data frame of hypothetical heterozygosity data produced by Div_Stats. — Het_dat","text":"","code":"data(Het_dat)"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Het_dat.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"A data frame of hypothetical heterozygosity data produced by Div_Stats. — Het_dat","text":"data frame 5 columns 3 rows: Heterozygosity Estimated heterozygosity Pop Population assignment Standard.Deviation standard deviation Longitude Longitude Latitude Latitude","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Het_dat.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"A data frame of hypothetical heterozygosity data produced by Div_Stats. — Het_dat","text":"Coordinates population names taken Farleigh, K., Vladimirova, S. ., Blair, C., Bracken, J. T., Koochekian, N., Schield, D. R., ... & Jezkova, T. (2021). effects climate demographic history shaping genomic variation across populations Desert Horned Lizard (Phrynosoma platyrhinos). Molecular Ecology, 30(18), 4481-4496.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Het_dat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A data frame of hypothetical heterozygosity data produced by Div_Stats. — Het_dat","text":"","code":"# \\donttest{ data(Het_dat) Test_het <- Div_Stats_Map(dat = Het_dat, plot.type = 'all', statistic = \"Heterozygosity\", Lat_buffer = 1, Long_buffer = 1, write = FALSE, prefix = 'Test_het')# } #> [inverse distance weighted interpolation]"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Heterozygosity.html","id":null,"dir":"Reference","previous_headings":"","what":"A function to estimate seven measures of heterozygosity using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Heterozygosity","title":"A function to estimate seven measures of heterozygosity using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Heterozygosity","text":"function estimate seven measures heterozygosity using geno files, vcf files, vcfR objects. Data assumed bi-allelic.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Heterozygosity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A function to estimate seven measures of heterozygosity using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Heterozygosity","text":"","code":"Heterozygosity( data, pops, statistic = \"all\", missing_value = NA, write = FALSE, prefix = NULL, population_col = NULL, individual_col = NULL )"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Heterozygosity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A function to estimate seven measures of heterozygosity using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Heterozygosity","text":"data Character. String indicating name vcf file, geno file vcfR object used analysis. pops Character. String indicating name population assignment file dataframe containing population assignment information individual data. file must order vcf file include columns specifying individual population individual belongs . first column contain individual names second column indicate population assignment individual. Alternatively, can indicate column containing individual population information using individual_col population_col arguments. statistic Character. String vector indicating statistic calculate. Options : ; statistics; Ho, observed heterozygosity; , expected heterozygosity; PHt, proportion heterozygous loci; Hs_exp, heterozygosity standardized average expected heterozygosity; Hs_obs, heterozygosity standardized average observed heterozygosity; IR, internal relatedness; HL, homozygosity locus. missing_value Character. String indicating missing data input data. assumed NA, may true (likely ) case geno files. write Boolean. Whether write output files current working directory. one two files statistic. Files named based statistic Ho_perpop.csv Ho_perloc.csv. prefix Character. Optional argument. String appended file output. Please provide prefix write set TRUE. population_col Numeric. Optional argument (number) indicating column contains population assignment information. individual_col Numeric. Optional argument (number) indicating column contains individuals (.e., sample name) data.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Heterozygosity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"A function to estimate seven measures of heterozygosity using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Heterozygosity","text":"list containing estimated heterozygosity statistics. per pop values calculated taking average per locus estimates.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Heterozygosity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"A function to estimate seven measures of heterozygosity using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Heterozygosity","text":"Expected () observed heterozygosity (Ho): Nei, M. (1987) Molecular Evolutionary Genetics. Columbia University Press Homozygosity locus (HL) internal relatedness (IR): Alho, J. S., Välimäki, K., & Merilä, J. (2010). Rhh: R extension estimating multilocus heterozygosity heterozygosity–heterozygosity correlation. Molecular ecology resources, 10(4), 720-722. Amos, W., Worthington Wilmer, J., Fullard, K., Burg, T. M., Croxall, J. P., Bloch, D., & Coulson, T. (2001). influence parental relatedness reproductive success. Proceedings Royal Society London. Series B: Biological Sciences, 268(1480), 2021-2027. Aparicio, J. M., Ortego, J., & Cordero, P. J. (2006). weigh estimate heterozygosity, alleles loci?. Molecular Ecology, 15(14), 4659-4665. Heterozygosity standardized expected (Hs_exp) observed heterozygosity (Hs_obs): Coltman, D. W., Pilkington, J. G., Smith, J. ., & Pemberton, J. M. (1999). Parasite‐mediated selection Inbred Soay sheep free‐living island populaton. Evolution, 53(4), 1259-1267.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Heterozygosity.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"A function to estimate seven measures of heterozygosity using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Heterozygosity","text":"Keaka Farleigh","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Heterozygosity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A function to estimate seven measures of heterozygosity using geno files, vcf files, or vcfR objects. Data is assumed to be bi-allelic. — Heterozygosity","text":"","code":"# \\donttest{ data(\"HornedLizard_Pop\") data(\"HornedLizard_VCF\") Test <- Heterozygosity(data = HornedLizard_VCF, pops = HornedLizard_Pop, write = FALSE)# } #> [1] \"vcfR object detected, proceeding to formatting.\" #> Formatting has finished, moving onto calculations"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/HornedLizard_Pop.html","id":null,"dir":"Reference","previous_headings":"","what":"A population assignment data frame to be used in Div_stats and Dif_stats. — HornedLizard_Pop","title":"A population assignment data frame to be used in Div_stats and Dif_stats. — HornedLizard_Pop","text":"Data frame containing 4 columns 72 rows","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/HornedLizard_Pop.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A population assignment data frame to be used in Div_stats and Dif_stats. — HornedLizard_Pop","text":"","code":"data(HornedLizard_Pop)"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/HornedLizard_Pop.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"A population assignment data frame to be used in Div_stats and Dif_stats. — HornedLizard_Pop","text":"data frame 4 columns 72 rows: Sample Sample Name Population Population assignment according sNMF results (see citation) Longitude Longitude Latitude Latitude","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/HornedLizard_Pop.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"A population assignment data frame to be used in Div_stats and Dif_stats. — HornedLizard_Pop","text":"Coordinates population names taken Farleigh, K., Vladimirova, S. ., Blair, C., Bracken, J. T., Koochekian, N., Schield, D. R., ... & Jezkova, T. (2021). effects climate demographic history shaping genomic variation across populations Desert Horned Lizard (Phrynosoma platyrhinos). Molecular Ecology, 30(18), 4481-4496.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/HornedLizard_Pop.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A population assignment data frame to be used in Div_stats and Dif_stats. — HornedLizard_Pop","text":"","code":"# \\donttest{ data(\"HornedLizard_Pop\") data(\"HornedLizard_VCF\") Test <- Div_stats(VCF = HornedLizard_VCF, pops = HornedLizard_Pop, ploidy = 2, write = FALSE)# } #> Warning: The Div_Stats function has been deprecated as of PopGenHelpR v1.3.0 and will dissappear in v2.0.0. Please use the Heterozygosity function if you wish to estimate heterozygosity or the Private.alleles function if you wish to calculate the number of private alleles per population. Please use the Point_Map function if you wish to visualize the results on a map or plot. #> Formatting has finished, moving onto calculations #> Heterozygosity calculated, moving to private alleles #> Private Alleles have been calculated, moving onto plotting #> Calculations have finished, the packages used to perform file formatting and calculations were #> vcfR, adegenet, and dartR for formatting, hierfstat to calculate heterozygosity, and poppr to calculate private alleles"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/HornedLizard_VCF.html","id":null,"dir":"Reference","previous_headings":"","what":"A vcfR object to be used in Div_stats and Dif_stats. — HornedLizard_VCF","title":"A vcfR object to be used in Div_stats and Dif_stats. — HornedLizard_VCF","text":"Data frame containing 4 columns 72 rows","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/HornedLizard_VCF.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A vcfR object to be used in Div_stats and Dif_stats. — HornedLizard_VCF","text":"","code":"data(HornedLizard_Pop)"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/HornedLizard_VCF.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"A vcfR object to be used in Div_stats and Dif_stats. — HornedLizard_VCF","text":"vcfR object vcfR object vcfR object containing genotype sample informaiton 72 individuals.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/HornedLizard_VCF.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"A vcfR object to be used in Div_stats and Dif_stats. — HornedLizard_VCF","text":"Farleigh, K., Vladimirova, S. ., Blair, C., Bracken, J. T., Koochekian, N., Schield, D. R., ... & Jezkova, T. (2021). effects climate demographic history shaping genomic variation across populations Desert Horned Lizard (Phrynosoma platyrhinos). Molecular Ecology, 30(18), 4481-4496.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/HornedLizard_VCF.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A vcfR object to be used in Div_stats and Dif_stats. — HornedLizard_VCF","text":"","code":"# \\donttest{ data(\"HornedLizard_Pop\") data(\"HornedLizard_VCF\") Test <- Div_stats(VCF = HornedLizard_VCF, pops = HornedLizard_Pop, ploidy = 2, write = FALSE)# } #> Warning: The Div_Stats function has been deprecated as of PopGenHelpR v1.3.0 and will dissappear in v2.0.0. Please use the Heterozygosity function if you wish to estimate heterozygosity or the Private.alleles function if you wish to calculate the number of private alleles per population. Please use the Point_Map function if you wish to visualize the results on a map or plot. #> Formatting has finished, moving onto calculations #> Heterozygosity calculated, moving to private alleles #> Private Alleles have been calculated, moving onto plotting #> Calculations have finished, the packages used to perform file formatting and calculations were #> vcfR, adegenet, and dartR for formatting, hierfstat to calculate heterozygosity, and poppr to calculate private alleles"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Network_map.html","id":null,"dir":"Reference","previous_headings":"","what":"A function to map statistics (i.e., genetic differentiation) between points as a network on a map. — Network_map","title":"A function to map statistics (i.e., genetic differentiation) between points as a network on a map. — Network_map","text":"function map statistics (.e., genetic differentiation) points network map.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Network_map.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A function to map statistics (i.e., genetic differentiation) between points as a network on a map. — Network_map","text":"","code":"Network_map( dat, pops, neighbors, col, statistic = NULL, breaks = NULL, Lat_buffer = 1, Long_buffer = 1 )"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Network_map.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A function to map statistics (i.e., genetic differentiation) between points as a network on a map. — Network_map","text":"dat Data frame character string supplies input data. character string, file csv. csv, 1st row contain individual/population names. columns also named fashion. pops Data frame character string supplies input data. character string, file csv. columns named Sample, containing sample IDs; Population indicating population assignment individual; Long, indicating longitude sample; Lat, indicating latitude sample. neighbors Numeric character. number neighbors plot connections , specific relationship want visualize. Names match population assignment file seperated underscore. want visualize relationship East West, example, set neighbors = \"East_West\". col Character vector indicating colors wish use plotting. statistic Character indicating statistic plotted. used title legend. legend title blank left NULL. breaks Numeric. breaks used generate color ramp plotting. Users supply 3 values custom breaks desired. Lat_buffer Numeric. buffer customize visualization. Long_buffer Numeric. buffer customize visualization.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Network_map.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"A function to map statistics (i.e., genetic differentiation) between points as a network on a map. — Network_map","text":"list containing map matrix used plot map.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Network_map.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"A function to map statistics (i.e., genetic differentiation) between points as a network on a map. — Network_map","text":"Keaka Farleigh","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Network_map.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A function to map statistics (i.e., genetic differentiation) between points as a network on a map. — Network_map","text":"","code":"# \\donttest{ data(Fst_dat) Fst <- Fst_dat[[1]] Loc <- Fst_dat[[2]] Test <- Network_map(dat = Fst, pops = Loc, neighbors = 2,col = c('#4575b4', '#91bfdb', '#e0f3f8','#fd8d3c','#fc4e2a'), statistic = \"Fst\", Lat_buffer = 1, Long_buffer = 1)# } #> Warning: k greater than one-third of the number of data points"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/PCA.html","id":null,"dir":"Reference","previous_headings":"","what":"A function to perform principal component analysis (PCA) on genetic data. Loci with missing data will be removed prior to PCA. — PCA","title":"A function to perform principal component analysis (PCA) on genetic data. Loci with missing data will be removed prior to PCA. — PCA","text":"function perform principal component analysis (PCA) genetic data. Loci missing data removed prior PCA.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/PCA.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A function to perform principal component analysis (PCA) on genetic data. Loci with missing data will be removed prior to PCA. — PCA","text":"","code":"PCA( data, center = TRUE, scale = FALSE, missing_value = NA, write = FALSE, prefix = NULL )"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/PCA.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A function to perform principal component analysis (PCA) on genetic data. Loci with missing data will be removed prior to PCA. — PCA","text":"data Character. String indicating name vcf file, geno file vcfR object used analysis. center Boolean. Whether center data principal component analysis. scale Boolean. Whether scale data principal component analysis. missing_value Character. String indicating missing data input data. assumed NA, may true (likely ) case geno files. write Boolean. Whether write output files current working directory. two files, one individual loadings percent variance explained axis. prefix Character. Optional argument. String appended file output. Please provide prefix write set TRUE.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/PCA.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"A function to perform principal component analysis (PCA) on genetic data. Loci with missing data will be removed prior to PCA. — PCA","text":"list containing two elements: loadings individuals principal component variance explained principal component.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/PCA.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"A function to perform principal component analysis (PCA) on genetic data. Loci with missing data will be removed prior to PCA. — PCA","text":"Keaka Farleigh","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/PCA.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A function to perform principal component analysis (PCA) on genetic data. Loci with missing data will be removed prior to PCA. — PCA","text":"","code":"# \\donttest{ data(\"HornedLizard_VCF\") Test <- PCA(data = HornedLizard_VCF)# } #> [1] \"vcfR object detected, proceeding to formatting.\""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Pairwise_heatmap.html","id":null,"dir":"Reference","previous_headings":"","what":"A function to plot a heatmap from a symmetric matrix. — Pairwise_heatmap","title":"A function to plot a heatmap from a symmetric matrix. — Pairwise_heatmap","text":"function plot heatmap symmetric matrix.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Pairwise_heatmap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A function to plot a heatmap from a symmetric matrix. — Pairwise_heatmap","text":"","code":"Pairwise_heatmap(dat, statistic, col = NULL)"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Pairwise_heatmap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A function to plot a heatmap from a symmetric matrix. — Pairwise_heatmap","text":"dat Data frame character string supplies input data. character string, file csv. csv, 1st row contain individual/population names. columns also named fashion. statistic Character indicating statistic represented matrix, used label plot. col Character vector indicating colors used plotting. vector contain two colors, first low value, second high value.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Pairwise_heatmap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"A function to plot a heatmap from a symmetric matrix. — Pairwise_heatmap","text":"heatmap plot","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Pairwise_heatmap.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A function to plot a heatmap from a symmetric matrix. — Pairwise_heatmap","text":"","code":"# \\donttest{ #' data(Fst_dat) Fst <- Fst_dat[[1]] Fstat_plot <- Pairwise_heatmap(dat = Fst, statistic = 'FST')# }"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Piechart_map.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot a map of ancestry pie charts. — Piechart_map","title":"Plot a map of ancestry pie charts. — Piechart_map","text":"Plot map ancestry pie charts.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Piechart_map.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot a map of ancestry pie charts. — Piechart_map","text":"","code":"Piechart_map( anc.mat, pops, K, plot.type = \"all\", col, piesize = 0.35, Lat_buffer, Long_buffer )"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Piechart_map.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot a map of ancestry pie charts. — Piechart_map","text":"anc.mat Data frame character string supplies input data. character string, file csv. first column names sample/population, followed estimated contribution cluster individual/pop. pops Data frame character string supplies input data. character string, file csv. columns named Sample, containing sample IDs; Population indicating population assignment individual, population sample names must type (.e., numeric characters); Long, indicating longitude sample; Lat, indicating latitude sample. K Numeric.number genetic clusters data set, please contact package authors need help . plot.type Character string. Options , individual, population. default recommended, plot piechart map individuals populations. col Character vector indicating colors wish use plotting. piesize Numeric. radius pie chart ancestry mapping. Lat_buffer Numeric. buffer customize visualization. Long_buffer Numeric. buffer customize visualization.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Piechart_map.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot a map of ancestry pie charts. — Piechart_map","text":"list containing plots data frames used generate plots.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Piechart_map.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot a map of ancestry pie charts. — Piechart_map","text":"Keaka Farleigh","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Piechart_map.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot a map of ancestry pie charts. — Piechart_map","text":"","code":"# \\donttest{ data(Q_dat) Qmat <- Q_dat[[1]] rownames(Qmat) <- Qmat[,1] Loc <- Q_dat[[2]] Test_all <- Piechart_map(anc.mat = Qmat, pops = Loc, K = 5, plot.type = 'all', col = c('#d73027', '#fc8d59', '#e0f3f8', '#91bfdb', '#4575b4'), piesize = 0.35, Lat_buffer = 1, Long_buffer = 1)# }"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Plot_ancestry.html","id":null,"dir":"Reference","previous_headings":"","what":"WARNING! This function has been deprecated and is no longer supported. Please use the Ancestry_barchart and Piechart_map functions.\nPlot an ancestry matrix and map of ancestry pie charts. — Plot_ancestry","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Ancestry_barchart and Piechart_map functions.\nPlot an ancestry matrix and map of ancestry pie charts. — Plot_ancestry","text":"WARNING! function deprecated longer supported. Please use Ancestry_barchart Piechart_map functions. Plot ancestry matrix map ancestry pie charts.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Plot_ancestry.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Ancestry_barchart and Piechart_map functions.\nPlot an ancestry matrix and map of ancestry pie charts. — Plot_ancestry","text":"","code":"Plot_ancestry( anc.mat, pops, K, plot.type = \"all\", col, piesize = 0.35, Lat_buffer, Long_buffer )"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Plot_ancestry.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Ancestry_barchart and Piechart_map functions.\nPlot an ancestry matrix and map of ancestry pie charts. — Plot_ancestry","text":"anc.mat Data frame character string supplies input data. character string, file csv. first column names sample/population, followed estimated contribution cluster individual/pop. pops Data frame character string supplies input data. character string, file csv. columns named Sample, containing sample IDs; Population indicating population assignment individual, population sample names must type (.e., numeric characters); Long, indicating longitude sample; Lat, indicating latitude sample. K Numeric.number genetic clusters data set, please contact package authors need help . plot.type Character string. Options , individual, population. default recommended, plot barchart piechart map individuals populations. col Character vector indicating colors wish use plotting. piesize Numeric. radius pie chart ancestry mapping. Lat_buffer Numeric. buffer customize visualization. Long_buffer Numeric. buffer customize visualization.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Plot_ancestry.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Ancestry_barchart and Piechart_map functions.\nPlot an ancestry matrix and map of ancestry pie charts. — Plot_ancestry","text":"list containing plots data frames used generate plots.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Plot_ancestry.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"WARNING! This function has been deprecated and is no longer supported. Please use the Ancestry_barchart and Piechart_map functions.\nPlot an ancestry matrix and map of ancestry pie charts. — Plot_ancestry","text":"","code":"# \\donttest{ data(Q_dat) Qmat <- Q_dat[[1]] rownames(Qmat) <- Qmat[,1] Loc <- Q_dat[[2]] Test_all <- Plot_ancestry(anc.mat = Qmat, pops = Loc, K = 5, plot.type = 'all', col <- c('red', 'maroon', 'navy', 'cyan', 'blue'), piesize = 0.35, Lat_buffer = 1, Long_buffer = 1)# } #> Warning: The Plot_ancestry function has been deprecated as of PopGenHelpR v1.3.0 and will dissappear in v2.0.0. Please use the Piechart_map and Ancestry_barchart function(s) if you wish to plot ancestry maps or barcharts."},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Plot_coordinates.html","id":null,"dir":"Reference","previous_headings":"","what":"A function to plot coordinates on a map. — Plot_coordinates","title":"A function to plot coordinates on a map. — Plot_coordinates","text":"function plot coordinates map.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Plot_coordinates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A function to plot coordinates on a map. — Plot_coordinates","text":"","code":"Plot_coordinates( dat, col = c(\"#A9A9A9\", \"#000000\"), size = 3, Lat_buffer = 1, Long_buffer = 1 )"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Plot_coordinates.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A function to plot coordinates on a map. — Plot_coordinates","text":"dat Data frame character string supplies input data. character string, file csv. coordinates row indicated columns named Longitude Latitude. col Character vector indicating colors wish use plotting, two colors allowed. first color fill color, second outline color. example, want red points black outline set col col = c(\"#FF0000\", \"#000000\"). size Numeric. size points plot. Lat_buffer Numeric. buffer customize visualization. Long_buffer Numeric. buffer customize visualization.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Plot_coordinates.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"A function to plot coordinates on a map. — Plot_coordinates","text":"ggplot object.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Plot_coordinates.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"A function to plot coordinates on a map. — Plot_coordinates","text":"Keaka Farleigh","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Plot_coordinates.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A function to plot coordinates on a map. — Plot_coordinates","text":"","code":"# \\donttest{ data(\"HornedLizard_Pop\") Test <- Plot_coordinates(HornedLizard_Pop)# }"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Point_map.html","id":null,"dir":"Reference","previous_headings":"","what":"A function to map statistics as colored points on a map. — Point_map","title":"A function to map statistics as colored points on a map. — Point_map","text":"function map statistics colored points map.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Point_map.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A function to map statistics as colored points on a map. — Point_map","text":"","code":"Point_map( dat, statistic, size = 3, breaks = NULL, col, out.col = NULL, Lat_buffer = 1, Long_buffer = 1 )"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Point_map.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A function to map statistics as colored points on a map. — Point_map","text":"dat Data frame character string supplies input data. character string, file csv. first column statistic plotted. coordinates row indicated columns named Longitude Latitude. statistic Character string. statistic plotted. size Numeric. size points plot. breaks Numeric. breaks used generate color ramp plotting. Users supply 3 values custom breaks desired. col Character vector indicating colors wish use plotting, three colors allowed (low, mid, high). first color low color, second middle, third high. .col Character. color outlining points map. visible outline left NULL. Lat_buffer Numeric. buffer customize visualization. Long_buffer Numeric. buffer customize visualization.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Point_map.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"A function to map statistics as colored points on a map. — Point_map","text":"list containing maps data frames used generate .","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Point_map.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"A function to map statistics as colored points on a map. — Point_map","text":"Keaka Farleigh","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Point_map.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A function to map statistics as colored points on a map. — Point_map","text":"","code":"# \\donttest{ data(Het_dat) Test <- Point_map(Het_dat, statistic = \"Heterozygosity\")# }"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Private.alleles.html","id":null,"dir":"Reference","previous_headings":"","what":"A function to estimate the number of private alleles in each population. — Private.alleles","title":"A function to estimate the number of private alleles in each population. — Private.alleles","text":"function estimate number private alleles population.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Private.alleles.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A function to estimate the number of private alleles in each population. — Private.alleles","text":"","code":"Private.alleles( data, pops, write = FALSE, prefix = NULL, population_col = NULL, individual_col = NULL )"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Private.alleles.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A function to estimate the number of private alleles in each population. — Private.alleles","text":"data Character. String indicating name vcf file vcfR object used analysis. pops Character. String indicating name population assignment file dataframe containing population assignment information individual data. file must order vcf file include columns specifying individual population individual belongs . first column contain individual names second column indicate population assignment individual. Alternatively, can indicate column containing individual population information using individual_col population_col arguments. write Boolean. Optional argument indicating Whether write output file current working directory. output files; 1) table private allele counts per population (named prefix_PrivateAlleles_countperpop) 2) metadata associated private alleles (named prefix_PrivateAlleles_metadata). Please supply prefix write files working directory best practice. prefix Character. Optional argument indicating string appended file output. Please set prefix write TRUE. population_col Numeric. Optional argument (number) indicating column contains population assignment information. individual_col Numeric. Optional argument (number) indicating column contains individuals (.e., sample name) data.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Private.alleles.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"A function to estimate the number of private alleles in each population. — Private.alleles","text":"list containing count private alleles population metadata alleles. metadata list contains private allele locus name population.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Private.alleles.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"A function to estimate the number of private alleles in each population. — Private.alleles","text":"Keaka Farleigh","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Private.alleles.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A function to estimate the number of private alleles in each population. — Private.alleles","text":"","code":"# \\donttest{ data(\"HornedLizard_Pop\") data(\"HornedLizard_VCF\") Test <- Private.alleles(data = HornedLizard_VCF, pops = HornedLizard_Pop, write = FALSE)# } #> [1] \"vcfR object detected, proceeding to formatting.\" #> Formatting has finished, moving onto calculations #> [1] \"Finished private allele calculations for East\" #> [1] \"Finished private allele calculations for South\" #> [1] \"Finished private allele calculations for West\""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Q_dat.html","id":null,"dir":"Reference","previous_headings":"","what":"A list representing a q-matrix and the locality information associated with the qmatrix — Q_dat","title":"A list representing a q-matrix and the locality information associated with the qmatrix — Q_dat","text":"List two elements","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Q_dat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A list representing a q-matrix and the locality information associated with the qmatrix — Q_dat","text":"","code":"data(Q_dat)"},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Q_dat.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"A list representing a q-matrix and the locality information associated with the qmatrix — Q_dat","text":"list two elements: Qmat q-matrix 6 columns 30 rows, first column lists sample name remaining 5 represent contribution genetic cluster individuals ancestry Loc_dat locality information individual q-matrix","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Q_dat.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"A list representing a q-matrix and the locality information associated with the qmatrix — Q_dat","text":"Data generated package authors.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/reference/Q_dat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A list representing a q-matrix and the locality information associated with the qmatrix — Q_dat","text":"","code":"# \\donttest{ data(Q_dat) Qmat <- Q_dat[[1]] rownames(Qmat) <- Qmat[,1] Loc <- Q_dat[[2]] Test_all <- Plot_ancestry(anc.mat = Qmat, pops = Loc, K = 5, plot.type = 'all', col <- c('red', 'maroon', 'navy', 'cyan', 'blue'), piesize = 0.35, Lat_buffer = 1, Long_buffer = 1)# } #> Warning: The Plot_ancestry function has been deprecated as of PopGenHelpR v1.3.0 and will dissappear in v2.0.0. Please use the Piechart_map and Ancestry_barchart function(s) if you wish to plot ancestry maps or barcharts."},{"path":"https://kfarleigh.github.io/PopGenHelpR/news/index.html","id":"popgenhelpr-130","dir":"Changelog","previous_headings":"","what":"PopGenHelpR 1.3.0","title":"PopGenHelpR 1.3.0","text":"February 15th, 2024 Plot_coordinates function added make sample maps coordinates. Point_map function replaced Div_stats_map statistic argument added highlight functions utility allow users name map legend. Dif_stats_map changed Network_map statistic argument added highlight functions utility allow users name map legend. Plot_ancestry split Piechart_Map Ancestry_barchart easier users determine function appropriate analysis. Differentiation added estimate Fst, Nei’s D, Jost’s D. Please see documentation details. Heterozygosity added estimate 7 different measures heterozygosity. Please see documentation details. Private.alleles added calculate number private alleles population. Dif_Stats function deprecated, please used Differentiation function calculate pairwise differentiation populations (Fst, Nei’s D, Jost’s D) individuals (Nei’s D). Div_Stats function deprecated, please use Heterozygosity function wish estimate heterozygosity Private.alleles function wish calculate number private alleles per population. Please use Point_Map function wish visualize results map plot.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/news/index.html","id":"popgenhelpr-122","dir":"Changelog","previous_headings":"","what":"PopGenHelpR 1.2.2","title":"PopGenHelpR 1.2.2","text":"October 2nd, 2023 Dif_stats_Map, Div_Stats_Map, Plot_ancestry updated use base color #f4f4f4 instead grey99 throwing error users. piesize argument added Plot_ancestry, original value 0.35 found high, especially cases users mapping smaller geographic area.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/news/index.html","id":"popgenhelpr-121","dir":"Changelog","previous_headings":"","what":"PopGenHelpR 1.2.1","title":"PopGenHelpR 1.2.1","text":"CRAN release: 2023-08-16 August 14th, 2023 Div_Stats Dif_stats updated accept vcf file vcfR object input. Div_Stats Dif_stats updated accept csv file data frame population assignment. Plot_ancestry updated generate structure-like plots using ggplot2 instead base R handle character numeric values individual population names. Note individual populations must type (.e., numeric characters). dependency rnaturalearth longer used. now use spData mapping data. vignette updated accommodate changes noted .","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/news/index.html","id":"popgenhelpr-111","dir":"Changelog","previous_headings":"","what":"PopGenHelpR 1.1.1","title":"PopGenHelpR 1.1.1","text":"July 17th, 2023 horned lizard data added examples can run users. write argument added Div_Stats Dif_stats files automatically written working directory.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/news/index.html","id":"popgenhelpr-101","dir":"Changelog","previous_headings":"","what":"PopGenHelpR 1.0.1","title":"PopGenHelpR 1.0.1","text":"July 17th, 2023 PopGenHelpR updated rnaturalearthhires Suggests field DESCRIPTION file now use conditonally.","code":""},{"path":"https://kfarleigh.github.io/PopGenHelpR/news/index.html","id":"popgenhelpr-100","dir":"Changelog","previous_headings":"","what":"PopGenHelpR 1.0.0","title":"PopGenHelpR 1.0.0","text":"CRAN release: 2023-02-13 First development PopGenHelpR, publication Github, submission CRAN (02/06/2023)","code":""}] diff --git a/sitemap.xml b/sitemap.xml index a3b5713..7446ed3 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -6,6 +6,9 @@ https://kfarleigh.github.io/PopGenHelpR/LICENSE.html + + https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_PCA.html + https://kfarleigh.github.io/PopGenHelpR/articles/PopGenHelpR_benchmarking.html @@ -69,6 +72,9 @@ https://kfarleigh.github.io/PopGenHelpR/reference/Network_map.html + + https://kfarleigh.github.io/PopGenHelpR/reference/PCA.html + https://kfarleigh.github.io/PopGenHelpR/reference/Pairwise_heatmap.html