doAllTheThings: Calculate a bunch of popgen stats from a VCF file

Description Usage Arguments Value

View source: R/stats.R

Description

Calculate a bunch of popgen stats from a VCF file

Usage

1
2
3
4
5
6
7
8
doAllTheThings(
  vcfFile,
  lociDistn = NULL,
  coGeno = NULL,
  readDepth = FALSE,
  nPCs = 4,
  outPath
)

Arguments

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 lociDistn gives the number of base pairs genotyped in exactly 3 individuals. Default is NULL.

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 L (i.e., indicating no missing data). Default is NULL.

readDepth

A Boolean argument indicating whether or not to calculate the mean read depth for each individual from the specified VCF file. Default is FALSE.

nPCs

The number of principal component axes to retain. Default is 4.

outPath

The file path prepended to all output objects.

Value

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:


gbradburd/popgenstuff documentation built on Oct. 16, 2021, 12:05 a.m.