vcf2had: Convert Raw VCF Data to HAD Format

Description Usage Arguments Value Examples

View source: R/vcf2had.R

Description

Convert tbl_df output from read_vcf() to a Heterozygous Allele Depth (HAD) format, to be read in by gbs2ploidy.

Usage

1
vcf2had(filename, skip_lines = NULL, remove_double_hets = FALSE)

Arguments

filename

A character string of the data file path.

skip_lines

A numeric of the number of metadata lines to skip over in the VCF file. If left null, metadata lines are skipped over automatically by the count_metadata_lines function. The count_metadata_lines function requires reading in the entire file, so if you have a large file and know the number of metadata lines in that file, you can save some run time by entering the number of metadata lines in this argument.

remove_double_hets

Logical for determining if double heterozygous loci should be treated as missing information. Should fix issues with gbs2ploidy falsely labeling triploids.

Value

A data frame in Heterozygous Allele Depth (HAD) format

Examples

1
2
## Not run: vcf2had("./inst/extdata/example.vcf")
## Not run: vcf2had("./inst/extdata/example.vcf", remove_dobule_hets=TRUE)

dandewaters/VCF2Ploidy documentation built on Jan. 17, 2021, 2:12 p.m.