mirror of
https://github.com/MillironX/SequenceVariation.jl.git
synced 2024-11-22 13:29:56 +00:00
Add docstring for Variant
This commit is contained in:
parent
f1baf27865
commit
f49220782b
1 changed files with 19 additions and 2 deletions
|
@ -1,5 +1,22 @@
|
||||||
# Edits are applied sequentially from first to last pos.
|
"""
|
||||||
# The vector must always be sorted by pos.
|
Variant{S<:BioSequence,T<:BioSymbol}
|
||||||
|
|
||||||
|
A set of variations within a given sequence that are all found together. Depending on the
|
||||||
|
field, it might also be referred to as a "genotype," "haplotype," or "strain."
|
||||||
|
|
||||||
|
# Constructors
|
||||||
|
|
||||||
|
Variant(ref::S, edits::Vector{Edit{S,T}}) where {S<:BioSequence,T<:BioSymbol}
|
||||||
|
Variant(ref::S, vars::Vector{Variation{S,T}}) where {S<:BioSequence,T<:BioSymbol}
|
||||||
|
Variant(
|
||||||
|
aln::PairwiseAlignment{T,T}
|
||||||
|
) where {T<:LongSequence{<:Union{BS.AminoAcidAlphabet,BS.NucleicAcidAlphabet}}}
|
||||||
|
|
||||||
|
When constructing a `Variant` from a vector of [`Edit`](@ref)s or [`Variation`](@ref)s, the
|
||||||
|
edits are applied sequentially from first to last position, therefore the vector must always
|
||||||
|
be sorted by position. These edits are sorted automatically if constructing from an
|
||||||
|
alignment.
|
||||||
|
"""
|
||||||
struct Variant{S<:BioSequence,T<:BioSymbol}
|
struct Variant{S<:BioSequence,T<:BioSymbol}
|
||||||
ref::S
|
ref::S
|
||||||
edits::Vector{Edit{S,T}}
|
edits::Vector{Edit{S,T}}
|
||||||
|
|
Loading…
Reference in a new issue