vst {rCNV} | R Documentation |
Calculate population-wise Vst
Description
This function calculates Vst (variant fixation index) for populations given a list of duplicated loci
Usage
vst(AD, pops, id.list = NULL, qGraph = TRUE, verbose = TRUE, ...)
Arguments
AD |
data frame of total allele depth values of (duplicated, if
|
pops |
character. A vector of population names for each individual. Must be the same length as the number of samples in AD |
id.list |
character. A vector of duplicated SNP IDs. Must match the IDs in the AD data frame |
qGraph |
logical. Plot the network plot based on Vst values (see details) |
verbose |
logical. show progress |
... |
additional arguments passed to |
Details
Vst is calculated with the following equation
V_{T} = \frac{ V_{S} }{V_{T}}
where VT is the variance of normalized
read depths among all individuals from the two populations and VS is the
average of the variance within each population, weighed for population size
(see reference for more details)
See qgraph
help for details on qgraph output
Value
Returns a matrix of pairwise Vst values for populations
Author(s)
Piyal Karunarathne
References
Redon, Richard, et al. Global variation in copy number in the human genome. nature 444.7118 (2006)
Examples
## Not run: data(alleleINF)
data(ADtable)
DD<-dupGet(alleleINF)
ds<-DD[DD$dup.stat=="duplicated",]
ad<-ADtable[match(paste0(ds$CHROM,".",ds$POS),paste0(ADtable$CHROM,".",ADtable$POS)),]
vst(ad,pops=substr(colnames(ad)[-c(1:4)],1,11))
## End(Not run)