Reference

VariantCallFormat.MetaInfoMethod
VCF.MetaInfo(str::AbstractString)

Create a VCF metainfo from str containing a VCF header line. This function verifies the format and indexes fields for accessors.

source
VariantCallFormat.MetaInfoMethod
VCF.MetaInfo(data::Vector{UInt8})

Create a VCF metainfo from data containing a VCF header line. This function verifies the format and indexes fields for accessors. Note that the ownership of data is transferred to a new metainfo object.

source
VariantCallFormat.RecordMethod
VCF.Record(str::AbstractString)

Create a VCF object from str containing a VCF record. This function verifies the format and indexes fields for accessors.

source
VariantCallFormat.RecordMethod
VCF.Record(data::Vector{UInt8})

Create a VCF object from data containing a VCF record. This function verifies the format and indexes fields for accessors. Note that the ownership of data is transferred to a new record.

source
VariantCallFormat.WriterMethod
VCF.Writer(output::IO, header::VCF.Header)

Create a data writer of the VCF file format.

Arguments

  • output: data sink
  • header: VCF header object
source
VariantCallFormat.genotypeMethod
genotype(record::Record, indexes, keys)

Get the genotypes in record that match indexes and keys. indexes and keys can be either a scalar or a vector value. Trailing fields that are dropped are filled with ".".

source
VariantCallFormat.genotypeMethod
genotype(record::Record, index::Integer)::Vector{String}

Get the genotypes of the index-th individual in record. This is effectively equivalent to genotype(record)[index] but more efficient.

source
VariantCallFormat.infoMethod
info(record::Record, key::String)::String

Get the additional information of record with key. Keys without corresponding values return an empty string.

source
VariantCallFormat.infokeysMethod
infokeys(record::Record)::Vector{String}

Get the keys of the additional information of record. This function returns an empty vector when the INFO field is missing.

source
VariantCallFormat.BCF.WriterMethod
BCF.Writer(output::IO, header::VCF.Header)

Create a data writer of the BCF file format.

Arguments

  • output: data sink
  • header: VCF header object
source
VariantCallFormat.BCF.genotypeMethod
genotype(record::Record)::Vector{Tuple{Int,Vector{Any}}}

Get the genotypes of record. BCF genotypes are encoded by field, not by sample like VCF.

source
VariantCallFormat.BCF.infoMethod
info(record::Record, key::Integer, [simplify::Bool=true])

Get the additional information of record with key. When simplify is true, a vector with a single element is converted to the element itself and an empty vector of the Nothing type is converted to nothing.

source
VariantCallFormat.BCF.infoMethod
info(record::Record, [simplify::Bool=true])::Vector{Tuple{Int,Any}}

Get the additional information of record. When simplify is true, a vector with a single element is converted to the element itself and an empty vector of the void type is converted to nothing.

source
VariantCallFormat.BCF.posMethod
pos(record::Record)::Int

Get the reference position of record. Note that the position of the first base is 1 (i.e. 1-based coordinate).

source
VariantCallFormat.BCF.qualMethod
qual(record::Record)::Float32

Get the quality score of record. Note that 0x7F800001 (signaling NaN) is interpreted as a missing value.

source