mirror of
https://github.com/MillironX/SequenceVariation.jl.git
synced 2024-11-22 13:29:56 +00:00
test: Add tests for cigar(::Haplotype)
This commit is contained in:
parent
719a123992
commit
95ef4fdc62
1 changed files with 21 additions and 1 deletions
|
@ -31,7 +31,8 @@ using BioAlignments:
|
|||
pairalign,
|
||||
Alignment,
|
||||
AlignedSequence,
|
||||
PairwiseAlignment
|
||||
PairwiseAlignment,
|
||||
cigar
|
||||
using BioSequences: BioSequence, @dna_str, ungap!
|
||||
using BioSymbols: DNA_A
|
||||
using SequenceVariation
|
||||
|
@ -127,6 +128,25 @@ end
|
|||
@test Variation(seq2, "A3T") < Variation(seq2, "T4A")
|
||||
end
|
||||
|
||||
@testset "CIGAR" begin
|
||||
reference = dna"TGATGCGTGTAGCAACACTTATAGCG"
|
||||
reference_genotype = Haplotype(
|
||||
reference, Variation{typeof(reference),eltype(reference)}[]
|
||||
)
|
||||
genotype = Haplotype(
|
||||
reference,
|
||||
[
|
||||
Variation(reference, "Δ1-2"),
|
||||
Variation(reference, "10T"),
|
||||
Variation(reference, "Δ17-18"),
|
||||
Variation(reference, "A23C"),
|
||||
],
|
||||
)
|
||||
|
||||
@test cigar(reference_genotype) == "26M"
|
||||
@test cigar(genotype) == "2D7M1I7M2D8M"
|
||||
end
|
||||
|
||||
@testset "HaplotypeTranslation" begin
|
||||
ref1 = seq2
|
||||
ref2 = seq3
|
||||
|
|
Loading…
Reference in a new issue