Class VcfRecord
Information for one VCF record.

Defined in <seqan/vcf_io.h>
Signature class VcfRecord;

Member Function Overview

Interface Function Overview

Member Variable Overview

Detailed Description

We store most information as strings and without structure since the VCF format's definition is quite loose. We plan to provide classes for structured access to these strings later.


Although all positions in the VCF text format are 1-based, they are stored 0-based in the VcfRecord. Positions in string members are stored verbatim in the VcfRecord's members, e.g. 1-based.

Invalid qualities are stored as a float NaN (not a number). To test a float quality q for being NaN, test for q != q. Only NaN has the property that NaN != NaN.

Member Functions Detail

float VcfRecord::MISSING_QUAL();

Return IEEE NaN float value.


This cannot be implemented portably as a constant in a header-only library. In C++11, there is a function std::nanf() that could be used instead. For C++98, this is the best we can do.


Default constructor.

Interface Functions Detail

void clear(record);

Clear a VcfRecord.


record The VcfRecord to clear.

Member Variables Detail

VariableType VcfRecord::alt

Alternative bases in the variants, comma-separated if multiple (CharString).

VariableType VcfRecord::beginPos

Position of the VCF record (__int32).

VariableType VcfRecord::filter

Value of FILTER field, empty if "." in VCF file (CharString).

VariableType VcfRecord::format

Value of the VCF FORMAT field, empty if "." in VCF file (CharString).

VariableType VcfRecord::genotypeInfos

Genotype information, as in VCF file (StringSet<CharString>).

VariableType VcfRecord::id

Textual identifier of the variant (CharString).

VariableType VcfRecord::info

Value of the INFO field, empty if "." in VCF file (CharString).

VariableType VcfRecord::INVALID_POS

Static member as marker for invalid position (__int32)

VariableType VcfRecord::INVALID_REFID

Static member as marker for invalid reference (__int32)

VariableType VcfRecord::qual

Quality, NaN if invalid (float).

VariableType VcfRecord::ref

Bases in the reference (CharString).

VariableType VcfRecord::rID

Static member as marker for invalid reference (__int32)