fstOnly: A minimal function for the calculate of Weir & Cockerham's...

Description Usage Arguments Details Value Note Author(s) References

Description

This function calculates locus and pairwise confidence intervals for Weir & Cockerham's (1984) F_ST and F_IT. These statistics can also be calculated using the divPart function, however, fstOnly is designed to be more memory efficient for larger datasets (e.g. SNPs).

Usage

1
2
fstOnly(infile = NULL, outfile = NULL, gp = 3, bs_locus = FALSE,
        bs_pairwise = FALSE, bootstraps = 0, parallel = FALSE)

Arguments

infile

Specifying the name of the ‘genepop’ (Rousset, 2008) file from which the statistics are to be calculated This file can be in either the 3 digit of 2 digit format, and must contain only one whitespace separator (e.g. “space” or “tab”) between each column including the individual names column. The number of columns must be equal to the number of loci + 1 (the individual names column). If this file is not in the working directory the file path must be given. The name must be a character string (i.e. enclosed in “” or '').

outfile

Allows users to specify a prefix for an output folder. Name must a character string enclosed in either “” or ''.

gp

Specifies the digit format of the infile. Either 3 (default) or 2.

bs_locus

Specifies whether locus bootstrapped confidence intervals should be calculated.

bs_pairwise

Specified whether pairwise population bootstrapped confidence intervals should be calculated.

bootstraps

Determines the number of bootstrap iterations to be carried out. The default value is 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 20 minutes to run on a most PCs).

parallel

A logical input, indicating whether your analysis should be run in parallel mode or sequentially. parallel = TRUE is only valid if the packages, parallel, doParallel and foreach are installed.

Details

Because fstOnly is intended to maximise memory (RAM) efficiency, the function does not provide many of the plotting utilities that divPart does.

Value

locus

A list object containing two matrices, F_ST and F_IT. These matrices contain actual, lower 95% confidence interval and upper 95% confidence interval per locus. Global values are also presented with their respective confidence intervals.

pairwise

A list object containing two matrices, F_ST and F_IT. These matrices contain actual, lower 95% confidence interval and upper 95% confidence interval per pairwise population comparison.

Note

This function has become obsolete following improvements to fastDivPart and diffCalc. The use of either of these two functions is recommended over fstOnly. fstOnly will be deprecated in future diveRsity releases.

Author(s)

Kevin Keenan <kkeenan02@qub.ac.uk>

References

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).


diveRsity documentation built on May 1, 2019, 10:30 p.m.