read_vcf: Read in VCF files

Description Usage Arguments Details Value Examples

View source: R/read_vcf.R

Description

Read in a Variant Calling Format file.

Usage

1
read_vcf(filename, skip_lines = NULL)

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.

Details

Throws an error if file cannot be found.

Value

This function returns a data frame table of the VCF data with the metadata and the first 9 columns removed.

Examples

1
## Not run: read_vcf("./inst/extdata/example.vcf")

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