Skip to content

Commit bfe2c06

Browse files
committed
Add tests for ard level serology mapping
1 parent 6c340b8 commit bfe2c06

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

tests/features/serology_redux.feature

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,11 @@ Feature: Serology Reduction
2929
Examples: Skip Loci that don't have Serology mappings
3030
| Allele | Level | Redux Serology |
3131
| A*01:01+A*01:01^B*08:ASXJP+B*07:02^C*02:02+C*07:HTGM^DPB1*28:01:01G+DPB1*296:01 | S | A1+A1^B7+B8^Cw2+Cw7 |
32+
33+
Examples: 2 field Serology Reduction uses lgx version of serology mapping
34+
35+
| Allele | Level | Redux Serology |
36+
| DRB1*07:34 | S | DR7 |
37+
| DRB1*07:34:01 | S | DR7 |
38+
| DRB1*07:34:02 | S | DR7 |
39+
| DRB4*01:03N | S | X |

tests/steps/redux_allele.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ def step_impl(context, level):
3939
@when("reducing on the {level} level with ping")
4040
def step_impl(context, level):
4141
context.level = level
42-
context.redux_allele = context.ard_ping.redux(context.allele, level)
42+
redux_allele = context.ard_ping.redux(context.allele, level)
43+
if not redux_allele:
44+
context.redux_allele = "X"
45+
else:
46+
context.redux_allele = redux_allele
4347

4448

4549
@when("reducing on the {level} level with ARS suffix enabled")

0 commit comments

Comments
 (0)