count_metadata_lines: Count number of metadata lines in VCF files

Description Usage Arguments Details Value Examples

View source: R/read_vcf.R

Description

Read in a Variant Calling Format file and count the number of metadata lines to skip over for read_vcf function. Not exported.

Usage

1

Arguments

filename

A character string of the data file path.

Details

Throws an error if file cannot be found. Metadata lines are identified by checking if the lines starts with "##". This 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 in the read_vcf, vcf2had, vcf2ploidy, and vcf2colony functions by entering the number of metadata lines in their "skip_lines" argument.

Value

Returns a numeric of the number of metadata lines in VCF file.

Examples

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

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