mirror of
https://github.com/MillironX/SequenceVariation.jl.git
synced 2024-11-25 14:49:55 +00:00
Add VCF spec tests for reference and alternate bases
This commit is contained in:
parent
b8e44c7b81
commit
97e1d193a6
1 changed files with 30 additions and 0 deletions
|
@ -69,3 +69,33 @@ end
|
|||
sub = Variation(refseq, "A4T")
|
||||
@test first(variations(var)) == sub
|
||||
end
|
||||
|
||||
@testset "VariationBases" begin
|
||||
# Test substition bases
|
||||
@test refbases(Variation(dna"ATCGA", "C3G")) == dna"C"
|
||||
@test altbases(Variation(dna"ATCGA", "C3G")) == dna"G"
|
||||
|
||||
# Test single deletion bases
|
||||
@test refbases(Variation(dna"ATCGA", "Δ3-3")) == dna"TC"
|
||||
@test altbases(Variation(dna"ATCGA", "Δ3-3")) == dna"T"
|
||||
|
||||
# Test multiple deletion bases
|
||||
@test refbases(Variation(dna"ATCGA", "Δ3-4")) == dna"TCG"
|
||||
@test altbases(Variation(dna"ATCGA", "Δ3-4")) == dna"T"
|
||||
|
||||
# Test first position deletion
|
||||
@test refbases(Variation(dna"ATCGA", "Δ1-1")) == dna"AT"
|
||||
@test altbases(Variation(dna"ATCGA", "Δ1-1")) == dna"T"
|
||||
|
||||
# Test single insertion bases
|
||||
@test refbases(Variation(dna"ATCGA", "3A")) == dna"C"
|
||||
@test altbases(Variation(dna"ATCGA", "3A")) == dna"CA"
|
||||
|
||||
# Test multiple insertion bases
|
||||
@test refbases(Variation(dna"ATCGA", "3TAG")) == dna"C"
|
||||
@test altbases(Variation(dna"ATCGA", "3TAG")) == dna"CTAG"
|
||||
|
||||
# Test first position insertion
|
||||
@test refbases(Variation(dna"ATCGA", "1C")) == dna"A"
|
||||
@test altbases(Variation(dna"ATCGA", "1C")) == dna"CA"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue