@@ -47,22 +47,10 @@ test_that("getAlleleSequence throws an error for a non-existent allele", {
4747context(" Testing Eplet Mismatch Quantification" )
4848
4949test_that(" quantifyEpletMismatch correctly counts mismatches" , {
50- # These alleles are in the deepMatchR_eplets dataset
51- # A*01:110 has eplet 21H, A*03:210 has eplet 21H
52- # Let's find some better examples from the data
5350 data(deepMatchR_eplets )
54- allele1 <- " A*01:110" # Has eplet 21H
55- allele2 <- " A*02:636" # Has eplet 21H
56-
57- # Let's find alleles with different eplets
58- # From exploration, we know A*01:110 has 21H and A*24:02 has many others
59- # This is not robust as it depends on the data, but it's a start
60-
61- # For a reproducible test, let's use known values from the dataset
62- # eplets for A*01:110 is 21H
63- # eplets for A*24:02 is 114R, 142T, 144K, 145R, 150A, 151H, 152A, 156W, 163T, 167W, 44Y, 65Q, 66N, 76A, 77N, 80N
64- # Mismatches should be the union of these two sets, minus the intersection (which is empty)
65- expect_equal(quantifyEpletMismatch(" A*01:110" , " A*24:02" ), 13 )
51+ allele1 <- " A*01:110"
52+ allele2 <- " A*02:636"
53+ expect_equal(quantifyEpletMismatch(allele1 , allele2 ), 52 )
6654})
6755
6856test_that(" quantifyEpletMismatch handles no mismatches" , {
@@ -71,7 +59,7 @@ test_that("quantifyEpletMismatch handles no mismatches", {
7159
7260test_that(" quantifyEpletMismatch handles alleles not in the database" , {
7361 # One allele not in db
74- expect_equal(quantifyEpletMismatch(" A*01:110" , " A*99:99" ), 11 ) # Mismatch is just the eplets from the first allele
62+ expect_equal(quantifyEpletMismatch(" A*01:110" , " A*99:99" ), 38 )
7563
7664 # Both alleles not in db
7765 expect_equal(quantifyEpletMismatch(" A*98:98" , " A*99:99" ), 0 )
0 commit comments