Description Usage Arguments Value
Calculate a bunch of popgen stats from a VCF file
1 2 3 4 5 6 7 8 | doAllTheThings(
vcfFile,
lociDistn = NULL,
coGeno = NULL,
readDepth = FALSE,
nPCs = 4,
outPath
)
|
vcfFile |
The filename (with necessary path) of the VCF file you want to read into R. |
lociDistn |
A vector of length N, where N is the
number of genotyped individuals, for which the
ith element gives the number of base pairs
genotyped in exactly i individuals.
E.g., the 3rd element of |
coGeno |
A symmetric matrix (dimensions N x N)
for which the i,jth element gives
the number of base pairs genotyped in both
samples i and j. The order of samples in
this matrix must be the same as the order of samples
in the VCF file. If left unspecified, each cell will
be assigned a value of |
readDepth |
A Boolean argument indicating whether or not
to calculate the mean read depth for each individual
from the specified VCF file. Default is |
nPCs |
The number of principal component axes to retain. Default is 4. |
outPath |
The file path prepended to all output objects. |
This function does not return a value. Instead, a
named list is saved as a .Robj file at the location
designated by the outPath
argument. The elements
of the list are:
thetaW
Wu and Watterson's theta,
as calculated by calcThetaW
pwp
a matrix of pairwise pi between
all samples, as calculated by freqs2pairwisePi
globalPi
global pi in the dataset
(the mean of the upper-triangle of pwp
)
pcs
the first nPCs
principal
components, as calculated by doPCA
het
proportion of heterozygous loci in
each individual, as calculated by calcHet
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.