mirror of
https://github.com/MillironX/SequenceVariation.jl.git
synced 2024-11-22 05:19:55 +00:00
Apply Blue style to tests file
This commit is contained in:
parent
fb9ab68cca
commit
d29764d2bc
1 changed files with 17 additions and 7 deletions
|
@ -29,7 +29,7 @@ using BioSequences
|
||||||
using SequenceVariation
|
using SequenceVariation
|
||||||
using Test
|
using Test
|
||||||
|
|
||||||
const DNA_MODEL = BioAlignments.AffineGapScoreModel(EDNAFULL, gap_open=-25, gap_extend=-2)
|
const DNA_MODEL = BioAlignments.AffineGapScoreModel(EDNAFULL; gap_open=-25, gap_extend=-2)
|
||||||
|
|
||||||
align(a::BioSequence, b::BioSequence) = pairalign(GlobalAlignment(), a, b, DNA_MODEL).aln
|
align(a::BioSequence, b::BioSequence) = pairalign(GlobalAlignment(), a, b, DNA_MODEL).aln
|
||||||
seq1 = ungap!(dna"--ATGCGTGTTAGCAAC--TTATCGCG")
|
seq1 = ungap!(dna"--ATGCGTGTTAGCAAC--TTATCGCG")
|
||||||
|
@ -112,23 +112,33 @@ end
|
||||||
refseq = dna"GATTACA"
|
refseq = dna"GATTACA"
|
||||||
mutseq = dna"GATTACAAAA"
|
mutseq = dna"GATTACAAAA"
|
||||||
|
|
||||||
refvar = Variant(refseq, SequenceVariation.Edit{typeof(refseq), eltype(refseq)}[])
|
refvar = Variant(refseq, SequenceVariation.Edit{typeof(refseq),eltype(refseq)}[])
|
||||||
|
|
||||||
# Test for ending soft clip
|
# Test for ending soft clip
|
||||||
@test Variant(PairwiseAlignment(AlignedSequence(mutseq, Alignment("7=3S", 1, 1)), refseq)) == refvar
|
@test Variant(
|
||||||
|
PairwiseAlignment(AlignedSequence(mutseq, Alignment("7=3S", 1, 1)), refseq)
|
||||||
|
) == refvar
|
||||||
|
|
||||||
# Test for ending soft+hard clip
|
# Test for ending soft+hard clip
|
||||||
@test Variant(PairwiseAlignment(AlignedSequence(mutseq, Alignment("7=3S2H", 1, 1)), refseq)) == refvar
|
@test Variant(
|
||||||
|
PairwiseAlignment(AlignedSequence(mutseq, Alignment("7=3S2H", 1, 1)), refseq)
|
||||||
|
) == refvar
|
||||||
|
|
||||||
# Test that ending insertions are still valid
|
# Test that ending insertions are still valid
|
||||||
@test length(Variant(PairwiseAlignment(AlignedSequence(mutseq, Alignment("7=3I", 1, 1)), refseq)).edits) == 1
|
@test length(
|
||||||
|
Variant(
|
||||||
|
PairwiseAlignment(AlignedSequence(mutseq, Alignment("7=3I", 1, 1)), refseq)
|
||||||
|
).edits,
|
||||||
|
) == 1
|
||||||
|
|
||||||
# Test that out-of-bounds bases are still caught
|
# Test that out-of-bounds bases are still caught
|
||||||
@test_throws BoundsError Variant(PairwiseAlignment(AlignedSequence(mutseq, Alignment("7=3X", 1, 1)), refseq))
|
@test_throws BoundsError Variant(
|
||||||
|
PairwiseAlignment(AlignedSequence(mutseq, Alignment("7=3X", 1, 1)), refseq)
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
@testset "Aqua" begin
|
@testset "Aqua" begin
|
||||||
Aqua.test_ambiguities(SequenceVariation;recursive=false)
|
Aqua.test_ambiguities(SequenceVariation; recursive=false)
|
||||||
# TODO: Refactor `Edit` so that this test doesn't fail
|
# TODO: Refactor `Edit` so that this test doesn't fail
|
||||||
# TODO: This test _should_ be set to @test_fails, but Aqua's syntax doesn't allow that
|
# TODO: This test _should_ be set to @test_fails, but Aqua's syntax doesn't allow that
|
||||||
# Aqua.test_unbound_args(SequenceVariation)
|
# Aqua.test_unbound_args(SequenceVariation)
|
||||||
|
|
Loading…
Reference in a new issue