mirror of
https://github.com/MillironX/SequenceVariation.jl.git
synced 2024-11-25 06:39: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
|
* Add tests
|
||||||
"""
|
"""
|
||||||
|
|
||||||
using BioAlignments: BioAlignments, PairwiseAlignment, OP_SOFT_CLIP
|
using BioAlignments: BioAlignments, PairwiseAlignment, OP_SOFT_CLIP, sequence
|
||||||
using BioGenerics: BioGenerics, leftposition, rightposition
|
using BioGenerics: BioGenerics, leftposition, rightposition
|
||||||
using BioSequences: BioSequences, BioSequence, NucleotideSeq, LongSequence, isgap
|
using BioSequences: BioSequences, BioSequence, NucleotideSeq, LongSequence, isgap
|
||||||
using BioSymbols: BioSymbol
|
using BioSymbols: BioSymbol
|
||||||
|
|
|
@ -71,9 +71,10 @@ function Base.in(v::Variation, var::Variant)
|
||||||
end
|
end
|
||||||
|
|
||||||
function translate(var::Variation{S,T}, aln::PairwiseAlignment{S,S}) where {S,T}
|
function translate(var::Variation{S,T}, aln::PairwiseAlignment{S,S}) where {S,T}
|
||||||
kind = var.edit.x
|
kind = mutation(var)
|
||||||
pos = var.edit.pos
|
pos = leftposition(var)
|
||||||
seq, ref = aln.seq, aln.b
|
seq = sequence(aln)
|
||||||
|
ref = aln.b
|
||||||
|
|
||||||
# Special case: Insertions may have a pos of 0, which cannot be mapped to
|
# Special case: Insertions may have a pos of 0, which cannot be mapped to
|
||||||
# the seq using ref2seq
|
# the seq using ref2seq
|
||||||
|
|
Loading…
Reference in a new issue