From 6bc1528d18ac2bbda9f48c2ebffe2cb51201e9a0 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Tue, 14 Jun 2022 16:24:55 -0500 Subject: [PATCH] Add tests for Variation parsing --- test/runtests.jl | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index 78e4d0b..280f18a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -23,9 +23,10 @@ TODO now: * Add tests """ -using BioSequences using BioAlignments +using BioSequences using SequenceVariation +using Test const DNA_MODEL = BioAlignments.AffineGapScoreModel(EDNAFULL, gap_open=-25, gap_extend=-2) @@ -44,3 +45,15 @@ var = Variant(align(seq1, seq2)) aln02 = PairwiseAlignment(read02, refseq) @test Variant(aln01).edits == Variant(aln02).edits end + +@testset "VariationParsing" begin + refseq = dna"ACAACTTTATCT" + + sub = Variation(refseq, "A4T") + del = Variation(refseq, "Δ4-5") + ins = Variation(refseq, "4TT") + + @test mutation(sub) isa Substitution + @test mutation(del) isa Deletion + @test mutation(ins) isa Insertion +end