divPart
(diversity partition), allows for the calculation of three main diversity partition statistics and their respective estimators. The function can be used to mainly explore locus values to identify 'outliers' and also to visualise pairwise differentiation between populations. Bootstrapped confidence intervals are calculated also. Results can. be optionally plotted for data exploration.
divPart(infile = NULL, outfile = NULL, gp = 3, pairwise = FALSE, WC_Fst = FALSE, bs_locus = FALSE, bs_pairwise = FALSE, bootstraps = 0, plot = FALSE, parallel = FALSE)
working directory
the file path must be given. The name must be a character string (i.e. enclosed in or `').infile
. Either 3 (default) or 2..xlsx
workbook by default if the package 'xlsx'
is installed, and to a .html
file if plot=TRUE
. If 'xlsx'
is not installed, results will be written to .txt
files..xlsx
file by default if the package 'xlsx'
is installed, and to a .html
file if plot=TRUE
. If 'xlsx'
is not installed, results will be written to .txt
files.bootstraps = 0
, this is only valid when all bootstrap options are false. There is no limit on the number of bootstrap iterations, however very large numbers of bootstrap iterations (< 1000) on even modest data sets (e.g. 265 individuals x 38 loci) will take over 30 minutes to run on a most PCs)..html
image file of the plotted bootstrap results for loci if bs_locus = TRUE
and pairwise population comparisons if bs_pairwise = TRUE
. The default option is plot = FALSE
.parallel
= TRUE
is only valid if the packages, parallel
, doParallel
and foreach
are installed.'xlsx'
in the users local package library. If 'xlsx'
is available, results will be written to an Excel workbook. If 'xlsx'
is not available, results will be written to .txt
files.
Guile, D.P., Shepherd, L.A., Sucheston, L., Bruno, A., and Manly, K.F., ``sendplot: Tool for sending interactive plots with tool-tip content.'', R package version 3.8.10, url: http://CRAN.R-project.org/package=sendplot, (2012).
Hedrick, P., ``A standardized genetic differentiation measure,'' Evolution, vol. 59, no. 8, pp. 1633-1638, (2005).
Jost, L., ``G ST and its relatives do not measure differentiation,'' Molec- ular Ecology, vol. 17, no. 18, pp. 4015-4026, (2008).
Manly, F.J., ``Randomization, bootstrap and Monte Carlo methods in biology'', Chapman and Hall, London, 1997.
Nei, M. and Chesser, R., ``Estimation of fixation indices and gene diver- sities,'' Ann. Hum. Genet, vol. 47, no. Pt 3, pp. 253-259, (1983).
R Development Core Team (2011). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. ISBN 3-900051-07-0, URL http://www.R-project.org/.
Revolution Analytics (2012). doParallel: Foreach parallel adaptor for the parallel package. R package version 1.0.1. http://CRAN.R-project.org/package=doParallel
Revolution Analytics (2012). foreach: Foreach looping construct for R. R package version 1.4.0. http://CRAN.R-project.org/package=foreach
Rousset, F., ``genepop'007: a complete re-implementation of the genepop software for Windows and Linux.,'' Molecular ecology resources, vol. 8, no. 1, pp. 103-6, (2008).
Weir, B.S. & Cockerham, C.C., Estimating F-Statistics, for the Analysis of Population Structure, Evolution, vol. 38, No. 6, pp. 1358-1370 (1984).
## Not run:
# # simply use the following format to run the function
#
# test_result <- divPart(infile = 'mydata', outfile = "myresults',
# gp = 3, pairwise = TRUE, bs_locus = TRUE,
# bs_pairwise = TRUE, bootstraps = 1000,
# plot = TRUE)
# ## End(Not run)
Run the code above in your browser using DataLab