Add tests for Variation parsing

This commit is contained in:
Thomas A. Christensen II 2022-06-14 16:24:55 -05:00
parent 2d05b233a9
commit 6bc1528d18
Signed by: millironx
GPG key ID: 139C07724802BC5D

View file

@ -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