vcfheader logo

vcfheader

vcfheader parses Variant Call Format (VCF) headers and turns them into a structured summary and a standalone HTML report.

VCF headers contain the metadata needed to understand a dataset before inspecting variant rows. They describe file format version, reference genome, contigs, INFO and FORMAT fields, filtering definitions, samples, and other header declarations. This package extracts that information quickly and presents it in a form that is easier to inspect, validate, and share.

TLDR

library(vcfheader)

hdr <- parse_vcf_header("file.vcf.gz")

vcfheader(
  hdr,
  file = "file_vcfheader.html"
)

What it does

Why this is useful

The VCF header is often the fastest way to understand:

Example report

The HTML report is designed to help review dataset contents, metadata, field definitions, and filtering context in a single readable document.

Bundled examples

The package ships with small example files for offline use:

Example usage with bundled files

library(vcfheader)

simple_vcf <- system.file("extdata", "simple.vcf", package = "vcfheader")
hdr <- parse_vcf_header(simple_vcf)

vcfheader(
  hdr,
  file = "simple_vcfheader.html"
)

Licence and notices

vcfheader is free and open-source software released under the GNU General Public License, version 3 (GPL-3).

Switzerland Omics is the creator of VCFheader. Attribution should be retained where reasonably practicable, but does not imply endorsement, certification, or approval of any specific use, result, or modified version.

Switzerland OmicsĀ® is a registered Swiss trade mark. No trade mark rights are granted under the software licence. Modified versions must not be presented as the original project or as endorsed by Switzerland Omics without permission.

VCF specification references may relate to samtools and the broader HTS specifications ecosystem, distributed under the MIT/Expat Licence by Genome Research Ltd.Ā Source: https://github.com/samtools/samtools. Further reading: https://www.htslib.org/doc/#file-formats.