mirror of
https://github.com/MillironX/SequenceVariation.jl.git
synced 2024-12-22 08:28:16 +00:00
Add docstring for Variation
This commit is contained in:
parent
ea25ab87dc
commit
673481b40f
1 changed files with 22 additions and 0 deletions
|
@ -1,3 +1,25 @@
|
|||
"""
|
||||
Variation{S<:BioSequence,T<:BioSymbol}
|
||||
|
||||
A single change to a biological sequence. A general wrapper that can represent a
|
||||
sequence-specific [`Substitution`](@ref), [`Deletion`](@ref) or [`Insertion`](@ref).
|
||||
`Variation` is more robust than [`Edit`](@ref), due to inclusion of the reference sequence
|
||||
and built-in validation.
|
||||
|
||||
# Constructors
|
||||
|
||||
Variation(ref::S, e::Edit{S,T}) where {S<:BioSequence,T<:BioSymbol}
|
||||
Variation(ref::S, edit::AbstractString) where {S<:BioSequence}
|
||||
|
||||
Generally speaking, the `Edit` constructor should be avoided to ensure corectness: use of
|
||||
[`variations(::Variant)`](@ref) is encouraged, instead.
|
||||
|
||||
Constructing a `Variation` from an `AbstractString` will parse the from `edit` using the
|
||||
following syntax:
|
||||
- Substitution: `"<REFBASE><POS><ALTBASE>"`, e.g. `"G16C"`
|
||||
- Deletion: `"Δ<STARTPOS>-<ENDPOS>"`, e.g. `"Δ1-2"`
|
||||
- Insertion: `"<POS><ALTBASES>"`, e.g. `"11T"`
|
||||
"""
|
||||
struct Variation{S<:BioSequence,T<:BioSymbol}
|
||||
ref::S
|
||||
edit::Edit{S,T}
|
||||
|
|
Loading…
Reference in a new issue