Learn R Programming

rCNV (version 1.3.0)

vstPermutation: Run permutation on Vst

Description

This function runs a permutation test on Vst calculation

Usage

vstPermutation(
  AD,
  pops,
  nperm = 100,
  histogram = TRUE,
  stat = 2,
  qGraph = TRUE
)

Value

Returns a list with observed vst values, an array of permuted vst values and the p-values for the permutation test

Arguments

AD

data frame of total allele depth values of SNPs

pops

character. A vector of population names for each individual. Must be the same length as the number of samples in AD

nperm

numeric. Number of permutations to perform

histogram

logical. plots the distribution histogram of permuted vst values vs. observed values

stat

numeric. The stat to be plotted in histogram. 1 for Mean Absolute Distance or 2 (default) for Root Mean Square Distance

qGraph

logical. Plot the network plot based on observed Vst values (see vst() help page for more details)

Author

Jorge Cortés-Miranda (email:jorge.cortes.m@ug.uchile.cl), Piyal Karunarathne

Examples

Run this code
if (FALSE) data(alleleINF)
data(ADtable)
DD<-dupGet(alleleINF)
ds<-DD[DD$dup.stat=="deviant",]
ad<-ADtable[match(paste0(ds$CHROM,".",ds$POS),paste0(ADtable$CHROM,".",ADtable$POS)),]
vstPermutation(ad,pops=substr(colnames(ad)[-c(1:4)],1,11))

Run the code above in your browser using DataLab