From 6a4a39c85936236a63c9049bad40292c7ed78ebb Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Thu, 5 Jan 2023 14:45:31 -0600 Subject: [PATCH] Add tests for `translate(::Haplotype)` --- test/runtests.jl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/runtests.jl b/test/runtests.jl index eb5f377..038edc0 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -69,6 +69,16 @@ end @test Variation(seq2, "A3T") < Variation(seq2, "T4A") 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 refseq = dna"ACAACTTTATCT" mutseq = dna"ACATCTTTATCT"