VariationCall

HapLink.VariationCallType
VariationCall

Represents a Variation that is supported by aligned reads with sufficient metadata to support or refute its validity. It is designed to be converted into a line in Variant Call Format, or a VCF.Record.

Fields

  • variation::Variation: The Variation of this call
  • quality::Union{Nothing,Number}: Phred quality of the basecall for variation
  • filter::Vector{String}: Indicator if variation has passed filters and is actually a variant call, or a list of criteria that have failed it
  • depth::Union{Nothing,UInt}: The number of reads that cover leftposition(variation)
  • strandbias::Union{Nothing,Float64}: The fraction of times variation appears on a positive strand
  • altdepth::Union{Nothing,UInt}: The number of types variation occurs
  • readpos::Union{Nothing,UInt}: The averagerelative position of variation in each read
  • pvalue::Union{Nothing,Float64}: The Fisher's Exact Test $p$-value of this call
source
HapLink.call_variantMethod
call_variant(
    pileup::VariationPileup,
    α::Float64;
    D::Union{Nothing,Int}=nothing,
    Q::Union{Nothing,Float64}=nothing,
    X::Union{Nothing,Float64}=nothing,
    F::Union{Nothing,Float64}=nothing,
    S::Union{Nothing,Float64}=nothing,
) -> VariationCall

Calls variant from a pileup.

Arguments

  • pileup::VariationPileup: The pileup to call variants from
  • α::Float64: Fisher's Exact Test significance ($α$) level to call variants

Keywords

Note

Leave any keyword undefined to skip filtering based on that field

  • D::Union{Nothing,Int}=nothing: Minimum total read depth for a variant to be called
  • Q::Union{Nothing,Float64}=nothing: Minimum average Phred quality for a variant to be called
  • X::Union{Nothing,Float64}=nothing: Maximum average distance variant can be from read edge to be called
  • F::Union{Nothing,Float64}=nothing: Minimum alternate frequency for a variant to be called
  • S::Union{Nothing,Float64}=nothing: Maximum proportion of the number of times variant can appear on one strand versus the other
source
HapLink.filtersMethod
filters(vc::VariationCall) -> Vector{String}

Gets all filters that have been applied to vc. Note that an empty FILTER entry is not permitted under the VCF spec, and an empty array should not automatically be considered to have PASSed all filters.

source
HapLink.p_valueMethod
p_value(vc::VariationCall) -> Union{Nothing,Float64}

Gets the $p$-value of the observed statistic of vc. Returns nothing if unknown.

See also variation_test

source
HapLink.variation_testMethod
variation_test(depth::Int, altdepth::Int, quality::Float64)

Conducts a Fisher's Exact Test to deterimine the likelihood of a variant with total depth and variation depth altdepth occuring, given an average basecall quality. Returns the $p$-value of the test.

source
HapLink.vcfMethod
vcf(vc::VariationCall, refname::AbstractString) -> VCF.Record

Converts vc into a VCF.Record. refname is required and used as the CHROM field in the record.

source