mirror of
https://github.com/MillironX/SequenceVariation.jl.git
synced 2024-11-24 22:29:55 +00:00
Update getter usage in translate function
This commit is contained in:
parent
ef4460bbbf
commit
cb1c429610
2 changed files with 5 additions and 4 deletions
|
@ -20,7 +20,7 @@ TODO now:
|
|||
* Add tests
|
||||
"""
|
||||
|
||||
using BioAlignments: BioAlignments, PairwiseAlignment, OP_SOFT_CLIP
|
||||
using BioAlignments: BioAlignments, PairwiseAlignment, OP_SOFT_CLIP, sequence
|
||||
using BioGenerics: BioGenerics, leftposition, rightposition
|
||||
using BioSequences: BioSequences, BioSequence, NucleotideSeq, LongSequence, isgap
|
||||
using BioSymbols: BioSymbol
|
||||
|
|
|
@ -71,9 +71,10 @@ function Base.in(v::Variation, var::Variant)
|
|||
end
|
||||
|
||||
function translate(var::Variation{S,T}, aln::PairwiseAlignment{S,S}) where {S,T}
|
||||
kind = var.edit.x
|
||||
pos = var.edit.pos
|
||||
seq, ref = aln.seq, aln.b
|
||||
kind = mutation(var)
|
||||
pos = leftposition(var)
|
||||
seq = sequence(aln)
|
||||
ref = aln.b
|
||||
|
||||
# Special case: Insertions may have a pos of 0, which cannot be mapped to
|
||||
# the seq using ref2seq
|
||||
|
|
Loading…
Reference in a new issue