Variation Methods

These methods extend the functionality of SequenceVariation.Variation for calculation of data related to Variations created from NGS read alignments.

HapLink.qualityMethod
quality(v::Variation, r::Union{SAM.Record,BAM.Record}) -> Float64

Get the phred-scalled basecall quality of v within the sequencing read of r.

source
HapLink.relativeposMethod
relativepos(v::Variation, r::Union{SAM.Record,BAM.Record})

Calculates the fractional position of v within the sequence of r. If v is out-of-bounds of r, then will return 0 for positions before r and 1 for positions after r.

source
HapLink.seqposMethod
seqpos(v::Variation, a::Union{Alignment,AlignedSequence,PairwiseAlignment})

Get the position of v in the sequence of a.

Example

using BioAlignments, BioSequences, SequenceVariation
v = Variation(dna"AAAAA", "A3T")
a = Alignment("2=1X2=", 1, 1)
seqpos(v, a)

# output

3
source
HapLink.subconsensus_variationsMethod
subconsensus_variations(vcf::Union{AbstractPath,AbstractString}, consensus::Haplotype)

Get a Vector{Variation} with passing variant calls from vcf that do not appear in consensus

source
HapLink.variationMethod
variation(r::VCF.Record, refseq::NucleotideSeq)

Construct a Variation from r applying to refseq. There is no validation that r's actually describes a mutation in refseq.

source