Add tests for translate(::Haplotype)

This commit is contained in:
Thomas A. Christensen II 2023-01-05 14:45:31 -06:00
parent a61a80d586
commit 6a4a39c859

View file

@ -69,6 +69,16 @@ end
@test Variation(seq2, "A3T") < Variation(seq2, "T4A") @test Variation(seq2, "A3T") < Variation(seq2, "T4A")
end end
@testset "HaplotypeTranslation" begin
ref1 = seq2
ref2 = seq3
alt = seq1
@test all(
v -> v in Haplotype(align(alt, ref2)), variations(translate(var, align(ref2, ref1)))
)
end
@testset "VariationPosition" begin @testset "VariationPosition" begin
refseq = dna"ACAACTTTATCT" refseq = dna"ACAACTTTATCT"
mutseq = dna"ACATCTTTATCT" mutseq = dna"ACATCTTTATCT"