Skip to content

Commit d2cc574

Browse files
committed
fix XX CWD reduction
- was checking for mac again rather than xx - added a failing test
1 parent 23492c5 commit d2cc574

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

pyard/ard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@ def cwd_redux(self, allele_list_gl):
838838
for allele in allele_list_gl.split("/"):
839839
if self.is_mac(allele):
840840
alleles.extend(self.expand_mac(allele).split("/"))
841-
elif is_2_field_allele(allele) and not self.is_mac(allele):
841+
elif is_2_field_allele(allele) and not self.is_XX(allele):
842842
alleles.append(allele)
843843
else:
844844
alleles.extend(self.redux(allele, "lgx").split("/"))

tests/features/cwd.feature

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,9 @@ Feature: CWD Reduction
4545
| C*04:KBG | C*04:01/C*04:09N |
4646
| C*04:01:01G/C*04:09N | C*04:01/C*04:09N |
4747
| B*15:01/B*15:01N/B*15:102/B*15:104 | B*15:01/B*15:01N |
48+
49+
Scenario: CWD reduction of XX alleles
50+
51+
Given the GL String we want to find CWD of is "DRB1*14:XX"
52+
When we find CWD alleles for the GL String
53+
Then the CWD alleles should be "DRB1*14:01/DRB1*14:02/DRB1*14:03/DRB1*14:04/DRB1*14:05/DRB1*14:06/DRB1*14:07/DRB1*14:08/DRB1*14:09/DRB1*14:10/DRB1*14:11/DRB1*14:12/DRB1*14:13/DRB1*14:14/DRB1*14:15/DRB1*14:16/DRB1*14:17/DRB1*14:18/DRB1*14:19/DRB1*14:20/DRB1*14:21/DRB1*14:22/DRB1*14:24/DRB1*14:25/DRB1*14:28/DRB1*14:29/DRB1*14:33/DRB1*14:48/DRB1*14:61/DRB1*14:70"

0 commit comments

Comments
 (0)