Skip to content

Commit 4a7bb95

Browse files
authored
Merge pull request #323 from pbashyal-nmdp/ping_for_all
Make `ping` mode default
2 parents 9e42286 + ed6d2cb commit 4a7bb95

14 files changed

+146
-69
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ LABEL MAINTAINER="Pradeep Bashyal"
44

55
WORKDIR /app
66

7-
ARG PY_ARD_VERSION=1.1.3
7+
ARG PY_ARD_VERSION=1.2.0
88

99
COPY requirements.txt /app
1010
RUN pip install --no-cache-dir --upgrade pip && \

README.md

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ Swiss army knife of **HLA** Nomenclature
88

99
**Note:**
1010

11-
Release `1.1.1` has extensive Serolgy related updates and affects Serology related data. Please rebuild the cache database if there's a missing Serology error.
11+
- `ping` mode is default. When in `ping` mode, alleles that do not have a G group, their corresponding P group is used.
12+
13+
- Release `1.1.1` has extensive Serolgy related updates and affects Serology related data. Please rebuild the cache database if there's a missing Serology error.
1214
```
13-
pyard-import --re-install
15+
pyard-import --re-install
1416
```
1517

1618
Or set `py-ard` requirements to be `py-ard<=1.1.1` for your dependency.
@@ -85,11 +87,21 @@ Homebrew will notify you as new versions of `py-ard` are released.
8587

8688
### Install from source
8789

90+
Checkout the `py-ard` source code.
91+
8892
```shell
89-
python3 -m venv venv
93+
git clone https://github.com/nmdp-bioinformatics/py-ard.git
94+
cd py-ard
95+
```
96+
97+
Create and activate virtual environment. Install the py-ard dependencies.
98+
99+
```shell
100+
make venv
101+
90102
source venv/bin/activate
91103

92-
python setup.py install
104+
make install
93105
```
94106

95107
See [Our Contribution Guide](CONTRIBUTING.rst) for open source contribution to `py-ard`.
@@ -103,13 +115,16 @@ it'll throw an Invalid Exception, not silently return an empty result.
103115

104116
#### Initialize `py-ard`
105117

106-
Import `pyard` package.
118+
Import and initialize `pyard` package.
119+
The default initialization is to use the latest version of IPD-IMGT/HLA database.
107120

108121
```python
109122
import pyard
123+
124+
ard = pyard.init()
110125
```
111126

112-
Initialize `ARD` object with a version of IMGT HLA database
127+
Initialize `py-ard` with a particular version of IPD/IMGT-HLA database.
113128

114129
```python
115130
import pyard
@@ -144,13 +159,6 @@ As MAC data changes frequently, you can choose to refresh the MAC code for curre
144159
ard.refresh_mac_codes()
145160
```
146161

147-
The default initialization is to use the latest version of IPD-IMGT/HLA database.
148-
149-
```python
150-
import pyard
151-
152-
ard = pyard.init()
153-
```
154162

155163
You can check the current version of IPD-IMGT/HLA database.
156164

api-spec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ openapi: 3.0.3
22
info:
33
title: ARD Reduction
44
description: Reduce to ARD Level
5-
version: "1.1.3"
5+
version: "1.2.0"
66
servers:
77
- url: 'http://localhost:8080'
88
tags:

pyard/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from .misc import get_imgt_db_versions as db_versions
2727

2828
__author__ = """NMDP Bioinformatics"""
29-
__version__ = "1.1.3"
29+
__version__ = "1.2.0"
3030

3131

3232
def init(

pyard/ard.py

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"reduce_XX": True,
5757
"reduce_MAC": True,
5858
"reduce_shortnull": True,
59-
"ping": False,
59+
"ping": True,
6060
"map_drb345_to_drbx": True,
6161
"verbose_log": False,
6262
"ARS_as_lg": False,
@@ -206,11 +206,33 @@ def _redux_allele(
206206
if redux_type in ["lg", "lgx", "G"]:
207207
allele = allele[:-1]
208208
if self._config["ping"] and re_ping:
209+
# ping: alleles that are in P group but not in G groups are defined
210+
# for 2-field alleles. If not already in 2-field form, reduce it to
211+
# 2-field version first then re-reduce it to P group.
209212
if redux_type in ("lg", "lgx", "U2"):
210213
if allele in self.ars_mappings.p_not_g:
211-
return self.ars_mappings.p_not_g[allele]
214+
not_g_allele = self.ars_mappings.p_not_g[allele]
215+
if redux_type == "lg":
216+
return self._add_lg_suffix(not_g_allele)
217+
return not_g_allele
212218
else:
213-
return self._redux_allele(allele, redux_type, False)
219+
redux_allele = self._redux_allele(allele, redux_type, False)
220+
if redux_allele.endswith("g"):
221+
no_suffix_allele = redux_allele[:-1]
222+
elif redux_allele.endswith("ARS"):
223+
no_suffix_allele = redux_allele[:-3]
224+
else:
225+
no_suffix_allele = redux_allele
226+
if (
227+
no_suffix_allele == allele
228+
or no_suffix_allele in self.ars_mappings.p_not_g.values()
229+
):
230+
return redux_allele
231+
redux_allele = self._redux_allele(
232+
no_suffix_allele, redux_type, True
233+
)
234+
if self._is_valid_allele(redux_allele):
235+
return redux_allele
214236

215237
if redux_type == "G" and allele in self.ars_mappings.g_group:
216238
if allele in self.ars_mappings.dup_g:
@@ -229,11 +251,7 @@ def _redux_allele(
229251
# return allele with only first 2 field
230252
redux_allele = ":".join(allele.split(":")[0:2])
231253
if redux_type == "lg":
232-
# ARS suffix maybe used instead of g
233-
if self._config["ARS_as_lg"]:
234-
return redux_allele + "ARS"
235-
# lg mode has g appended with lgx reduction
236-
return redux_allele + "g"
254+
return self._add_lg_suffix(redux_allele)
237255
return redux_allele
238256
elif redux_type == "W":
239257
# new redux_type which is full WHO expansion
@@ -319,6 +337,13 @@ def _redux_allele(
319337
else:
320338
raise InvalidAlleleError(f"{allele} is an invalid allele.")
321339

340+
def _add_lg_suffix(self, redux_allele):
341+
# ARS suffix maybe used instead of g
342+
if self._config["ARS_as_lg"]:
343+
return redux_allele + "ARS"
344+
# lg mode has g appended with lgx reduction
345+
return redux_allele + "g"
346+
322347
def _get_non_strict_allele(self, allele):
323348
"""
324349
In non-strict mode, if the allele is not valid,

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 1.1.3
2+
current_version = 1.2.0
33
commit = True
44
tag = True
55

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
setup(
3838
name="py-ard",
39-
version="1.1.3",
39+
version="1.2.0",
4040
description="ARD reduction for HLA with Python",
4141
long_description=readme,
4242
long_description_content_type="text/markdown",

tests/environment.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,6 @@
2525
def before_all(context):
2626
context.ard = pyard.init("3440", data_dir="/tmp/py-ard")
2727

28-
# an ard with ping set to True
29-
ping_config = {
30-
"ping": True,
31-
}
32-
context.ard_ping = pyard.init("3440", data_dir="/tmp/py-ard", config=ping_config)
33-
3428
# an ard with ARS suffix for lg
3529
lg_ars_config = {
3630
"ARS_as_lg": True,

tests/expected-serology.json

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
11
{
22
"redux": [
3-
{
4-
"glstring": "A10",
5-
"ard_type": "G",
6-
"expected_gl": "A*25:01:01G/A*25:01:02/A*25:01:03/A*25:01:04/A*25:01:05/A*25:01:06/A*25:01:07/A*25:01:08/A*25:01:09/A*25:01:10/A*25:01:11/A*25:01:12/A*25:01:14/A*25:01:16/A*25:01:17/A*25:01:19/A*25:02/A*25:03/A*25:04/A*25:05/A*25:06/A*25:08/A*25:09/A*25:10/A*25:11/A*25:13/A*25:14/A*25:15/A*25:16/A*25:17/A*25:18/A*25:19:01/A*25:19:02/A*25:20/A*25:21/A*25:22/A*25:23/A*25:24/A*25:25/A*25:26/A*25:27:01/A*25:27:02/A*25:28/A*25:29/A*25:30/A*25:31/A*25:32/A*25:33/A*25:34/A*25:35/A*25:36/A*25:37/A*25:38/A*25:39/A*25:40/A*25:41/A*25:43/A*25:44/A*25:45/A*25:46/A*25:47/A*25:48/A*25:50/A*25:51/A*25:52/A*25:53/A*25:54/A*25:55/A*25:56/A*25:57/A*25:58/A*25:59/A*25:61/A*25:64/A*25:65/A*25:66/A*25:67/A*25:70/A*25:71/A*25:72/A*25:73/A*26:01:01G/A*26:01:02/A*26:01:03/A*26:01:04/A*26:01:05/A*26:01:06/A*26:01:08/A*26:01:09/A*26:01:10/A*26:01:11/A*26:01:12/A*26:01:13/A*26:01:14/A*26:01:15/A*26:01:16/A*26:01:17/A*26:01:18/A*26:01:19/A*26:01:20/A*26:01:21/A*26:01:22/A*26:01:23/A*26:01:24/A*26:01:26/A*26:01:27/A*26:01:28/A*26:01:29/A*26:01:30/A*26:01:31/A*26:01:33/A*26:01:34/A*26:01:36/A*26:01:37/A*26:01:38/A*26:01:39/A*26:01:41/A*26:01:42/A*26:01:45/A*26:01:48/A*26:01:50/A*26:01:51/A*26:01:52/A*26:01:53/A*26:01:54/A*26:01:57/A*26:01:59/A*26:01:60/A*26:01:61/A*26:01:62/A*26:01:63/A*26:01:64/A*26:01:65/A*26:01:66/A*26:01:69/A*26:02:01/A*26:02:02/A*26:03:01G/A*26:04/A*26:05/A*26:06/A*26:07:01/A*26:07:02/A*26:08:01G/A*26:08:02/A*26:08:03/A*26:09/A*26:10/A*26:12/A*26:13/A*26:14/A*26:15/A*26:16/A*26:17/A*26:18/A*26:19/A*26:20:01/A*26:20:02/A*26:21/A*26:22/A*26:23/A*26:27/A*26:28/A*26:29/A*26:30/A*26:31/A*26:32/A*26:33/A*26:34/A*26:35/A*26:36/A*26:37/A*26:38/A*26:39/A*26:40/A*26:41/A*26:42/A*26:43:01/A*26:43:02/A*26:45/A*26:46/A*26:47/A*26:48/A*26:49/A*26:50/A*26:51/A*26:52/A*26:53/A*26:54/A*26:55/A*26:57/A*26:58/A*26:59/A*26:61/A*26:62/A*26:63/A*26:64/A*26:65/A*26:66/A*26:67/A*26:68/A*26:69/A*26:70/A*26:72/A*26:73/A*26:74/A*26:75/A*26:76/A*26:77/A*26:78/A*26:79/A*26:80/A*26:81/A*26:83/A*26:84/A*26:85/A*26:86/A*26:87/A*26:88/A*26:89/A*26:90/A*26:91/A*26:92/A*26:93/A*26:94/A*26:95/A*26:96/A*26:97/A*26:100/A*26:101/A*26:102/A*26:103/A*26:104/A*26:105/A*26:106/A*26:108/A*26:109/A*26:110/A*26:111/A*26:112/A*26:113/A*26:114/A*26:115/A*26:116/A*26:118/A*26:119/A*26:120/A*26:121/A*26:122/A*26:123/A*26:124/A*26:125/A*26:126/A*26:128/A*26:129/A*26:130/A*26:131/A*26:132/A*26:133/A*26:134/A*26:135/A*26:136/A*26:137/A*26:138/A*26:139/A*26:140/A*26:141/A*26:142/A*26:143/A*26:144/A*26:146/A*26:147/A*26:148/A*26:149/A*26:150/A*26:151/A*26:152/A*26:153/A*26:154/A*26:155/A*26:156/A*26:158/A*26:159/A*26:165/A*26:169/A*26:170/A*26:171/A*26:172/A*26:173/A*26:174/A*26:175/A*26:176/A*26:177/A*26:178/A*26:181/A*26:182/A*26:184/A*26:188/A*26:189/A*26:190/A*26:192/A*26:193/A*26:194/A*26:195/A*26:196/A*26:197/A*26:198/A*26:200/A*26:204:01G/A*26:205/A*26:207/A*26:211/A*26:212/A*26:213/A*26:214/A*34:01:01G/A*34:01:02/A*34:01:03/A*34:01:05/A*34:02:01G/A*34:02:02/A*34:02:03/A*34:02:04/A*34:02:05/A*34:03/A*34:04/A*34:05/A*34:06/A*34:07/A*34:08/A*34:09/A*34:11/A*34:12/A*34:13/A*34:14/A*34:15/A*34:16/A*34:17/A*34:19/A*34:20/A*34:21/A*34:22/A*34:23/A*34:24/A*34:25/A*66:01:01G/A*66:01:02/A*66:01:03/A*66:01:04/A*66:01:05/A*66:02:01G/A*66:03:01G/A*66:04/A*66:05/A*66:06/A*66:07/A*66:09/A*66:10/A*66:11/A*66:12/A*66:13/A*66:14/A*66:15/A*66:16/A*66:18/A*66:19/A*66:20/A*66:21/A*66:22/A*66:23/A*66:24/A*66:25/A*66:26Q/A*66:30/A*66:32/A*66:33/A*66:35/A*66:37/A*66:40/A*66:41/A*66:42/A*66:43"
7-
},
8-
{
9-
"glstring": "A10",
10-
"ard_type": "lg",
11-
"expected_gl": "A*25:01g/A*25:02g/A*25:03g/A*25:04g/A*25:05g/A*25:06g/A*25:08g/A*25:09g/A*25:10g/A*25:11g/A*25:13g/A*25:14g/A*25:15g/A*25:16g/A*25:17g/A*25:18g/A*25:19g/A*25:20g/A*25:21g/A*25:22g/A*25:23g/A*25:24g/A*25:25g/A*25:26g/A*25:27g/A*25:28g/A*25:29g/A*25:30g/A*25:31g/A*25:32g/A*25:33g/A*25:34g/A*25:35g/A*25:36g/A*25:37g/A*25:38g/A*25:39g/A*25:40g/A*25:41g/A*25:43g/A*25:44g/A*25:45g/A*25:46g/A*25:47g/A*25:48g/A*25:50g/A*25:51g/A*25:52g/A*25:53g/A*25:54g/A*25:55g/A*25:56g/A*25:57g/A*25:58g/A*25:59g/A*25:61g/A*25:64g/A*25:65g/A*25:66g/A*25:67g/A*25:70g/A*25:71g/A*25:72g/A*25:73g/A*26:01g/A*26:02g/A*26:03g/A*26:04g/A*26:05g/A*26:06g/A*26:07g/A*26:08g/A*26:09g/A*26:10g/A*26:12g/A*26:13g/A*26:14g/A*26:15g/A*26:16g/A*26:17g/A*26:18g/A*26:19g/A*26:20g/A*26:21g/A*26:22g/A*26:23g/A*26:27g/A*26:28g/A*26:29g/A*26:30g/A*26:31g/A*26:32g/A*26:33g/A*26:34g/A*26:35g/A*26:36g/A*26:37g/A*26:38g/A*26:39g/A*26:40g/A*26:41g/A*26:42g/A*26:43g/A*26:45g/A*26:46g/A*26:47g/A*26:48g/A*26:49g/A*26:50g/A*26:51g/A*26:52g/A*26:53g/A*26:54g/A*26:55g/A*26:57g/A*26:58g/A*26:59g/A*26:61g/A*26:62g/A*26:63g/A*26:64g/A*26:65g/A*26:66g/A*26:67g/A*26:68g/A*26:69g/A*26:70g/A*26:72g/A*26:73g/A*26:74g/A*26:75g/A*26:76g/A*26:77g/A*26:78g/A*26:79g/A*26:80g/A*26:81g/A*26:83g/A*26:84g/A*26:85g/A*26:86g/A*26:87g/A*26:88g/A*26:89g/A*26:90g/A*26:91g/A*26:92g/A*26:93g/A*26:94g/A*26:95g/A*26:96g/A*26:97g/A*26:100g/A*26:101g/A*26:102g/A*26:103g/A*26:104g/A*26:105g/A*26:106g/A*26:108g/A*26:109g/A*26:110g/A*26:111g/A*26:112g/A*26:113g/A*26:114g/A*26:115g/A*26:116g/A*26:118g/A*26:119g/A*26:120g/A*26:121g/A*26:122g/A*26:123g/A*26:124g/A*26:125g/A*26:126g/A*26:128g/A*26:129g/A*26:130g/A*26:131g/A*26:132g/A*26:133g/A*26:134g/A*26:135g/A*26:136g/A*26:137g/A*26:138g/A*26:139g/A*26:140g/A*26:141g/A*26:142g/A*26:143g/A*26:144g/A*26:146g/A*26:147g/A*26:148g/A*26:149g/A*26:150g/A*26:151g/A*26:152g/A*26:153g/A*26:154g/A*26:155g/A*26:156g/A*26:158g/A*26:159g/A*26:165g/A*26:169g/A*26:170g/A*26:171g/A*26:172g/A*26:173g/A*26:174g/A*26:175g/A*26:176g/A*26:177g/A*26:178g/A*26:181g/A*26:182g/A*26:184g/A*26:188g/A*26:189g/A*26:190g/A*26:192g/A*26:193g/A*26:194g/A*26:195g/A*26:196g/A*26:197g/A*26:198g/A*26:200g/A*26:204g/A*26:205g/A*26:207g/A*26:211g/A*26:212g/A*26:213g/A*26:214g/A*34:01g/A*34:02g/A*34:03g/A*34:04g/A*34:05g/A*34:06g/A*34:07g/A*34:08g/A*34:09g/A*34:11g/A*34:12g/A*34:13g/A*34:14g/A*34:15g/A*34:16g/A*34:17g/A*34:19g/A*34:20g/A*34:21g/A*34:22g/A*34:23g/A*34:24g/A*34:25g/A*66:01g/A*66:02g/A*66:03g/A*66:04g/A*66:05g/A*66:06g/A*66:07g/A*66:09g/A*66:10g/A*66:11g/A*66:12g/A*66:13g/A*66:14g/A*66:15g/A*66:16g/A*66:18g/A*66:19g/A*66:20g/A*66:21g/A*66:22g/A*66:23g/A*66:24g/A*66:25g/A*66:26Qg/A*66:30g/A*66:32g/A*66:33g/A*66:35g/A*66:37g/A*66:40g/A*66:41g/A*66:42g/A*66:43g"
12-
},
13-
{
14-
"glstring": "A10",
15-
"ard_type": "lgx",
16-
"expected_gl": "A*25:01/A*25:02/A*25:03/A*25:04/A*25:05/A*25:06/A*25:08/A*25:09/A*25:10/A*25:11/A*25:13/A*25:14/A*25:15/A*25:16/A*25:17/A*25:18/A*25:19/A*25:20/A*25:21/A*25:22/A*25:23/A*25:24/A*25:25/A*25:26/A*25:27/A*25:28/A*25:29/A*25:30/A*25:31/A*25:32/A*25:33/A*25:34/A*25:35/A*25:36/A*25:37/A*25:38/A*25:39/A*25:40/A*25:41/A*25:43/A*25:44/A*25:45/A*25:46/A*25:47/A*25:48/A*25:50/A*25:51/A*25:52/A*25:53/A*25:54/A*25:55/A*25:56/A*25:57/A*25:58/A*25:59/A*25:61/A*25:64/A*25:65/A*25:66/A*25:67/A*25:70/A*25:71/A*25:72/A*25:73/A*26:01/A*26:02/A*26:03/A*26:04/A*26:05/A*26:06/A*26:07/A*26:08/A*26:09/A*26:10/A*26:12/A*26:13/A*26:14/A*26:15/A*26:16/A*26:17/A*26:18/A*26:19/A*26:20/A*26:21/A*26:22/A*26:23/A*26:27/A*26:28/A*26:29/A*26:30/A*26:31/A*26:32/A*26:33/A*26:34/A*26:35/A*26:36/A*26:37/A*26:38/A*26:39/A*26:40/A*26:41/A*26:42/A*26:43/A*26:45/A*26:46/A*26:47/A*26:48/A*26:49/A*26:50/A*26:51/A*26:52/A*26:53/A*26:54/A*26:55/A*26:57/A*26:58/A*26:59/A*26:61/A*26:62/A*26:63/A*26:64/A*26:65/A*26:66/A*26:67/A*26:68/A*26:69/A*26:70/A*26:72/A*26:73/A*26:74/A*26:75/A*26:76/A*26:77/A*26:78/A*26:79/A*26:80/A*26:81/A*26:83/A*26:84/A*26:85/A*26:86/A*26:87/A*26:88/A*26:89/A*26:90/A*26:91/A*26:92/A*26:93/A*26:94/A*26:95/A*26:96/A*26:97/A*26:100/A*26:101/A*26:102/A*26:103/A*26:104/A*26:105/A*26:106/A*26:108/A*26:109/A*26:110/A*26:111/A*26:112/A*26:113/A*26:114/A*26:115/A*26:116/A*26:118/A*26:119/A*26:120/A*26:121/A*26:122/A*26:123/A*26:124/A*26:125/A*26:126/A*26:128/A*26:129/A*26:130/A*26:131/A*26:132/A*26:133/A*26:134/A*26:135/A*26:136/A*26:137/A*26:138/A*26:139/A*26:140/A*26:141/A*26:142/A*26:143/A*26:144/A*26:146/A*26:147/A*26:148/A*26:149/A*26:150/A*26:151/A*26:152/A*26:153/A*26:154/A*26:155/A*26:156/A*26:158/A*26:159/A*26:165/A*26:169/A*26:170/A*26:171/A*26:172/A*26:173/A*26:174/A*26:175/A*26:176/A*26:177/A*26:178/A*26:181/A*26:182/A*26:184/A*26:188/A*26:189/A*26:190/A*26:192/A*26:193/A*26:194/A*26:195/A*26:196/A*26:197/A*26:198/A*26:200/A*26:204/A*26:205/A*26:207/A*26:211/A*26:212/A*26:213/A*26:214/A*34:01/A*34:02/A*34:03/A*34:04/A*34:05/A*34:06/A*34:07/A*34:08/A*34:09/A*34:11/A*34:12/A*34:13/A*34:14/A*34:15/A*34:16/A*34:17/A*34:19/A*34:20/A*34:21/A*34:22/A*34:23/A*34:24/A*34:25/A*66:01/A*66:02/A*66:03/A*66:04/A*66:05/A*66:06/A*66:07/A*66:09/A*66:10/A*66:11/A*66:12/A*66:13/A*66:14/A*66:15/A*66:16/A*66:18/A*66:19/A*66:20/A*66:21/A*66:22/A*66:23/A*66:24/A*66:25/A*66:26Q/A*66:30/A*66:32/A*66:33/A*66:35/A*66:37/A*66:40/A*66:41/A*66:42/A*66:43"
17-
},
183
{
194
"glstring": "A19",
205
"ard_type": "G",

tests/features/allele.feature

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,5 @@
11
Feature: Alleles
22

3-
Scenario Outline: allele reduction with ping
4-
5-
Given the allele as <Allele>
6-
When reducing on the <Level> level with ping
7-
Then the reduced allele is found to be <Redux Allele>
8-
9-
Examples:
10-
| Allele | Level | Redux Allele |
11-
| C*02:02 | lg | C*02:02g |
12-
| C*02:02 | lgx | C*02:02 |
13-
| C*02:10 | lg | C*02:02g |
14-
| C*02:10 | lgx | C*02:02 |
15-
| C*06:17 | lgx | C*06:02 |
16-
173
Scenario Outline: allele reduction
184

195
Given the allele as <Allele>
@@ -39,7 +25,7 @@ Feature: Alleles
3925
| C*02:02 | lgx | C*02:02 |
4026
| C*02:10 | lg | C*02:02g |
4127
| C*02:10 | lgx | C*02:02 |
42-
| C*06:17 | lgx | C*06:17 |
28+
| C*06:17 | lgx | C*06:02 |
4329

4430

4531
Scenario Outline: allele reduction with ARS suffix

tests/features/p_g_group.feature

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,82 @@ Feature: P and G Groups
1010
| Allele | Level | Redux Allele |
1111
| A*02:01P | lgx | A*02:01 |
1212
| A*02:01:01G | lgx | A*02:01 |
13+
14+
15+
Scenario Outline: allele reduction with ping
16+
`ping` is the default.
17+
18+
If there is no G group for the allele, it should use the P group allele.
19+
20+
Given the allele as <Allele>
21+
When reducing on the <Level> level with ping
22+
Then the reduced allele is found to be <Redux Allele>
23+
24+
Examples:
25+
| Allele | Level | Redux Allele |
26+
| C*06:17 | lgx | C*06:02 |
27+
28+
Examples: DRB4*01s
29+
| Allele | Level | Redux Allele |
30+
| DRB4*01:03 | lgx | DRB4*01:01 |
31+
| DRB4*01:03:01 | lgx | DRB4*01:01 |
32+
| DRB4*01:03:02 | lgx | DRB4*01:01 |
33+
| DRB4*01:03:03 | lgx | DRB4*01:01 |
34+
| DRB4*01:03:04 | lgx | DRB4*01:01 |
35+
| DRB4*01:03:05 | lgx | DRB4*01:01 |
36+
| DRB4*01:03:06 | lgx | DRB4*01:01 |
37+
| DRB4*01:03:07 | lgx | DRB4*01:01 |
38+
| DRB4*01:03:08 | lgx | DRB4*01:01 |
39+
| DRB4*01:03:09 | lgx | DRB4*01:01 |
40+
| DRB4*01:03:10 | lgx | DRB4*01:01 |
41+
| DRB4*01:03:11 | lgx | DRB4*01:01 |
42+
| DRB4*01:03:12 | lgx | DRB4*01:01 |
43+
| DRB4*01:03:13 | lgx | DRB4*01:01 |
44+
| DRB4*01:03:14 | lgx | DRB4*01:01 |
45+
| DRB4*01:03:15 | lgx | DRB4*01:01 |
46+
| DRB4*01:03:16 | lgx | DRB4*01:01 |
47+
| DRB4*01:03:17 | lgx | DRB4*01:01 |
48+
| DRB4*01:03:18 | lgx | DRB4*01:01 |
49+
| DRB4*01:03:19 | lgx | DRB4*01:01 |
50+
| DRB4*01:03:20 | lgx | DRB4*01:01 |
51+
| DRB4*01:03:21 | lgx | DRB4*01:01 |
52+
| DRB4*01:03:22 | lgx | DRB4*01:01 |
53+
| DRB4*01:03:23 | lgx | DRB4*01:01 |
54+
| DRB4*01:03:24 | lgx | DRB4*01:01 |
55+
| DRB4*01:03:25 | lgx | DRB4*01:01 |
56+
| DRB4*01:03:26 | lgx | DRB4*01:01 |
57+
| DRB4*01:03:27 | lgx | DRB4*01:01 |
58+
| DRB4*01:03:28 | lgx | DRB4*01:01 |
59+
| DRB4*01:03:29 | lgx | DRB4*01:01 |
60+
| DRB4*01:03:30 | lgx | DRB4*01:01 |
61+
| DRB4*01:03:31 | lgx | DRB4*01:01 |
62+
| DRB4*01:03:32 | lgx | DRB4*01:01 |
63+
| DRB4*01:03:33 | lgx | DRB4*01:01 |
64+
| DRB4*01:03:34 | lgx | DRB4*01:01 |
65+
| DRB4*01:03:35 | lgx | DRB4*01:01 |
66+
| DRB4*01:03:01:01 | lgx | DRB4*01:01 |
67+
| DRB4*01:03:01:03 | lgx | DRB4*01:01 |
68+
| DRB4*01:03:01:04 | lgx | DRB4*01:01 |
69+
| DRB4*01:03:01:05 | lgx | DRB4*01:01 |
70+
| DRB4*01:03:01:06 | lgx | DRB4*01:01 |
71+
| DRB4*01:03:01:07 | lgx | DRB4*01:01 |
72+
| DRB4*01:03:01:08 | lgx | DRB4*01:01 |
73+
| DRB4*01:03:01:09 | lgx | DRB4*01:01 |
74+
| DRB4*01:03:01:10 | lgx | DRB4*01:01 |
75+
| DRB4*01:03:01:11 | lgx | DRB4*01:01 |
76+
| DRB4*01:03:01:12 | lgx | DRB4*01:01 |
77+
| DRB4*01:03:01:14 | lgx | DRB4*01:01 |
78+
| DRB4*01:03:01:15 | lgx | DRB4*01:01 |
79+
| DRB4*01:03:01:16 | lgx | DRB4*01:01 |
80+
| DRB4*01:03:01:17 | lgx | DRB4*01:01 |
81+
| DRB4*01:03:01:18 | lgx | DRB4*01:01 |
82+
| DRB4*01:03:02:01 | lgx | DRB4*01:01 |
83+
| DRB4*01:03:02:02 | lgx | DRB4*01:01 |
84+
85+
Examples: C*02:10s
86+
| Allele | Level | Redux Allele |
87+
| C*02:10:02 | lgx | C*02:02 |
88+
| C*02:02 | lg | C*02:02g |
89+
| C*02:02 | lgx | C*02:02 |
90+
| C*02:10 | lg | C*02:02g |
91+
| C*02:10 | lgx | C*02:02 |

0 commit comments

Comments
 (0)