This function organizes higher-level information for creating variants from Variant Call Format (VCF) files.

vars_vcf(fn, print_names = FALSE, ...)

Arguments

fn

A single string specifying the name of the VCF file

print_names

Logical for whether to print all unique sequence names from the VCF file when VCF sequence names don't match those from the reference genome. This printing doesn't happen until this object is passed to create_variants. This can be useful for troubleshooting. Defaults to FALSE.

...

Arguments to pass to vcfR::read.vcfR, excluding the file argument that will be overridden with the fn argument to this function.

Value

A vars_vcf_info object containing information used in create_variants to create haploid variants. This class is just a wrapper around a list containing relevant output from vcfR::read.vcfR: haplotypes, reference sequences, positions, sequence names, and variant names.

Details

This function won't work if the package vcfR isn't installed.