mirror of
https://github.com/MillironX/SequenceVariation.jl.git
synced 2024-11-22 21:39:55 +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,
|
pairalign,
|
||||||
Alignment,
|
Alignment,
|
||||||
AlignedSequence,
|
AlignedSequence,
|
||||||
PairwiseAlignment
|
PairwiseAlignment,
|
||||||
|
cigar
|
||||||
using BioSequences: BioSequence, @dna_str, ungap!
|
using BioSequences: BioSequence, @dna_str, ungap!
|
||||||
using BioSymbols: DNA_A
|
using BioSymbols: DNA_A
|
||||||
using SequenceVariation
|
using SequenceVariation
|
||||||
|
@ -127,6 +128,25 @@ end
|
||||||
@test Variation(seq2, "A3T") < Variation(seq2, "T4A")
|
@test Variation(seq2, "A3T") < Variation(seq2, "T4A")
|
||||||
end
|
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
|
@testset "HaplotypeTranslation" begin
|
||||||
ref1 = seq2
|
ref1 = seq2
|
||||||
ref2 = seq3
|
ref2 = seq3
|
||||||
|
|
Loading…
Reference in a new issue