vcfToGenotypeMatrix: VCF file to genotype matrix

Description Usage Arguments Value

Description

Load vcf file into R and extract a genotype matrix (sample X SNP) coded with 0,1,2,<NA>.

Usage

1
2
vcfToGenotypeMatrix(vcf_file, max_missing_snp = 1,
  max_missing_sample = 1)

Arguments

vcf_file

VCF file with genotypes only (i.e. 0/0, 0/1, etc.). Missing values can be coded as "." or "./."

max_missing_snp

Set a max. percentage of missingness per SNP allowed. Default is set to 1 (i.e. 100 percent)

max_missing_sample

Set a max. percentage of missingness per sample allowed. Default is set to 1 (i.e. 100 percent)

Value

matrix (sample x snp) coded 0,1,2, or NA


sojwolf/ancientpca documentation built on May 13, 2019, 9:53 p.m.