Type: Package
Title: Fast Genetic Variant Call Format File Header Intelligence and Audit
Version: 0.1.0
License: GPL-3
Language: en-GB
Description: Streams and parses variant call format file headers without reading full files. Provides structured metadata, validation, inference, and HTML reporting. For details on the specifications used see Danecek et al. (2021) <doi:10.1093/gigascience/giab008>.
Encoding: UTF-8
RoxygenNote: 7.3.3
Suggests: knitr, rmarkdown, testthat (≥ 3.0.0), xml2
VignetteBuilder: knitr
Config/testthat/edition: 3
NeedsCompilation: no
Packaged: 2026-03-02 10:45:05 UTC; akira
Author: Dylan Lawless ORCID iD [aut, cre, cph]
Maintainer: Dylan Lawless <admin@switzerlandomics.ch>
Depends: R (≥ 3.5.0)
Repository: CRAN
Date/Publication: 2026-03-06 13:10:02 UTC

Parse a VCF header into a structured object

Description

Reads only the header portion of a VCF or gzipped VCF file and returns a structured vcf_hdr object containing parsed metadata, field definitions, sample names, warnings, and errors.

Usage

parse_vcf_header(path)

Arguments

path

Path to a VCF or .vcf.gz file.

Value

A vcf_hdr object.


Print a vcf_hdr object

Description

Print a vcf_hdr object

Usage

## S3 method for class 'vcf_hdr'
print(x, ...)

Arguments

x

A vcf_hdr object.

...

Unused.

Value

Invisibly returns x.


Read the header lines from a VCF file

Description

Read the header lines from a VCF file

Usage

read_vcf_header(path)

Arguments

path

Path to a VCF file.

Value

A character vector of header lines.


Generate an HTML report from a parsed VCF header

Description

Writes an HTML summary report for a parsed vcf_hdr object.

Usage

vcfheader(
  x,
  file = NULL,
  spec_index = NULL,
  manual_defs = NULL,
  spec_sections = NULL,
  input_path = NULL,
  brand_svg = NULL
)

Arguments

x

A vcf_hdr object, typically created by parse_vcf_header().

file

Output HTML file path. If NULL, a default path is derived from the input VCF path.

spec_index

Optional specification index object or path to an .rds file.

manual_defs

Optional manual definition list.

spec_sections

Optional specification section list.

input_path

Optional input file path used when deriving the output path.

brand_svg

Optional path to an SVG logo or inline SVG markup.

Value

Invisibly returns the output file path.