popStatWindows: Calculate population statistics along contigs

Description Usage Arguments Details Value

Description

Carries out common sequence diversity and distance calculations on individuals or populations.

Usage

1
2
popStatWindows(fileName, contigs = "all", winSize = 1e+05, minSites,
  ploidy = 2, stat = c("dxy", "pi", "da"), pops, nCores = 1)

Arguments

fileName

A character vector of length one containing the full path name for a Tabix indexed VCF

contigs

character. Default is "all" Contigs to extract windows from.

winSize

numeric. Default is 100000. Window size in base pairs.

minSites

numeric. Default is 10 percent of winSize. The minimum number of sites within a window to consider it.

ploidy

numeric. The ploidy of the VCF, as called by Variant Caller.

stat

character. Default is to perform all statistics. The statistics to carry out on the windows options are dxy, pi, da, and Dt.

pops

data.frame. If not suplied statistics will be calculated on an individual basis. data.frame should contain two columns sampleNames specifying sample names as they appear in the VCF sample field and pop defines the populations of the samples. See example.

nCores

numeric. Number of cores to run analysis on.

Details

As reading in the variant data is currently the runtime bottleneck it is advised to run all statistics simultaniously to reduce overall runtime.

dxy: Nei's absolute distance between two populations X and Y.
pi: Nei's within populaition nucleotide diversity.
da: Nei's net genetic distance between two populations X and Y
Dt: Tajimas D neutrality test.

Value

A tibble containing populations statistics passed from stat


CMWbio/weavR documentation built on May 26, 2019, 6:41 a.m.