Reference
VariantCallFormat.BCF.Reader
VariantCallFormat.BCF.Record
VariantCallFormat.BCF.Writer
VariantCallFormat.Header
VariantCallFormat.Header
VariantCallFormat.MetaInfo
VariantCallFormat.MetaInfo
VariantCallFormat.MetaInfo
VariantCallFormat.Reader
VariantCallFormat.Record
VariantCallFormat.Record
VariantCallFormat.Record
VariantCallFormat.Writer
BioGenerics.header
BioGenerics.header
VariantCallFormat.BCF.alt
VariantCallFormat.BCF.chrom
VariantCallFormat.BCF.filter
VariantCallFormat.BCF.genotype
VariantCallFormat.BCF.info
VariantCallFormat.BCF.info
VariantCallFormat.BCF.pos
VariantCallFormat.BCF.qual
VariantCallFormat.BCF.ref
VariantCallFormat.BCF.rlen
VariantCallFormat.alt
VariantCallFormat.chrom
VariantCallFormat.filter
VariantCallFormat.format
VariantCallFormat.genotype
VariantCallFormat.genotype
VariantCallFormat.genotype
VariantCallFormat.id
VariantCallFormat.info
VariantCallFormat.info
VariantCallFormat.infokeys
VariantCallFormat.pos
VariantCallFormat.qual
VariantCallFormat.ref
VariantCallFormat.Header
— MethodVCF.Header(metainfo::Vector, sampleID::Vector)
Create a VCF header with metainfo
and sampleID
.
VariantCallFormat.Header
— MethodVCF.Header()
Create an empty VCF header.
VariantCallFormat.MetaInfo
— MethodVCF.MetaInfo(str::AbstractString)
Create a VCF metainfo from str
containing a VCF header line. This function verifies the format and indexes fields for accessors.
VariantCallFormat.MetaInfo
— MethodVCF.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.
VariantCallFormat.MetaInfo
— MethodVCF.MetaInfo()
Create an unfilled VCF metainfo.
VariantCallFormat.Reader
— MethodVCF.Reader(input::IO)
Create a data reader of the VCF file format.
Arguments
input
: data source
VariantCallFormat.Record
— MethodVCF.Record(str::AbstractString)
Create a VCF object from str
containing a VCF record. This function verifies the format and indexes fields for accessors.
VariantCallFormat.Record
— MethodVCF.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.
VariantCallFormat.Record
— MethodVCF.Record()
Create an unfilled VCF record.
VariantCallFormat.Writer
— MethodVCF.Writer(output::IO, header::VCF.Header)
Create a data writer of the VCF file format.
Arguments
output
: data sinkheader
: VCF header object
BioGenerics.header
— Methodheader(reader::VCF.Reader)::VCF.Header
Get the header of reader
.
VariantCallFormat.alt
— Methodalt(record::Record)::Vector{String}
Get the alternate bases of record
.
VariantCallFormat.chrom
— Methodchrom(record::Record)::String
Get the chromosome name of record
.
VariantCallFormat.filter
— Methodfilter(record::Record)::Vector{String}
Get the filter status of record
.
VariantCallFormat.format
— Methodformat(record::Record)::Vector{String}
Get the genotype format of record
.
VariantCallFormat.genotype
— Methodgenotype(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 "."
.
VariantCallFormat.genotype
— Methodgenotype(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.
VariantCallFormat.genotype
— Methodgenotype(record::Record)::Vector{Vector{String}}
Get the genotypes of record
.
VariantCallFormat.id
— Methodid(record::Record)::Vector{String}
Get the identifiers of record
.
VariantCallFormat.info
— Methodinfo(record::Record, key::String)::String
Get the additional information of record
with key
. Keys without corresponding values return an empty string.
VariantCallFormat.info
— Methodinfo(record::Record)::Vector{Pair{String,String}}
Get the additional information of record
.
VariantCallFormat.infokeys
— Methodinfokeys(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.
VariantCallFormat.pos
— Methodpos(record::Record)::Int
Get the reference position of record
.
VariantCallFormat.qual
— Methodqual(record::Record)::Float64
Get the quality score of record
.
VariantCallFormat.ref
— Methodref(record::Record)::String
Get the reference bases of record
.
VariantCallFormat.BCF.Reader
— MethodBCF.Reader(input::IO)
Create a data reader of the BCF file format.
Arguments
input
: data source
VariantCallFormat.BCF.Record
— MethodBCF.Record()
Create an unfilled BCF record.
VariantCallFormat.BCF.Writer
— MethodBCF.Writer(output::IO, header::VCF.Header)
Create a data writer of the BCF file format.
Arguments
output
: data sinkheader
: VCF header object
BioGenerics.header
— Methodheader(reader::BCF.Reader)::VCF.Header
Get the header of reader
.
VariantCallFormat.BCF.alt
— Methodalt(record::Record)::Vector{String}
Get the alternate bases of record
.
VariantCallFormat.BCF.chrom
— Methodchrom(record::Record)::Int
Get the chromosome index of record
.
VariantCallFormat.BCF.filter
— Methodfilter(record::Record)::Vector{Int}
Get the filter indexes of record
.
VariantCallFormat.BCF.genotype
— Methodgenotype(record::Record)::Vector{Tuple{Int,Vector{Any}}}
Get the genotypes of record
. BCF genotypes are encoded by field, not by sample like VCF.
VariantCallFormat.BCF.info
— Methodinfo(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
.
VariantCallFormat.BCF.info
— Methodinfo(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
.
VariantCallFormat.BCF.pos
— Methodpos(record::Record)::Int
Get the reference position of record
. Note that the position of the first base is 1 (i.e. 1-based coordinate).
VariantCallFormat.BCF.qual
— Methodqual(record::Record)::Float32
Get the quality score of record
. Note that 0x7F800001
(signaling NaN) is interpreted as a missing value.
VariantCallFormat.BCF.ref
— Methodref(record::Record)::String
Get the reference bases of record
.
VariantCallFormat.BCF.rlen
— Methodrlen(record::Record)::Int
Get the length of record
projected onto the reference sequence.