From 2db41b94fe77b8ea9b13832655e7b2966655b0f7 Mon Sep 17 00:00:00 2001 From: pbashyal-nmdp Date: Thu, 17 Jun 2021 11:26:14 -0500 Subject: [PATCH 1/4] Use db_version '3440' in unit test as well as behave tests Moved larger serology reduction to unit tests file from feature file --- tests/expected-serology.json | 29 +++++++++++++++++++ tests/features/serology.feature | 9 ++---- tests/test_pyard.py | 50 ++++++++++----------------------- 3 files changed, 46 insertions(+), 42 deletions(-) create mode 100644 tests/expected-serology.json diff --git a/tests/expected-serology.json b/tests/expected-serology.json new file mode 100644 index 0000000..bf9e26a --- /dev/null +++ b/tests/expected-serology.json @@ -0,0 +1,29 @@ +{ + "redux_gl": [ + { + "glstring": "A10", + "ard_type": "G", + "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" + }, + { + "glstring": "A10", + "ard_type": "lg", + "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" + }, + { + "glstring": "A10", + "ard_type": "lgx", + "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" + }, + { + "glstring": "A19", + "ard_type": "G", + "expected_gl": "A*02:65/A*29:01:01G/A*29:01:02/A*29:01:03/A*29:01:04/A*29:01:06/A*29:01:07/A*29:01:08/A*29:01:09/A*29:01:10/A*29:01:11/A*29:01:12/A*29:01:13/A*29:02:01G/A*29:02:02/A*29:02:03/A*29:02:04/A*29:02:05/A*29:02:06/A*29:02:08/A*29:02:09/A*29:02:10/A*29:02:11/A*29:02:12/A*29:02:13/A*29:02:14/A*29:02:15/A*29:02:16/A*29:02:17G/A*29:02:18/A*29:02:19/A*29:02:21/A*29:02:22/A*29:02:23/A*29:02:25/A*29:02:29/A*29:02:31/A*29:02:32/A*29:02:33/A*29:03/A*29:04/A*29:05/A*29:06/A*29:07/A*29:09/A*29:10:01/A*29:10:02/A*29:11/A*29:12/A*29:13/A*29:14/A*29:15/A*29:16/A*29:17/A*29:18/A*29:19/A*29:20/A*29:21/A*29:22/A*29:23/A*29:24/A*29:25/A*29:27/A*29:28/A*29:29/A*29:30/A*29:31/A*29:32/A*29:33/A*29:34/A*29:35/A*29:36/A*29:37/A*29:38/A*29:39/A*29:40/A*29:41/A*29:42/A*29:43/A*29:44/A*29:45/A*29:47/A*29:48/A*29:49/A*29:50/A*29:51/A*29:52/A*29:53/A*29:54/A*29:55/A*29:56/A*29:57/A*29:58/A*29:59/A*29:60/A*29:61/A*29:62/A*29:63/A*29:64/A*29:65/A*29:66/A*29:67/A*29:68/A*29:69/A*29:70/A*29:71/A*29:72/A*29:73/A*29:74/A*29:76/A*29:77/A*29:79/A*29:80/A*29:81/A*29:82/A*29:83/A*29:84/A*29:85/A*29:86/A*29:87/A*29:88/A*29:89/A*29:90/A*29:91/A*29:92/A*29:93/A*29:94/A*29:96/A*29:97/A*29:98/A*29:99/A*29:101:01/A*29:101:02/A*29:102/A*29:103/A*29:104/A*29:105/A*29:106/A*29:107/A*29:108/A*29:109/A*29:110/A*29:111/A*29:113/A*29:114/A*29:115/A*29:117/A*29:118/A*29:122/A*29:123/A*29:124/A*29:125/A*29:126Q/A*29:127/A*29:128/A*29:129/A*29:132/A*29:133:01G/A*29:136/A*29:137/A*29:138/A*29:139/A*29:140/A*29:141/A*29:142/A*29:143/A*29:144/A*29:150/A*29:151/A*29:152/A*29:153/A*29:154/A*30:01:01G/A*30:01:03/A*30:01:04/A*30:01:05/A*30:01:06/A*30:01:07/A*30:01:08/A*30:01:09/A*30:01:10/A*30:01:11/A*30:01:12/A*30:01:14/A*30:01:15/A*30:01:16/A*30:01:17/A*30:01:18/A*30:02:01G/A*30:02:03/A*30:02:04/A*30:02:05/A*30:02:06/A*30:02:07/A*30:02:08/A*30:02:09/A*30:02:10/A*30:02:11/A*30:02:12/A*30:02:13/A*30:02:14/A*30:02:15/A*30:02:16/A*30:02:17/A*30:02:18/A*30:02:19/A*30:02:22/A*30:02:24/A*30:02:26/A*30:03/A*30:04:01G/A*30:04:02/A*30:04:03/A*30:06/A*30:07/A*30:08:01/A*30:08:02/A*30:09:01G/A*30:10/A*30:11:01/A*30:11:02/A*30:12:01/A*30:12:02/A*30:13/A*30:14L/A*30:15/A*30:16/A*30:17/A*30:18/A*30:19/A*30:20/A*30:22/A*30:23/A*30:25/A*30:26/A*30:28/A*30:29/A*30:30/A*30:31/A*30:32/A*30:34/A*30:35/A*30:36/A*30:37/A*30:38/A*30:39:01/A*30:39:02/A*30:40/A*30:41/A*30:42/A*30:43/A*30:44/A*30:45/A*30:46/A*30:47/A*30:48/A*30:49/A*30:50/A*30:51/A*30:52/A*30:53/A*30:54/A*30:55/A*30:56/A*30:57/A*30:58/A*30:60/A*30:61/A*30:62/A*30:63/A*30:64/A*30:65/A*30:66/A*30:67/A*30:68/A*30:69/A*30:71/A*30:72/A*30:74/A*30:75/A*30:79/A*30:80/A*30:82/A*30:83/A*30:84/A*30:85/A*30:86/A*30:87/A*30:88/A*30:89/A*30:90/A*30:91/A*30:92/A*30:93/A*30:94/A*30:96/A*30:97/A*30:98/A*30:99/A*30:101Q/A*30:102/A*30:103/A*30:104/A*30:106/A*30:107/A*30:108/A*30:109/A*30:110/A*30:111/A*30:113/A*30:116/A*30:117/A*30:118/A*30:119/A*30:120/A*30:122/A*30:124/A*30:125/A*30:126/A*30:127/A*30:128/A*30:129/A*30:131/A*30:133/A*30:134/A*30:139/A*30:140/A*30:143/A*30:150/A*30:152/A*30:153/A*30:154/A*30:155/A*30:157/A*30:159/A*30:160/A*30:161/A*30:162/A*30:163/A*30:164/A*30:165/A*30:166/A*30:168/A*30:172/A*30:174/A*30:176/A*30:177/A*30:179/A*30:180/A*30:182/A*30:183/A*30:184Q/A*30:185/A*30:186/A*30:188/A*31:01:02G/A*31:01:03/A*31:01:04/A*31:01:05/A*31:01:06/A*31:01:07/A*31:01:08/A*31:01:09/A*31:01:10/A*31:01:11/A*31:01:12/A*31:01:14/A*31:01:15/A*31:01:16/A*31:01:17/A*31:01:18/A*31:01:19/A*31:01:20/A*31:01:21/A*31:01:22/A*31:01:23/A*31:01:24/A*31:01:25/A*31:01:26/A*31:01:27/A*31:01:29/A*31:01:30/A*31:01:31/A*31:01:32/A*31:01:34/A*31:01:36/A*31:01:37/A*31:01:38/A*31:01:39/A*31:01:40/A*31:01:41/A*31:01:44/A*31:02:01G/A*31:03/A*31:04:01G/A*31:04:02/A*31:05/A*31:06/A*31:07/A*31:08/A*31:09/A*31:10/A*31:11/A*31:12/A*31:13/A*31:15/A*31:16/A*31:17/A*31:18/A*31:19/A*31:20/A*31:21/A*31:22/A*31:24/A*31:25/A*31:26/A*31:27/A*31:28/A*31:29/A*31:30/A*31:31/A*31:32/A*31:33/A*31:34/A*31:35/A*31:36/A*31:37/A*31:38/A*31:39/A*31:40/A*31:41/A*31:42/A*31:43/A*31:44/A*31:45/A*31:47/A*31:49/A*31:50/A*31:51/A*31:52/A*31:53/A*31:54/A*31:57/A*31:58/A*31:61/A*31:62/A*31:63/A*31:64/A*31:65/A*31:66/A*31:67/A*31:68/A*31:69/A*31:70/A*31:73/A*31:74/A*31:75/A*31:76/A*31:77/A*31:78/A*31:79/A*31:80/A*31:82/A*31:83/A*31:84/A*31:85/A*31:86/A*31:87/A*31:88/A*31:89/A*31:90/A*31:91/A*31:92/A*31:93/A*31:94/A*31:96/A*31:97/A*31:98/A*31:99/A*31:100/A*31:101/A*31:102/A*31:103/A*31:104/A*31:105/A*31:106/A*31:107/A*31:108/A*31:109/A*31:110/A*31:112/A*31:113/A*31:114/A*31:115/A*31:116/A*31:117/A*31:118/A*31:120/A*31:121/A*31:122/A*31:123/A*31:124/A*31:127/A*31:129/A*31:130/A*31:133/A*31:134/A*31:136/A*31:137/A*31:138/A*31:139/A*31:140/A*31:142/A*31:144/A*31:145/A*31:146/A*31:147/A*31:148/A*31:150/A*31:154/A*31:161/A*31:162/A*31:163/A*31:164/A*31:165/A*31:168/A*31:169/A*31:170/A*31:171/A*31:172/A*31:173/A*31:174/A*31:175/A*31:176/A*31:179/A*31:180/A*31:183/A*31:185/A*31:187/A*31:189/A*31:190/A*31:191/A*31:192/A*31:193/A*31:195/A*32:01:01G/A*32:01:03/A*32:01:04/A*32:01:05/A*32:01:06/A*32:01:07/A*32:01:08/A*32:01:09/A*32:01:10/A*32:01:11/A*32:01:12/A*32:01:13/A*32:01:14/A*32:01:15/A*32:01:16/A*32:01:17/A*32:01:18/A*32:01:19/A*32:01:20/A*32:01:21/A*32:01:22/A*32:01:24/A*32:01:25/A*32:01:26/A*32:01:28/A*32:01:30/A*32:01:31/A*32:01:32/A*32:01:33/A*32:01:37/A*32:01:38/A*32:01:39/A*32:01:40/A*32:01:41/A*32:01:43/A*32:01:45/A*32:02/A*32:03:01G/A*32:04/A*32:05/A*32:06/A*32:07/A*32:08/A*32:09/A*32:10/A*32:11Q/A*32:12/A*32:13/A*32:14/A*32:15/A*32:16/A*32:17/A*32:18/A*32:20/A*32:21/A*32:22/A*32:23/A*32:24/A*32:25/A*32:26:01/A*32:26:02/A*32:28/A*32:29/A*32:30:01/A*32:30:02/A*32:31/A*32:32/A*32:33:01/A*32:33:02/A*32:33:03/A*32:34/A*32:35/A*32:36/A*32:37/A*32:38/A*32:39/A*32:40/A*32:41/A*32:42/A*32:43:01/A*32:43:02/A*32:44/A*32:46:01/A*32:46:02/A*32:47/A*32:49/A*32:50/A*32:51/A*32:52/A*32:55:01/A*32:55:02/A*32:55:03/A*32:57/A*32:58/A*32:59/A*32:60/A*32:62/A*32:63/A*32:64/A*32:65/A*32:66/A*32:67/A*32:69/A*32:70/A*32:71/A*32:72/A*32:73/A*32:75/A*32:76/A*32:77/A*32:78/A*32:79/A*32:80/A*32:81/A*32:82/A*32:83/A*32:84/A*32:85/A*32:86/A*32:87/A*32:88/A*32:89/A*32:90/A*32:91/A*32:93/A*32:94/A*32:95/A*32:96/A*32:97/A*32:98/A*32:99/A*32:100/A*32:101Q/A*32:102/A*32:104/A*32:105/A*32:107/A*32:108/A*32:109/A*32:113/A*32:115/A*32:118/A*32:119/A*32:120/A*32:123/A*32:125/A*32:127/A*32:128/A*32:129/A*32:131/A*32:136/A*32:137/A*32:138/A*32:140/A*32:141/A*32:142/A*32:143/A*32:144/A*32:145/A*32:146/A*32:150/A*32:151/A*33:01:01G/A*33:01:02/A*33:01:03/A*33:01:04/A*33:01:05/A*33:01:06/A*33:01:07/A*33:01:08/A*33:01:10/A*33:01:11/A*33:01:12/A*33:03:01G/A*33:03:02/A*33:03:04/A*33:03:05/A*33:03:06/A*33:03:07/A*33:03:08/A*33:03:09/A*33:03:10/A*33:03:11/A*33:03:12/A*33:03:14/A*33:03:15/A*33:03:16/A*33:03:19/A*33:03:20/A*33:03:21/A*33:03:24/A*33:03:25/A*33:03:26/A*33:03:27/A*33:03:28/A*33:03:29/A*33:03:30/A*33:03:31/A*33:03:32/A*33:03:33/A*33:03:34/A*33:03:35/A*33:03:36/A*33:03:38/A*33:03:39/A*33:03:40/A*33:03:41/A*33:03:42/A*33:03:45/A*33:03:46/A*33:03:47/A*33:04/A*33:05/A*33:06/A*33:07/A*33:08/A*33:09/A*33:10/A*33:11/A*33:12/A*33:13/A*33:14/A*33:16/A*33:17/A*33:18:01/A*33:18:02/A*33:19/A*33:20/A*33:21/A*33:22/A*33:23/A*33:24/A*33:26/A*33:27/A*33:28/A*33:29/A*33:30/A*33:32:01/A*33:32:02/A*33:33/A*33:34/A*33:35/A*33:36/A*33:37/A*33:40:01/A*33:40:02/A*33:41/A*33:42/A*33:43/A*33:45/A*33:46/A*33:47/A*33:48/A*33:49/A*33:50/A*33:51/A*33:52/A*33:53/A*33:54/A*33:55/A*33:56/A*33:57/A*33:58/A*33:59/A*33:60/A*33:61/A*33:62/A*33:63/A*33:64/A*33:65/A*33:66/A*33:67/A*33:68/A*33:69/A*33:70/A*33:71/A*33:72/A*33:75/A*33:76/A*33:78/A*33:79/A*33:81/A*33:86/A*33:87/A*33:88/A*33:89/A*33:90/A*33:91/A*33:92/A*33:93/A*33:94/A*33:95/A*33:97/A*33:98/A*33:99/A*33:100/A*33:101/A*33:102/A*33:103/A*33:104/A*33:105/A*33:106/A*33:107/A*33:108/A*33:109/A*33:110/A*33:112/A*33:113/A*33:114/A*33:115/A*33:116/A*33:117/A*33:118/A*33:119/A*33:120/A*33:121/A*33:122/A*33:124/A*33:125/A*33:126/A*33:127/A*33:128/A*33:130/A*33:131/A*33:132/A*33:133/A*33:134/A*33:135/A*33:137/A*33:138/A*33:139/A*33:141/A*33:142/A*33:144/A*33:147/A*33:149/A*33:150/A*33:152/A*33:155/A*33:158/A*33:159/A*33:161/A*33:162/A*33:164/A*33:165/A*33:166/A*33:167/A*33:168/A*33:173/A*33:175Q/A*33:177/A*33:178/A*33:179/A*33:180/A*33:183/A*33:184/A*33:185/A*33:186/A*33:187/A*33:188/A*33:189/A*33:190/A*33:192/A*33:195/A*33:196/A*33:197/A*33:199/A*33:200/A*33:201/A*33:206/A*33:208/A*33:211/A*33:212/A*74:01:01G/A*74:01:02/A*74:01:03/A*74:01:04/A*74:01:05/A*74:01:06/A*74:01:07/A*74:03:01G/A*74:03:02/A*74:04/A*74:05/A*74:06:01G/A*74:07/A*74:08/A*74:09/A*74:10/A*74:11/A*74:13/A*74:15/A*74:16:01/A*74:16:02/A*74:17/A*74:18/A*74:19/A*74:20/A*74:21/A*74:22/A*74:23/A*74:24/A*74:25/A*74:26/A*74:27/A*74:28/A*74:29/A*74:30/A*74:33/A*74:35/A*74:37/A*74:38/A*74:40/A*74:41" + }, + { + "glstring": "DR2", + "ard_type": "G", + "expected_gl": "DRB1*15:01:01G/DRB1*15:01:02/DRB1*15:01:03/DRB1*15:01:04/DRB1*15:01:05/DRB1*15:01:06/DRB1*15:01:07/DRB1*15:01:08G/DRB1*15:01:09/DRB1*15:01:10/DRB1*15:01:11/DRB1*15:01:12/DRB1*15:01:13/DRB1*15:01:14/DRB1*15:01:15/DRB1*15:01:16/DRB1*15:01:18/DRB1*15:01:19/DRB1*15:01:20/DRB1*15:01:21/DRB1*15:01:22/DRB1*15:01:23/DRB1*15:01:24/DRB1*15:01:25/DRB1*15:01:26/DRB1*15:01:27/DRB1*15:01:28/DRB1*15:01:29/DRB1*15:01:30/DRB1*15:01:31/DRB1*15:01:33/DRB1*15:01:34/DRB1*15:02:01G/DRB1*15:02:02G/DRB1*15:02:03/DRB1*15:02:04/DRB1*15:02:05/DRB1*15:02:06/DRB1*15:02:07/DRB1*15:02:08/DRB1*15:02:09/DRB1*15:02:10/DRB1*15:02:11/DRB1*15:02:12/DRB1*15:02:13/DRB1*15:02:14/DRB1*15:02:15/DRB1*15:02:16/DRB1*15:02:17/DRB1*15:02:18/DRB1*15:02:19/DRB1*15:03:01G/DRB1*15:03:02/DRB1*15:03:05/DRB1*15:04/DRB1*15:05/DRB1*15:06:01/DRB1*15:06:02/DRB1*15:06:03/DRB1*15:06:04/DRB1*15:07:01/DRB1*15:07:02/DRB1*15:07:03/DRB1*15:08/DRB1*15:09/DRB1*15:10/DRB1*15:11:01/DRB1*15:11:02/DRB1*15:12/DRB1*15:13/DRB1*15:14/DRB1*15:15:01/DRB1*15:15:02/DRB1*15:15:03/DRB1*15:16/DRB1*15:18/DRB1*15:19/DRB1*15:20/DRB1*15:21/DRB1*15:22/DRB1*15:23/DRB1*15:24/DRB1*15:25/DRB1*15:26/DRB1*15:27/DRB1*15:28/DRB1*15:29/DRB1*15:30/DRB1*15:31:01/DRB1*15:31:02/DRB1*15:32/DRB1*15:33/DRB1*15:34/DRB1*15:35/DRB1*15:36/DRB1*15:37:01/DRB1*15:37:02/DRB1*15:38/DRB1*15:39/DRB1*15:40/DRB1*15:41/DRB1*15:42/DRB1*15:43/DRB1*15:44/DRB1*15:45/DRB1*15:46/DRB1*15:47/DRB1*15:48/DRB1*15:49/DRB1*15:51/DRB1*15:52/DRB1*15:53/DRB1*15:54/DRB1*15:55/DRB1*15:56/DRB1*15:57/DRB1*15:58/DRB1*15:59/DRB1*15:60/DRB1*15:61/DRB1*15:62/DRB1*15:63/DRB1*15:64/DRB1*15:65/DRB1*15:66:01/DRB1*15:66:02/DRB1*15:67/DRB1*15:68/DRB1*15:69/DRB1*15:70/DRB1*15:71/DRB1*15:72/DRB1*15:73/DRB1*15:74/DRB1*15:75/DRB1*15:76/DRB1*15:77/DRB1*15:78/DRB1*15:79/DRB1*15:81/DRB1*15:82/DRB1*15:83/DRB1*15:84/DRB1*15:85/DRB1*15:86/DRB1*15:87/DRB1*15:88/DRB1*15:89/DRB1*15:90/DRB1*15:91/DRB1*15:92/DRB1*15:93/DRB1*15:94/DRB1*15:95/DRB1*15:96/DRB1*15:97/DRB1*15:98/DRB1*15:99/DRB1*15:100/DRB1*15:101/DRB1*15:102/DRB1*15:103/DRB1*15:104:01/DRB1*15:104:02/DRB1*15:104:03/DRB1*15:105:01/DRB1*15:105:02/DRB1*15:106/DRB1*15:107/DRB1*15:108/DRB1*15:109/DRB1*15:110/DRB1*15:111/DRB1*15:112/DRB1*15:114/DRB1*15:116/DRB1*15:117/DRB1*15:118/DRB1*15:119/DRB1*15:120/DRB1*15:121/DRB1*15:122/DRB1*15:123/DRB1*15:124/DRB1*15:125/DRB1*15:126/DRB1*15:127/DRB1*15:128/DRB1*15:130/DRB1*15:131/DRB1*15:132/DRB1*15:133/DRB1*15:135/DRB1*15:136/DRB1*15:139/DRB1*15:142/DRB1*15:143/DRB1*15:144/DRB1*15:147/DRB1*15:150/DRB1*15:152/DRB1*15:153/DRB1*15:155/DRB1*15:156/DRB1*15:157/DRB1*15:158/DRB1*15:161/DRB1*15:162/DRB1*15:164Q/DRB1*15:165/DRB1*15:167/DRB1*15:168/DRB1*15:169/DRB1*15:170/DRB1*15:172/DRB1*15:175/DRB1*15:181/DRB1*15:187/DRB1*15:189/DRB1*15:190/DRB1*15:192/DRB1*16:01:01G/DRB1*16:01:02/DRB1*16:01:03/DRB1*16:01:04/DRB1*16:01:05/DRB1*16:01:06/DRB1*16:01:07/DRB1*16:01:08/DRB1*16:01:09/DRB1*16:01:10/DRB1*16:01:11/DRB1*16:01:12/DRB1*16:01:13/DRB1*16:01:14/DRB1*16:01:16/DRB1*16:02:01G/DRB1*16:02:02/DRB1*16:02:03/DRB1*16:02:04/DRB1*16:02:05/DRB1*16:02:06/DRB1*16:02:07/DRB1*16:02:08/DRB1*16:02:10/DRB1*16:03/DRB1*16:04:01/DRB1*16:04:02/DRB1*16:05:01/DRB1*16:05:02/DRB1*16:07/DRB1*16:08/DRB1*16:09:01/DRB1*16:09:02/DRB1*16:10:01/DRB1*16:10:02/DRB1*16:11/DRB1*16:12/DRB1*16:14/DRB1*16:15/DRB1*16:16/DRB1*16:17/DRB1*16:18/DRB1*16:19/DRB1*16:20/DRB1*16:22/DRB1*16:23/DRB1*16:24/DRB1*16:25/DRB1*16:26/DRB1*16:27/DRB1*16:28/DRB1*16:29/DRB1*16:30/DRB1*16:31/DRB1*16:32/DRB1*16:33/DRB1*16:34/DRB1*16:35/DRB1*16:36/DRB1*16:37/DRB1*16:38:01/DRB1*16:38:02/DRB1*16:39/DRB1*16:40/DRB1*16:42/DRB1*16:43/DRB1*16:44/DRB1*16:45/DRB1*16:46/DRB1*16:47/DRB1*16:48/DRB1*16:49/DRB1*16:50/DRB1*16:53/DRB1*16:56/DRB1*16:58/DRB1*16:59Q/DRB1*16:60/DRB1*16:61/DRB1*16:65/DRB1*16:66/DRB1*16:67/DRB1*16:68" + } + ] +} \ No newline at end of file diff --git a/tests/features/serology.feature b/tests/features/serology.feature index eb2f150..e37039f 100644 --- a/tests/features/serology.feature +++ b/tests/features/serology.feature @@ -11,11 +11,6 @@ Feature: Serology Examples: Valid A serology typings - | Serology | Level | Redux Allele | - | A10 | G | 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 | - | A10 | lg | 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 | - | A10 | lgx | 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 | - | A19 | G | A*02:65/A*29:01:01G/A*29:01:02/A*29:01:03/A*29:01:04/A*29:01:06/A*29:01:07/A*29:01:08/A*29:01:09/A*29:01:10/A*29:01:11/A*29:01:12/A*29:01:13/A*29:02:01G/A*29:02:02/A*29:02:03/A*29:02:04/A*29:02:05/A*29:02:06/A*29:02:08/A*29:02:09/A*29:02:10/A*29:02:11/A*29:02:12/A*29:02:13/A*29:02:14/A*29:02:15/A*29:02:16/A*29:02:17G/A*29:02:18/A*29:02:19/A*29:02:21/A*29:02:22/A*29:02:23/A*29:02:25/A*29:02:29/A*29:02:31/A*29:02:32/A*29:02:33/A*29:03/A*29:04/A*29:05/A*29:06/A*29:07/A*29:09/A*29:10:01/A*29:10:02/A*29:11/A*29:12/A*29:13/A*29:14/A*29:15/A*29:16/A*29:17/A*29:18/A*29:19/A*29:20/A*29:21/A*29:22/A*29:23/A*29:24/A*29:25/A*29:27/A*29:28/A*29:29/A*29:30/A*29:31/A*29:32/A*29:33/A*29:34/A*29:35/A*29:36/A*29:37/A*29:38/A*29:39/A*29:40/A*29:41/A*29:42/A*29:43/A*29:44/A*29:45/A*29:47/A*29:48/A*29:49/A*29:50/A*29:51/A*29:52/A*29:53/A*29:54/A*29:55/A*29:56/A*29:57/A*29:58/A*29:59/A*29:60/A*29:61/A*29:62/A*29:63/A*29:64/A*29:65/A*29:66/A*29:67/A*29:68/A*29:69/A*29:70/A*29:71/A*29:72/A*29:73/A*29:74/A*29:76/A*29:77/A*29:79/A*29:80/A*29:81/A*29:82/A*29:83/A*29:84/A*29:85/A*29:86/A*29:87/A*29:88/A*29:89/A*29:90/A*29:91/A*29:92/A*29:93/A*29:94/A*29:96/A*29:97/A*29:98/A*29:99/A*29:101:01/A*29:101:02/A*29:102/A*29:103/A*29:104/A*29:105/A*29:106/A*29:107/A*29:108/A*29:109/A*29:110/A*29:111/A*29:113/A*29:114/A*29:115/A*29:117/A*29:118/A*29:122/A*29:123/A*29:124/A*29:125/A*29:126Q/A*29:127/A*29:128/A*29:129/A*29:132/A*29:133:01G/A*29:136/A*29:137/A*29:138/A*29:139/A*29:140/A*29:141/A*29:142/A*29:143/A*29:144/A*29:150/A*29:151/A*29:152/A*29:153/A*29:154/A*30:01:01G/A*30:01:03/A*30:01:04/A*30:01:05/A*30:01:06/A*30:01:07/A*30:01:08/A*30:01:09/A*30:01:10/A*30:01:11/A*30:01:12/A*30:01:14/A*30:01:15/A*30:01:16/A*30:01:17/A*30:01:18/A*30:02:01G/A*30:02:03/A*30:02:04/A*30:02:05/A*30:02:06/A*30:02:07/A*30:02:08/A*30:02:09/A*30:02:10/A*30:02:11/A*30:02:12/A*30:02:13/A*30:02:14/A*30:02:15/A*30:02:16/A*30:02:17/A*30:02:18/A*30:02:19/A*30:02:22/A*30:02:24/A*30:02:26/A*30:03/A*30:04:01G/A*30:04:02/A*30:04:03/A*30:06/A*30:07/A*30:08:01/A*30:08:02/A*30:09:01G/A*30:10/A*30:11:01/A*30:11:02/A*30:12:01/A*30:12:02/A*30:13/A*30:14L/A*30:15/A*30:16/A*30:17/A*30:18/A*30:19/A*30:20/A*30:22/A*30:23/A*30:25/A*30:26/A*30:28/A*30:29/A*30:30/A*30:31/A*30:32/A*30:34/A*30:35/A*30:36/A*30:37/A*30:38/A*30:39:01/A*30:39:02/A*30:40/A*30:41/A*30:42/A*30:43/A*30:44/A*30:45/A*30:46/A*30:47/A*30:48/A*30:49/A*30:50/A*30:51/A*30:52/A*30:53/A*30:54/A*30:55/A*30:56/A*30:57/A*30:58/A*30:60/A*30:61/A*30:62/A*30:63/A*30:64/A*30:65/A*30:66/A*30:67/A*30:68/A*30:69/A*30:71/A*30:72/A*30:74/A*30:75/A*30:79/A*30:80/A*30:82/A*30:83/A*30:84/A*30:85/A*30:86/A*30:87/A*30:88/A*30:89/A*30:90/A*30:91/A*30:92/A*30:93/A*30:94/A*30:96/A*30:97/A*30:98/A*30:99/A*30:101Q/A*30:102/A*30:103/A*30:104/A*30:106/A*30:107/A*30:108/A*30:109/A*30:110/A*30:111/A*30:113/A*30:116/A*30:117/A*30:118/A*30:119/A*30:120/A*30:122/A*30:124/A*30:125/A*30:126/A*30:127/A*30:128/A*30:129/A*30:131/A*30:133/A*30:134/A*30:139/A*30:140/A*30:143/A*30:150/A*30:152/A*30:153/A*30:154/A*30:155/A*30:157/A*30:159/A*30:160/A*30:161/A*30:162/A*30:163/A*30:164/A*30:165/A*30:166/A*30:168/A*30:172/A*30:174/A*30:176/A*30:177/A*30:179/A*30:180/A*30:182/A*30:183/A*30:184Q/A*30:185/A*30:186/A*30:188/A*31:01:02G/A*31:01:03/A*31:01:04/A*31:01:05/A*31:01:06/A*31:01:07/A*31:01:08/A*31:01:09/A*31:01:10/A*31:01:11/A*31:01:12/A*31:01:14/A*31:01:15/A*31:01:16/A*31:01:17/A*31:01:18/A*31:01:19/A*31:01:20/A*31:01:21/A*31:01:22/A*31:01:23/A*31:01:24/A*31:01:25/A*31:01:26/A*31:01:27/A*31:01:29/A*31:01:30/A*31:01:31/A*31:01:32/A*31:01:34/A*31:01:36/A*31:01:37/A*31:01:38/A*31:01:39/A*31:01:40/A*31:01:41/A*31:01:44/A*31:02:01G/A*31:03/A*31:04:01G/A*31:04:02/A*31:05/A*31:06/A*31:07/A*31:08/A*31:09/A*31:10/A*31:11/A*31:12/A*31:13/A*31:15/A*31:16/A*31:17/A*31:18/A*31:19/A*31:20/A*31:21/A*31:22/A*31:24/A*31:25/A*31:26/A*31:27/A*31:28/A*31:29/A*31:30/A*31:31/A*31:32/A*31:33/A*31:34/A*31:35/A*31:36/A*31:37/A*31:38/A*31:39/A*31:40/A*31:41/A*31:42/A*31:43/A*31:44/A*31:45/A*31:47/A*31:49/A*31:50/A*31:51/A*31:52/A*31:53/A*31:54/A*31:57/A*31:58/A*31:61/A*31:62/A*31:63/A*31:64/A*31:65/A*31:66/A*31:67/A*31:68/A*31:69/A*31:70/A*31:73/A*31:74/A*31:75/A*31:76/A*31:77/A*31:78/A*31:79/A*31:80/A*31:82/A*31:83/A*31:84/A*31:85/A*31:86/A*31:87/A*31:88/A*31:89/A*31:90/A*31:91/A*31:92/A*31:93/A*31:94/A*31:96/A*31:97/A*31:98/A*31:99/A*31:100/A*31:101/A*31:102/A*31:103/A*31:104/A*31:105/A*31:106/A*31:107/A*31:108/A*31:109/A*31:110/A*31:112/A*31:113/A*31:114/A*31:115/A*31:116/A*31:117/A*31:118/A*31:120/A*31:121/A*31:122/A*31:123/A*31:124/A*31:127/A*31:129/A*31:130/A*31:133/A*31:134/A*31:136/A*31:137/A*31:138/A*31:139/A*31:140/A*31:142/A*31:144/A*31:145/A*31:146/A*31:147/A*31:148/A*31:150/A*31:154/A*31:161/A*31:162/A*31:163/A*31:164/A*31:165/A*31:168/A*31:169/A*31:170/A*31:171/A*31:172/A*31:173/A*31:174/A*31:175/A*31:176/A*31:179/A*31:180/A*31:183/A*31:185/A*31:187/A*31:189/A*31:190/A*31:191/A*31:192/A*31:193/A*31:195/A*32:01:01G/A*32:01:03/A*32:01:04/A*32:01:05/A*32:01:06/A*32:01:07/A*32:01:08/A*32:01:09/A*32:01:10/A*32:01:11/A*32:01:12/A*32:01:13/A*32:01:14/A*32:01:15/A*32:01:16/A*32:01:17/A*32:01:18/A*32:01:19/A*32:01:20/A*32:01:21/A*32:01:22/A*32:01:24/A*32:01:25/A*32:01:26/A*32:01:28/A*32:01:30/A*32:01:31/A*32:01:32/A*32:01:33/A*32:01:37/A*32:01:38/A*32:01:39/A*32:01:40/A*32:01:41/A*32:01:43/A*32:01:45/A*32:02/A*32:03:01G/A*32:04/A*32:05/A*32:06/A*32:07/A*32:08/A*32:09/A*32:10/A*32:11Q/A*32:12/A*32:13/A*32:14/A*32:15/A*32:16/A*32:17/A*32:18/A*32:20/A*32:21/A*32:22/A*32:23/A*32:24/A*32:25/A*32:26:01/A*32:26:02/A*32:28/A*32:29/A*32:30:01/A*32:30:02/A*32:31/A*32:32/A*32:33:01/A*32:33:02/A*32:33:03/A*32:34/A*32:35/A*32:36/A*32:37/A*32:38/A*32:39/A*32:40/A*32:41/A*32:42/A*32:43:01/A*32:43:02/A*32:44/A*32:46:01/A*32:46:02/A*32:47/A*32:49/A*32:50/A*32:51/A*32:52/A*32:55:01/A*32:55:02/A*32:55:03/A*32:57/A*32:58/A*32:59/A*32:60/A*32:62/A*32:63/A*32:64/A*32:65/A*32:66/A*32:67/A*32:69/A*32:70/A*32:71/A*32:72/A*32:73/A*32:75/A*32:76/A*32:77/A*32:78/A*32:79/A*32:80/A*32:81/A*32:82/A*32:83/A*32:84/A*32:85/A*32:86/A*32:87/A*32:88/A*32:89/A*32:90/A*32:91/A*32:93/A*32:94/A*32:95/A*32:96/A*32:97/A*32:98/A*32:99/A*32:100/A*32:101Q/A*32:102/A*32:104/A*32:105/A*32:107/A*32:108/A*32:109/A*32:113/A*32:115/A*32:118/A*32:119/A*32:120/A*32:123/A*32:125/A*32:127/A*32:128/A*32:129/A*32:131/A*32:136/A*32:137/A*32:138/A*32:140/A*32:141/A*32:142/A*32:143/A*32:144/A*32:145/A*32:146/A*32:150/A*32:151/A*33:01:01G/A*33:01:02/A*33:01:03/A*33:01:04/A*33:01:05/A*33:01:06/A*33:01:07/A*33:01:08/A*33:01:10/A*33:01:11/A*33:01:12/A*33:03:01G/A*33:03:02/A*33:03:04/A*33:03:05/A*33:03:06/A*33:03:07/A*33:03:08/A*33:03:09/A*33:03:10/A*33:03:11/A*33:03:12/A*33:03:14/A*33:03:15/A*33:03:16/A*33:03:19/A*33:03:20/A*33:03:21/A*33:03:24/A*33:03:25/A*33:03:26/A*33:03:27/A*33:03:28/A*33:03:29/A*33:03:30/A*33:03:31/A*33:03:32/A*33:03:33/A*33:03:34/A*33:03:35/A*33:03:36/A*33:03:38/A*33:03:39/A*33:03:40/A*33:03:41/A*33:03:42/A*33:03:45/A*33:03:46/A*33:03:47/A*33:04/A*33:05/A*33:06/A*33:07/A*33:08/A*33:09/A*33:10/A*33:11/A*33:12/A*33:13/A*33:14/A*33:16/A*33:17/A*33:18:01/A*33:18:02/A*33:19/A*33:20/A*33:21/A*33:22/A*33:23/A*33:24/A*33:26/A*33:27/A*33:28/A*33:29/A*33:30/A*33:32:01/A*33:32:02/A*33:33/A*33:34/A*33:35/A*33:36/A*33:37/A*33:40:01/A*33:40:02/A*33:41/A*33:42/A*33:43/A*33:45/A*33:46/A*33:47/A*33:48/A*33:49/A*33:50/A*33:51/A*33:52/A*33:53/A*33:54/A*33:55/A*33:56/A*33:57/A*33:58/A*33:59/A*33:60/A*33:61/A*33:62/A*33:63/A*33:64/A*33:65/A*33:66/A*33:67/A*33:68/A*33:69/A*33:70/A*33:71/A*33:72/A*33:75/A*33:76/A*33:78/A*33:79/A*33:81/A*33:86/A*33:87/A*33:88/A*33:89/A*33:90/A*33:91/A*33:92/A*33:93/A*33:94/A*33:95/A*33:97/A*33:98/A*33:99/A*33:100/A*33:101/A*33:102/A*33:103/A*33:104/A*33:105/A*33:106/A*33:107/A*33:108/A*33:109/A*33:110/A*33:112/A*33:113/A*33:114/A*33:115/A*33:116/A*33:117/A*33:118/A*33:119/A*33:120/A*33:121/A*33:122/A*33:124/A*33:125/A*33:126/A*33:127/A*33:128/A*33:130/A*33:131/A*33:132/A*33:133/A*33:134/A*33:135/A*33:137/A*33:138/A*33:139/A*33:141/A*33:142/A*33:144/A*33:147/A*33:149/A*33:150/A*33:152/A*33:155/A*33:158/A*33:159/A*33:161/A*33:162/A*33:164/A*33:165/A*33:166/A*33:167/A*33:168/A*33:173/A*33:175Q/A*33:177/A*33:178/A*33:179/A*33:180/A*33:183/A*33:184/A*33:185/A*33:186/A*33:187/A*33:188/A*33:189/A*33:190/A*33:192/A*33:195/A*33:196/A*33:197/A*33:199/A*33:200/A*33:201/A*33:206/A*33:208/A*33:211/A*33:212/A*74:01:01G/A*74:01:02/A*74:01:03/A*74:01:04/A*74:01:05/A*74:01:06/A*74:01:07/A*74:03:01G/A*74:03:02/A*74:04/A*74:05/A*74:06:01G/A*74:07/A*74:08/A*74:09/A*74:10/A*74:11/A*74:13/A*74:15/A*74:16:01/A*74:16:02/A*74:17/A*74:18/A*74:19/A*74:20/A*74:21/A*74:22/A*74:23/A*74:24/A*74:25/A*74:26/A*74:27/A*74:28/A*74:29/A*74:30/A*74:33/A*74:35/A*74:37/A*74:38/A*74:40/A*74:41 | - | DR1403 | G | DRB1*14:03:01G/DRB1*14:03:02 | + | Serology | Level | Redux Allele | + | DR1403 | G | DRB1*14:03:01G/DRB1*14:03:02 | | Cw10 | lg | C*03:02g/C*03:04g/C*03:06g/C*03:26g/C*03:28g/C*03:46g | - | DR2 | G | DRB1*15:01:01G/DRB1*15:01:02/DRB1*15:01:03/DRB1*15:01:04/DRB1*15:01:05/DRB1*15:01:06/DRB1*15:01:07/DRB1*15:01:08G/DRB1*15:01:09/DRB1*15:01:10/DRB1*15:01:11/DRB1*15:01:12/DRB1*15:01:13/DRB1*15:01:14/DRB1*15:01:15/DRB1*15:01:16/DRB1*15:01:18/DRB1*15:01:19/DRB1*15:01:20/DRB1*15:01:21/DRB1*15:01:22/DRB1*15:01:23/DRB1*15:01:24/DRB1*15:01:25/DRB1*15:01:26/DRB1*15:01:27/DRB1*15:01:28/DRB1*15:01:29/DRB1*15:01:30/DRB1*15:01:31/DRB1*15:01:33/DRB1*15:01:34/DRB1*15:02:01G/DRB1*15:02:02G/DRB1*15:02:03/DRB1*15:02:04/DRB1*15:02:05/DRB1*15:02:06/DRB1*15:02:07/DRB1*15:02:08/DRB1*15:02:09/DRB1*15:02:10/DRB1*15:02:11/DRB1*15:02:12/DRB1*15:02:13/DRB1*15:02:14/DRB1*15:02:15/DRB1*15:02:16/DRB1*15:02:17/DRB1*15:02:18/DRB1*15:02:19/DRB1*15:03:01G/DRB1*15:03:02/DRB1*15:03:05/DRB1*15:04/DRB1*15:05/DRB1*15:06:01/DRB1*15:06:02/DRB1*15:06:03/DRB1*15:06:04/DRB1*15:07:01/DRB1*15:07:02/DRB1*15:07:03/DRB1*15:08/DRB1*15:09/DRB1*15:10/DRB1*15:11:01/DRB1*15:11:02/DRB1*15:12/DRB1*15:13/DRB1*15:14/DRB1*15:15:01/DRB1*15:15:02/DRB1*15:15:03/DRB1*15:16/DRB1*15:18/DRB1*15:19/DRB1*15:20/DRB1*15:21/DRB1*15:22/DRB1*15:23/DRB1*15:24/DRB1*15:25/DRB1*15:26/DRB1*15:27/DRB1*15:28/DRB1*15:29/DRB1*15:30/DRB1*15:31:01/DRB1*15:31:02/DRB1*15:32/DRB1*15:33/DRB1*15:34/DRB1*15:35/DRB1*15:36/DRB1*15:37:01/DRB1*15:37:02/DRB1*15:38/DRB1*15:39/DRB1*15:40/DRB1*15:41/DRB1*15:42/DRB1*15:43/DRB1*15:44/DRB1*15:45/DRB1*15:46/DRB1*15:47/DRB1*15:48/DRB1*15:49/DRB1*15:51/DRB1*15:52/DRB1*15:53/DRB1*15:54/DRB1*15:55/DRB1*15:56/DRB1*15:57/DRB1*15:58/DRB1*15:59/DRB1*15:60/DRB1*15:61/DRB1*15:62/DRB1*15:63/DRB1*15:64/DRB1*15:65/DRB1*15:66:01/DRB1*15:66:02/DRB1*15:67/DRB1*15:68/DRB1*15:69/DRB1*15:70/DRB1*15:71/DRB1*15:72/DRB1*15:73/DRB1*15:74/DRB1*15:75/DRB1*15:76/DRB1*15:77/DRB1*15:78/DRB1*15:79/DRB1*15:81/DRB1*15:82/DRB1*15:83/DRB1*15:84/DRB1*15:85/DRB1*15:86/DRB1*15:87/DRB1*15:88/DRB1*15:89/DRB1*15:90/DRB1*15:91/DRB1*15:92/DRB1*15:93/DRB1*15:94/DRB1*15:95/DRB1*15:96/DRB1*15:97/DRB1*15:98/DRB1*15:99/DRB1*15:100/DRB1*15:101/DRB1*15:102/DRB1*15:103/DRB1*15:104:01/DRB1*15:104:02/DRB1*15:104:03/DRB1*15:105:01/DRB1*15:105:02/DRB1*15:106/DRB1*15:107/DRB1*15:108/DRB1*15:109/DRB1*15:110/DRB1*15:111/DRB1*15:112/DRB1*15:114/DRB1*15:116/DRB1*15:117/DRB1*15:118/DRB1*15:119/DRB1*15:120/DRB1*15:121/DRB1*15:122/DRB1*15:123/DRB1*15:124/DRB1*15:125/DRB1*15:126/DRB1*15:127/DRB1*15:128/DRB1*15:130/DRB1*15:131/DRB1*15:132/DRB1*15:133/DRB1*15:135/DRB1*15:136/DRB1*15:139/DRB1*15:142/DRB1*15:143/DRB1*15:144/DRB1*15:147/DRB1*15:150/DRB1*15:152/DRB1*15:153/DRB1*15:155/DRB1*15:156/DRB1*15:157/DRB1*15:158/DRB1*15:161/DRB1*15:162/DRB1*15:164Q/DRB1*15:165/DRB1*15:167/DRB1*15:168/DRB1*15:169/DRB1*15:170/DRB1*15:172/DRB1*15:175/DRB1*15:181/DRB1*15:187/DRB1*15:189/DRB1*15:190/DRB1*15:192/DRB1*16:01:01G/DRB1*16:01:02/DRB1*16:01:03/DRB1*16:01:04/DRB1*16:01:05/DRB1*16:01:06/DRB1*16:01:07/DRB1*16:01:08/DRB1*16:01:09/DRB1*16:01:10/DRB1*16:01:11/DRB1*16:01:12/DRB1*16:01:13/DRB1*16:01:14/DRB1*16:01:16/DRB1*16:02:01G/DRB1*16:02:02/DRB1*16:02:03/DRB1*16:02:04/DRB1*16:02:05/DRB1*16:02:06/DRB1*16:02:07/DRB1*16:02:08/DRB1*16:02:10/DRB1*16:03/DRB1*16:04:01/DRB1*16:04:02/DRB1*16:05:01/DRB1*16:05:02/DRB1*16:07/DRB1*16:08/DRB1*16:09:01/DRB1*16:09:02/DRB1*16:10:01/DRB1*16:10:02/DRB1*16:11/DRB1*16:12/DRB1*16:14/DRB1*16:15/DRB1*16:16/DRB1*16:17/DRB1*16:18/DRB1*16:19/DRB1*16:20/DRB1*16:22/DRB1*16:23/DRB1*16:24/DRB1*16:25/DRB1*16:26/DRB1*16:27/DRB1*16:28/DRB1*16:29/DRB1*16:30/DRB1*16:31/DRB1*16:32/DRB1*16:33/DRB1*16:34/DRB1*16:35/DRB1*16:36/DRB1*16:37/DRB1*16:38:01/DRB1*16:38:02/DRB1*16:39/DRB1*16:40/DRB1*16:42/DRB1*16:43/DRB1*16:44/DRB1*16:45/DRB1*16:46/DRB1*16:47/DRB1*16:48/DRB1*16:49/DRB1*16:50/DRB1*16:53/DRB1*16:56/DRB1*16:58/DRB1*16:59Q/DRB1*16:60/DRB1*16:61/DRB1*16:65/DRB1*16:66/DRB1*16:67/DRB1*16:68 | diff --git a/tests/test_pyard.py b/tests/test_pyard.py index 3961969..425c4f6 100644 --- a/tests/test_pyard.py +++ b/tests/test_pyard.py @@ -39,7 +39,7 @@ class TestPyArd(unittest.TestCase): @classmethod def setUpClass(cls) -> None: - cls.db_version = '3290' + cls.db_version = '3440' cls.ard = ARD(cls.db_version, data_dir='/tmp/py-ard') def setUp(self): @@ -71,46 +71,26 @@ def test_redux_gl(self): expected_gl = ex['expected_gl'] self.assertEqual(self.ard.redux_gl(glstring, ard_type), expected_gl) + def test_serology(self): + data_dir = os.path.dirname(__file__) + expected_json = data_dir + "/expected-serology.json" + with open(expected_json) as json_data: + expected = json.load(json_data) + for ex in expected['redux_gl']: + glstring = ex['glstring'] + ard_type = ex['ard_type'] + expected_gl = ex['expected_gl'] + self.assertEqual(self.ard.redux_gl(glstring, ard_type), expected_gl) + def test_mac_G(self): self.assertEqual(self.ard.redux("A*01:01:01", 'G'), "A*01:01:01G") self.assertEqual(self.ard.redux_gl("HLA-A*01:AB", "G"), "HLA-A*01:01:01G/HLA-A*01:02") self.assertEqual(self.ard.redux("HLA-A*01:AB", "G"), "") def test_xx_code(self): - expanded_string = 'B*40:01:01G/B*40:02:01G/B*40:03:01G/B*40:04/B*40:05:01G/B*40:06:01G/B*40:07/B*40:08/B*40' \ - ':09/B*40:10:01G/B*40:11/B*40:12/B*40:13/B*40:14/B*40:15/B*40:16/B*40:18/B*40:19/B*40:20/B' \ - '*40:21/B*40:22N/B*40:23/B*40:24/B*40:25/B*40:26/B*40:27/B*40:28/B*40:29/B*40:30/B*40:31/B' \ - '*40:32/B*40:33/B*40:34/B*40:35/B*40:36/B*40:37/B*40:38/B*40:39/B*40:40:01G/B*40:42/B*40:43' \ - '/B*40:44/B*40:45/B*40:46/B*40:47/B*40:48/B*40:49/B*40:50/B*40:51/B*40:52/B*40:53/B*40:54/B' \ - '*40:57/B*40:58/B*40:59/B*40:60/B*40:61/B*40:62/B*40:63/B*40:64/B*40:65/B*40:66/B*40:67/B' \ - '*40:68/B*40:69/B*40:70/B*40:71/B*40:72/B*40:73/B*40:74/B*40:75/B*40:76/B*40:77/B*40:78/B' \ - '*40:79/B*40:80/B*40:81/B*40:82/B*40:83/B*40:84/B*40:85/B*40:86/B*40:87/B*40:88/B*40:89/B' \ - '*40:90/B*40:91/B*40:92/B*40:93/B*40:94/B*40:95/B*40:96/B*40:98/B*40:99/B*40:100/B*40:101/B' \ - '*40:102/B*40:103/B*40:104/B*40:105/B*40:106/B*40:107/B*40:108/B*40:109/B*40:110/B*40:111/B' \ - '*40:112/B*40:113/B*40:114/B*40:115/B*40:116/B*40:117/B*40:118N/B*40:119/B*40:120/B*40:121' \ - '/B*40:122/B*40:123/B*40:124/B*40:125/B*40:126/B*40:127/B*40:128/B*40:129/B*40:130/B*40:131' \ - '/B*40:132/B*40:133Q/B*40:134/B*40:135/B*40:136/B*40:137/B*40:138/B*40:139/B*40:140/B*40' \ - ':142N/B*40:143/B*40:145/B*40:146/B*40:147/B*40:148/B*40:149/B*40:152/B*40:153/B*40:154/B' \ - '*40:155:01G/B*40:156/B*40:157/B*40:158/B*40:159/B*40:160/B*40:161/B*40:162/B*40:163/B*40' \ - ':164/B*40:165/B*40:166/B*40:167/B*40:168/B*40:169/B*40:170/B*40:171/B*40:172/B*40:173/B*40' \ - ':174/B*40:175/B*40:177/B*40:178/B*40:180/B*40:181/B*40:182/B*40:183/B*40:184/B*40:185/B*40' \ - ':186/B*40:187/B*40:188/B*40:189/B*40:190/B*40:191/B*40:192/B*40:193/B*40:194/B*40:195/B*40' \ - ':196/B*40:197/B*40:198/B*40:199/B*40:200/B*40:201/B*40:202/B*40:203/B*40:204/B*40:205/B*40' \ - ':206/B*40:207/B*40:208/B*40:209/B*40:210/B*40:211/B*40:212/B*40:213/B*40:214/B*40:215/B*40' \ - ':216N/B*40:217/B*40:218/B*40:219/B*40:220/B*40:222/B*40:223/B*40:224/B*40:225/B*40:226/B' \ - '*40:227/B*40:228/B*40:230/B*40:231/B*40:232/B*40:233/B*40:234/B*40:235/B*40:237/B*40:238/B' \ - '*40:239/B*40:240/B*40:242/B*40:243/B*40:244/B*40:245/B*40:246/B*40:248/B*40:249/B*40:250/B' \ - '*40:251/B*40:252/B*40:253/B*40:254/B*40:255/B*40:256N/B*40:257/B*40:258/B*40:259/B*40:260' \ - '/B*40:261/B*40:262/B*40:263N/B*40:265N/B*40:266/B*40:268/B*40:269/B*40:270/B*40:271/B*40' \ - ':273/B*40:274/B*40:275/B*40:276/B*40:277/B*40:279/B*40:280/B*40:281/B*40:282/B*40:283/B*40' \ - ':284/B*40:285/B*40:286N/B*40:287/B*40:288/B*40:289/B*40:290/B*40:291N/B*40:292/B*40:293/B' \ - '*40:294/B*40:295/B*40:296/B*40:297/B*40:298/B*40:300/B*40:302/B*40:304/B*40:305/B*40:306/B' \ - '*40:307/B*40:308/B*40:309/B*40:310/B*40:311/B*40:312/B*40:313/B*40:314/B*40:315/B*40:316/B' \ - '*40:317/B*40:318/B*40:319/B*40:320/B*40:321/B*40:322/B*40:323/B*40:324/B*40:325/B*40:326/B' \ - '*40:327/B*40:328/B*40:330/B*40:331/B*40:332/B*40:333/B*40:334/B*40:335/B*40:336/B*40:337N' \ - '/B*40:339/B*40:340/B*40:341/B*40:342/B*40:343/B*40:344/B*40:345N/B*40:346/B*40:347/B*40' \ - ':348/B*40:349/B*40:350/B*40:351/B*40:352/B*40:354/B*40:355/B*40:357/B*40:358/B*40:359/B*40' \ - ':360' + expanded_string = """ + B*40:01:01G/B*40:01:01G/B*40:01:03G/B*40:02:01G/B*40:03:01G/B*40:04:01G/B*40:05:01G/B*40:06:01G/B*40:07/B*40:08/B*40:09/B*40:10:01G/B*40:11:01G/B*40:12/B*40:13/B*40:14/B*40:15/B*40:16:01G/B*40:18/B*40:19/B*40:20:01G/B*40:21/B*40:22N/B*40:23/B*40:24/B*40:25/B*40:26/B*40:27/B*40:28/B*40:29/B*40:30/B*40:31/B*40:32/B*40:33/B*40:34/B*40:35/B*40:36/B*40:37/B*40:38/B*40:39/B*40:40:01G/B*40:42/B*40:43/B*40:44/B*40:45/B*40:46/B*40:47/B*40:48/B*40:49/B*40:50:01G/B*40:51/B*40:52/B*40:53/B*40:54/B*40:57/B*40:58/B*40:59/B*40:60/B*40:61/B*40:62/B*40:63/B*40:64:01G/B*40:65/B*40:66/B*40:67/B*40:68/B*40:69/B*40:70/B*40:71/B*40:72/B*40:73/B*40:74/B*40:75/B*40:76/B*40:77/B*40:78/B*40:79/B*40:80/B*40:81/B*40:82/B*40:83/B*40:84/B*40:85/B*40:86/B*40:87/B*40:88/B*40:89/B*40:90/B*40:91/B*40:92/B*40:93/B*40:94/B*40:95/B*40:96/B*40:98/B*40:99/B*40:100/B*40:101/B*40:102/B*40:103/B*40:104/B*40:105/B*40:106/B*40:107/B*40:108/B*40:109/B*40:110/B*40:111/B*40:112/B*40:113/B*40:114:01G/B*40:115/B*40:116/B*40:117/B*40:118N/B*40:119/B*40:120/B*40:121/B*40:122/B*40:123/B*40:124/B*40:125/B*40:126/B*40:127/B*40:128/B*40:129/B*40:130/B*40:131/B*40:132/B*40:133Q/B*40:134/B*40:135/B*40:136/B*40:137/B*40:138/B*40:139/B*40:140/B*40:142N/B*40:143/B*40:145/B*40:146/B*40:147/B*40:148/B*40:149/B*40:152/B*40:153/B*40:154/B*40:155:01G/B*40:156/B*40:157/B*40:158/B*40:159/B*40:160/B*40:161/B*40:162/B*40:163/B*40:164/B*40:165/B*40:166/B*40:167/B*40:168/B*40:169/B*40:170/B*40:171/B*40:172/B*40:173/B*40:174/B*40:175/B*40:177/B*40:178/B*40:180/B*40:181/B*40:182/B*40:183/B*40:184/B*40:185/B*40:186/B*40:187/B*40:188/B*40:189/B*40:190/B*40:191/B*40:192/B*40:193/B*40:194/B*40:195/B*40:196/B*40:197/B*40:198/B*40:199/B*40:200/B*40:201/B*40:202/B*40:203/B*40:204/B*40:205/B*40:206/B*40:207/B*40:208/B*40:209/B*40:210/B*40:211/B*40:212/B*40:213:01G/B*40:214/B*40:215/B*40:216N/B*40:217/B*40:218/B*40:219/B*40:220/B*40:222/B*40:223/B*40:224/B*40:225/B*40:226/B*40:227/B*40:228/B*40:230/B*40:231/B*40:232/B*40:233/B*40:234/B*40:235/B*40:237/B*40:238/B*40:239/B*40:240/B*40:242/B*40:243/B*40:244/B*40:245/B*40:246/B*40:248/B*40:249/B*40:250/B*40:251/B*40:252/B*40:253/B*40:254/B*40:255/B*40:256N/B*40:257/B*40:258/B*40:259/B*40:260/B*40:261/B*40:262/B*40:263N/B*40:265N/B*40:266/B*40:268/B*40:269/B*40:270/B*40:271/B*40:273/B*40:274/B*40:275/B*40:276/B*40:277/B*40:279/B*40:280/B*40:281/B*40:282/B*40:283/B*40:284/B*40:285/B*40:286N/B*40:287/B*40:288/B*40:289/B*40:290/B*40:291N/B*40:292/B*40:293/B*40:294/B*40:295/B*40:296/B*40:297/B*40:298/B*40:300/B*40:302/B*40:304/B*40:305/B*40:306/B*40:307/B*40:308/B*40:309/B*40:310/B*40:311/B*40:312/B*40:313/B*40:314/B*40:315/B*40:316/B*40:317/B*40:318/B*40:319/B*40:320/B*40:321/B*40:322/B*40:323/B*40:324/B*40:325/B*40:326/B*40:327/B*40:328/B*40:330/B*40:331/B*40:332/B*40:333/B*40:334/B*40:335/B*40:336/B*40:337N/B*40:339/B*40:340/B*40:341/B*40:342/B*40:343/B*40:344/B*40:345N/B*40:346/B*40:347/B*40:348/B*40:349/B*40:350/B*40:351/B*40:352/B*40:354/B*40:355/B*40:357/B*40:358/B*40:359/B*40:360/B*40:361N/B*40:362/B*40:363/B*40:364/B*40:365/B*40:366/B*40:367/B*40:368/B*40:369/B*40:370/B*40:371/B*40:372N/B*40:373/B*40:374/B*40:375/B*40:376/B*40:377/B*40:378/B*40:380/B*40:381/B*40:382/B*40:385/B*40:388/B*40:389/B*40:390/B*40:391/B*40:392/B*40:393/B*40:394/B*40:396/B*40:397/B*40:398/B*40:399N/B*40:400/B*40:401/B*40:402/B*40:403/B*40:404/B*40:407/B*40:408/B*40:409/B*40:410/B*40:411/B*40:412/B*40:413/B*40:414/B*40:415/B*40:420/B*40:421Q/B*40:422/B*40:423/B*40:424/B*40:426N/B*40:428N/B*40:429/B*40:430/B*40:432/B*40:433/B*40:434/B*40:436/B*40:437/B*40:438N/B*40:441/B*40:445/B*40:447/B*40:448/B*40:449/B*40:451/B*40:452/B*40:454/B*40:457/B*40:458/B*40:459/B*40:460/B*40:461/B*40:462/B*40:463/B*40:465/B*40:466/B*40:467/B*40:468/B*40:469/B*40:470/B*40:471/B*40:472/B*40:477/B*40:478/B*40:479/B*40:481N/B*40:482 + """.strip() gl = self.ard.redux_gl('B*40:XX', 'G') self.assertEqual(gl, expanded_string) From b76c7b88b1b2d5513703257476f4657a1068a49e Mon Sep 17 00:00:00 2001 From: pbashyal-nmdp Date: Thu, 17 Jun 2021 14:01:43 -0500 Subject: [PATCH 2/4] Use `pyard-reduce-csv` command to reduce a CSV file based on a JSON config file. --- extras/README.md | 192 ++++++++++++++++++----------------- extras/conf.py | 78 --------------- extras/reduce_conf.json | 43 ++++++++ extras/reduce_csv.py | 127 ------------------------ scripts/pyard-reduce-csv | 209 +++++++++++++++++++++++++++++++++++++++ setup.py | 1 + 6 files changed, 356 insertions(+), 294 deletions(-) delete mode 100644 extras/conf.py create mode 100644 extras/reduce_conf.json delete mode 100644 extras/reduce_csv.py create mode 100644 scripts/pyard-reduce-csv diff --git a/extras/README.md b/extras/README.md index 9a69c57..3092e3f 100644 --- a/extras/README.md +++ b/extras/README.md @@ -1,100 +1,114 @@ # Extras -# Batch Script for CSV File +# Script to batch process a CSV File **Example Scripts to batch reduce HLA typings from a CSV File** -`reduce_csv.py` and `conf.py` scripts can be used to take a CSV file with HLA -typing data and reduce certain columns and produce a new CSV and Excel file. - -For most use case, installing `py-ard`, specifying the changes in `conf.py` file -and running `python reduce_csv.py` will produce result based on the configuration -in the `conf.py`. - - -```python -# -# configurations for processing CSV files -# - -# The column names that are in CSV -# The output file will have these columns -all_columns_in_csv = [ - "nmdp_id", "r_a_typ1", "r_a_typ2", "r_b_typ1", "r_b_typ2", "r_c_typ1", "r_c_typ2", "r_drb1_typ1", "r_drb1_typ2", - "r_dpb1_typ1", "r_dpb1_typ2" -] - -# -# List of columns which have typing information and need to be reduced. -# The locus is the 2nd term in the column name -# Eg: For column R_DRB1_type1, DPB1 is the locus name -# -columns_to_reduce_in_csv = [ - "r_a_typ1", "r_a_typ2", "r_b_typ1", "r_b_typ2", "r_c_typ1", "r_c_typ2", "r_drb1_typ1", "r_drb1_typ2", "r_dpb1_typ1", +`pyard-reduce-csv` command can be used with a config file(that describes ways +to reduce the file) can be used to take a CSV file with HLA typing data and +reduce certain columns and produce a new CSV or an Excel file. + +Install `py-ard` and use `pyard-reduce-csv` command specifying the changes in a JSON +config file and running `pyard-reduce-csv -c ` will produce result based +on the configuration in the config file. + + +See [Example JSON config file](reduce_conf.json). + + +### Input CSV filename +`in_csv_filename` Directory path and file name of the Input CSV file + +### Output CSV filename +`out_csv_filename` Directory path and file name of the Reduced Output CSV file + +### CSV Columns to read +`columns_from_csv` The column names to read from CSV file + +```json + [ + "nmdp_id", + "r_a_typ1", + "r_a_typ2", + "r_b_typ1", + "r_b_typ2", + "r_c_typ1", + "r_c_typ2", + "r_drb1_typ1", + "r_drb1_typ2", + "r_dpb1_typ1", + "r_dpb1_typ2" + ] +``` + +### CSV Columns to reduce +`columns_to_reduce_in_csv` List of columns which have typing information and need to be reduced. + +**NOTE**: The locus is the 2nd term in the column name +E.g., for column `column R_DRB1_type1`, `DPB1` is the locus name + +```json + [ + "r_a_typ1", + "r_a_typ2", + "r_b_typ1", + "r_b_typ2", + "r_c_typ1", + "r_c_typ2", + "r_drb1_typ1", + "r_drb1_typ2", + "r_dpb1_typ1", "r_dpb1_typ2" -] - -# -# Configuration options to ARD reduction of a CSV file -# -ard_config = { - # All Columns in the CSV file - "csv_in_column_names": all_columns_in_csv, - - # Columns to check for typings - "columns_to_check": columns_to_reduce_in_csv, - - # How should the typings be reduced - # Valid Options: - # - G - # - lg - # - lgx - "redux_type": "lgx", - - # Input CSV filename - "in_csv_filename": "sample.csv", - - # Output CSV filename - "out_csv_filename": 'clean_sample.csv', - - # Use compression - # Valid options - # - 'gzip' - # - 'zip' - # - None - "apply_compression": 'gzip', - - # Show verbose log - # Valid options: - # - True - # - False - "verbose_log": True, - - # What to reduce ? - "reduce_serology": False, - "reduce_v2": True, - "reduce_3field": True, - "reduce_P": True, - "reduce_XX": False, - "reduce_MAC": True, - - # Is locus name present in allele - # Eg. A*01:01 vs 01:01 - "locus_in_allele_name": False, - - # Format - # Valid options: - # - csv - # - xlsx - "output_file_format": 'csv', - - # Add a separate column for processed column - "new_column_for_redux": False, -} + ], ``` -The included sample CSV file `sample.csv` can be processed using the script. -```shell +### Redux Options +`redux_type` Reduction Type + +Valid Options: `G`, `lg` and `lgx` + +### Compression Options +`apply_compression` Compression to use for output file +Valid options: `'gzip'`, `'zip'` or `null` + +### Verbose log Options +`log_comment` Show verbose log ? + +Valid options: `true` or `false` + +### Types of typings to reduce +```json + "verbose_log": true, + "reduce_serology": false, + "reduce_v2": true, + "reduce_3field": true, + "reduce_P": true, + "reduce_XX": false, + "reduce_MAC": true, ``` +Valid options: `true` or `false` + + +### Locus Name in Allele +`locus_in_allele_name` +Is locus name present in allele ? E.g. A*01:01 vs 01:01 + +Valid options: `true` or `false` + +### Output Format +`output_file_format` Format of the output file + +Valid options: `csv` or `xlsx` + +### Create New Column +`new_column_for_redux` Add a separate column for processed column or replace +the current column. Creates a `reduced_` version of the column. + +Valid options: `true`, `false` + +### Map to DRBX +`map_drb345_to_drbx` Map to DRBX Typings based on DRB3, DRB4 and DRB5 typings. + +Valid options: `true` or `false` diff --git a/extras/conf.py b/extras/conf.py deleted file mode 100644 index 82fbc56..0000000 --- a/extras/conf.py +++ /dev/null @@ -1,78 +0,0 @@ -# -# configurations for processing CSV files -# - -# The column names that are in CSV -# The output file will have these columns -all_columns_in_csv = [ - "nmdp_id", "r_a_typ1", "r_a_typ2", "r_b_typ1", "r_b_typ2", "r_c_typ1", "r_c_typ2", "r_drb1_typ1", "r_drb1_typ2", - "r_dpb1_typ1", "r_dpb1_typ2" -] - -# -# List of columns which have typing information and need to be reduced. -# The locus is the 2nd term in the column name -# Eg: For column R_DRB1_type1, DPB1 is the locus name -# -columns_to_reduce_in_csv = [ - "r_a_typ1", "r_a_typ2", "r_b_typ1", "r_b_typ2", "r_c_typ1", "r_c_typ2", "r_drb1_typ1", "r_drb1_typ2", "r_dpb1_typ1", - "r_dpb1_typ2" -] - -# -# Configuration options to ARD reduction of a CSV file -# -ard_config = { - # All Columns in the CSV file - "csv_in_column_names": all_columns_in_csv, - - # Columns to check for typings - "columns_to_check": columns_to_reduce_in_csv, - - # How should the typings be reduced - # Valid Options: - # - G - # - lg - # - lgx - "redux_type": "lgx", - - # Input CSV filename - "in_csv_filename": "sample.csv", - - # Output CSV filename - "out_csv_filename": 'clean_sample.csv', - - # Use compression - # Valid options - # - 'gzip' - # - 'zip' - # - None - "apply_compression": 'gzip', - - # Show verbose log - # Valid options: - # - True - # - False - "verbose_log": True, - - # What to reduce ? - "reduce_serology": False, - "reduce_v2": True, - "reduce_3field": True, - "reduce_P": True, - "reduce_XX": False, - "reduce_MAC": True, - - # Is locus name present in allele - # Eg. A*01:01 vs 01:01 - "locus_in_allele_name": False, - - # Format - # Valid options: - # - csv - # - xlsx - "output_file_format": 'csv', - - # Add a separate column for processed column - "new_column_for_redux": False, -} diff --git a/extras/reduce_conf.json b/extras/reduce_conf.json new file mode 100644 index 0000000..a219e94 --- /dev/null +++ b/extras/reduce_conf.json @@ -0,0 +1,43 @@ +{ + "in_csv_filename": "sample.csv", + "out_csv_filename": "clean_sample.csv", + "columns_from_csv": [ + "nmdp_id", + "r_a_typ1", + "r_a_typ2", + "r_b_typ1", + "r_b_typ2", + "r_c_typ1", + "r_c_typ2", + "r_drb1_typ1", + "r_drb1_typ2", + "r_dpb1_typ1", + "r_dpb1_typ2" + ], + "columns_to_reduce_in_csv": [ + "r_a_typ1", + "r_a_typ2", + "r_b_typ1", + "r_b_typ2", + "r_c_typ1", + "r_c_typ2", + "r_drb1_typ1", + "r_drb1_typ2", + "r_dpb1_typ1", + "r_dpb1_typ2" + ], + "redux_type": "lgx", + "apply_compression": "gzip", + "reduce_serology": false, + "reduce_v2": true, + "reduce_3field": true, + "reduce_P": true, + "reduce_XX": false, + "reduce_MAC": true, + "locus_in_allele_name": false, + "keep_locus_in_allele_name": false, + "output_file_format": "csv", + "new_column_for_redux": false, + "map_drb345_to_drbx": false, + "verbose_log": true +} \ No newline at end of file diff --git a/extras/reduce_csv.py b/extras/reduce_csv.py deleted file mode 100644 index 41ae1f6..0000000 --- a/extras/reduce_csv.py +++ /dev/null @@ -1,127 +0,0 @@ -# -# -# Quick script to reduce alleles from a CSV file -# -# Use `conf.py` to setup configurations that's used here -# For Excel output, openpyxl library needs to be installed. -# pip install openpyxl -# - -import pandas as pd -import pyard -import re - -from conf import ard_config - -verbose = ard_config["verbose_log"] -white_space_regex = re.compile(r"\s+") - - -def is_serology(allele: str) -> bool: - if len(allele.split(':')) == 1: - return True - - -def is_3field(allele: str) -> bool: - return len(allele.split(':')) > 2 - - -def is_P(allele: str) -> bool: - if allele.endswith('P'): - fields = allele.split(':') - if len(fields) == 2: # Ps are 2 fields - return fields[0].isdigit() and fields[0].isdigit() - return False - - -def clean_locus(allele: str, column_name: str = 'Unknown') -> str: - if allele: - # Remove all white spaces - allele = white_space_regex.sub('', allele) - locus = column_name.split('_')[1].upper() - # If the allele comes in as an allele list, apply reduce to all alleles - if '/' in allele: - return "/".join(map(reduce, allele.split('/'), locus)) - else: - return reduce(allele, locus) - return allele - - -def should_be_reduced(allele, locus_allele): - if is_serology(allele): - return ard_config["reduce_serology"] - - if ard_config["reduce_v2"]: - if ard.is_v2(locus_allele): - return True - - if ard_config["reduce_3field"]: - if is_3field(locus_allele): - return True - - if ard_config["reduce_P"]: - if is_P(allele): - return True - - if ard_config["reduce_XX"]: - if ard.is_XX(locus_allele): - return True - - if ard_config["reduce_MAC"]: - if ard.is_mac(locus_allele) and not ard.is_XX(locus_allele): - return True - - return False - - -def reduce(allele, locus): - # Does the allele name have the locus in it ? - if '*' in allele: - locus_allele = allele - elif ard_config["locus_in_allele_name"]: - locus_allele = allele - else: - locus_allele = f"{locus}*{allele}" - - # Check the config if this allele should be reduced - if should_be_reduced(allele, locus_allele): - # print(f"reducing '{locus_allele}'") - reduced_allele = ard.redux_gl(locus_allele, ard_config["redux_type"]) - # print(f"reduced to '{reduced_allele}'") - if reduced_allele: - allele = "/".join(map(lambda a: a.split('*')[1], - reduced_allele.split('/'))) - else: - if verbose: - print(f"Failed to reduce {locus_allele}") - - if verbose: - print(f"\t{locus_allele} => {allele}") - return allele - - -if __name__ == '__main__': - ard = pyard.ARD(remove_invalid=False) - - df = pd.read_csv(ard_config["in_csv_filename"], names=ard_config["csv_in_column_names"], header=0, dtype=str) - df.fillna('', inplace=True) - - for column in ard_config["columns_to_check"]: - if verbose: - print(f"Column:{column} =>") - if ard_config["new_column_for_redux"]: - # insert a new column - new_column_name = f"reduced_{column}" - new_column_index = df.columns.get_loc(column) + 1 - df.insert(new_column_index, new_column_name, df[column].apply(clean_locus, column_name=column)) - else: - df[column] = df[column].apply(clean_locus, column_name=column) - - if ard_config["output_file_format"] == 'xlsx': - out_file_name = f"{ard_config['out_csv_filename']}.xlsx" - df.to_excel(out_file_name, index=False) - else: - out_file_name = f"{ard_config['out_csv_filename'] + '.gz' if ard_config['apply_compression'] else ''}" - df.to_csv(out_file_name, index=False, compression=ard_config["apply_compression"]) - if verbose: - print(f"Saved result to file:{out_file_name}") diff --git a/scripts/pyard-reduce-csv b/scripts/pyard-reduce-csv new file mode 100644 index 0000000..7aa7ba7 --- /dev/null +++ b/scripts/pyard-reduce-csv @@ -0,0 +1,209 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# py-ard +# Copyright (c) 2020 Be The Match operated by National Marrow Donor Program. All Rights Reserved. +# +# This library is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation; either version 3 of the License, or (at +# your option) any later version. +# +# This library is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; with out even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +# License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this library; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +# +# > http://www.fsf.org/licensing/licenses/lgpl.html +# > http://www.opensource.org/licenses/lgpl-license.php +# +# +# Quick script to reduce alleles from a CSV file +# +# Use configuration file from `--config` to setup configurations that's used here +# For Excel output, openpyxl library needs to be installed. +# pip install openpyxl +# +import argparse +import json +import re +import sys + +import pandas as pd + +import pyard +import pyard.drbx as drbx + + +def is_serology(allele: str) -> bool: + if len(allele.split(':')) == 1: + return True + + +def is_3field(allele: str) -> bool: + return len(allele.split(':')) > 2 + + +def is_P(allele: str) -> bool: + if allele.endswith('P'): + fields = allele.split(':') + if len(fields) == 2: # Ps are 2 fields + return fields[0].isdigit() and fields[0].isdigit() + return False + + +def clean_locus(allele: str, column_name: str = 'Unknown') -> str: + if allele: + # Remove all white spaces + allele = white_space_regex.sub('', allele) + locus = column_name.split('_')[1].upper() + # If the allele comes in as an allele list, apply reduce to all alleles + if '/' in allele: + return "/".join(map(reduce, allele.split('/'), locus)) + else: + return reduce(allele, locus) + return allele + + +def should_be_reduced(allele, locus_allele): + if is_serology(allele): + return ard_config["reduce_serology"] + + if ard_config["reduce_v2"]: + if ard.is_v2(locus_allele): + return True + + if ard_config["reduce_3field"]: + if is_3field(locus_allele): + return True + + if ard_config["reduce_P"]: + if is_P(allele): + return True + + if ard_config["reduce_XX"]: + if ard.is_XX(locus_allele): + return True + + if ard_config["reduce_MAC"]: + if ard.is_mac(locus_allele) and not ard.is_XX(locus_allele): + return True + + return False + + +def reduce(allele, locus): + # Does the allele name have the locus in it ? + if '*' in allele: + locus_allele = allele + elif ard_config["locus_in_allele_name"]: + locus_allele = allele + else: + locus_allele = f"{locus}*{allele}" + + # Check the config if this allele should be reduced + if should_be_reduced(allele, locus_allele): + # print(f"reducing '{locus_allele}'") + reduced_allele = ard.redux_gl(locus_allele, ard_config["redux_type"]) + # print(f"reduced to '{reduced_allele}'") + if reduced_allele: + if ard_config["keep_locus_in_allele_name"]: + allele = reduced_allele + else: + allele = "/".join(map(lambda a: a.split('*')[1], + reduced_allele.split('/'))) + else: + if verbose: + print(f"Failed to reduce {locus_allele}") + + if verbose: + print(f"\t{locus_allele} => {allele}") + else: + if ard_config["keep_locus_in_allele_name"]: + allele = locus_allele + + return allele + + +def create_drbx(row, locus_in_allele_name): + return drbx.map_drbx(row.values, locus_in_allele_name) + + +if __name__ == '__main__': + + # config is specified with a -c parameter + parser = argparse.ArgumentParser() + parser.add_argument('-c', '--config', + help="JSON Configuration file", + required=True) + + args = parser.parse_args() + config_filename = args.config + + print("Using config file:", config_filename) + with open(config_filename) as conf_file: + ard_config = json.load(conf_file) + + verbose = ard_config["verbose_log"] + white_space_regex = re.compile(r"\s+") + + try: + import openpyxl + except ImportError: + print("For Excel output, openpyxl library needs to be installed. " + "Install with:") + print(" pip install openpyxl") + sys.exit(1) + +# Instantiate py-ard object with the latest +ard = pyard.ARD(remove_invalid=False) + +# Read the Input File +# Read only the columns to be saved. +# Header is the first row +# Don't convert to NAs +df = pd.read_csv(ard_config["in_csv_filename"], + usecols=ard_config["columns_from_csv"], + header=0, dtype=str, + keep_default_na=False) + +# Reduce each of the specified columns +for column in ard_config["columns_to_reduce_in_csv"]: + if verbose: + print(f"Column:{column} =>") + if ard_config["new_column_for_redux"]: + # insert a new column + new_column_name = f"reduced_{column}" + new_column_index = df.columns.get_loc(column) + 1 + # Apply clean_locus function to the column and insert as a new column + df.insert(new_column_index, new_column_name, + df[column].apply(clean_locus, column_name=column)) + else: + # Apply clean_locus function to the column and replace the column + df[column] = df[column].apply(clean_locus, column_name=column) + +# Map DRB3,DRB4,DRB5 to DRBX if specified +# New columns DRBX_1 and DRBX_2 are created +if ard_config['map_drb345_to_drbx']: + drbx_loci = ['DRB3', 'DRB4', 'DRB5'] + drbx_columns = [col_name for col_name in df.columns if col_name.split('_')[1] in drbx_loci] + if len(drbx_columns) == len(drbx_loci) * 2: # For Type1/Type2 + locus_in_allele_name = ard_config["keep_locus_in_allele_name"] + df_drbx = df[drbx_columns].apply(create_drbx, axis=1, args=(locus_in_allele_name,)) + df['DRBX_1'], df['DRBX_2'] = zip(*df_drbx) + +# Save as XLSX if specified +if ard_config["output_file_format"] == 'xlsx': + out_file_name = f"{ard_config['out_csv_filename']}.xlsx" + df.to_excel(out_file_name, index=False) +else: + # Save as compressed CSV + out_file_name = f"{ard_config['out_csv_filename'] + '.gz' if ard_config['apply_compression'] else ''}" + df.to_csv(out_file_name, index=False, compression=ard_config["apply_compression"]) + +# Done +print(f"Saved result to file:{out_file_name}") diff --git a/setup.py b/setup.py index af4889e..ef9f86f 100644 --- a/setup.py +++ b/setup.py @@ -55,6 +55,7 @@ scripts=[ 'scripts/pyard', 'scripts/pyard-import', + 'scripts/pyard-reduce-csv' ], install_requires=requirements, license="LGPL 3.0", From 8d3da5a6a33732bedf291a87103e5b88892fa63e Mon Sep 17 00:00:00 2001 From: pbashyal-nmdp Date: Thu, 17 Jun 2021 14:05:20 -0500 Subject: [PATCH 3/4] Re-run the tests again so local db is used. --- .github/workflows/python-tests.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 2ceeac1..2a9c43c 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -34,7 +34,13 @@ jobs: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Run BDD Tests run: | + # When run the first time, it'll build the library + behave + # When run the second time, it should use the already installed library behave - name: Run Unit Tests run: | + # When run the first time, it'll build the library + python -m unittest tests.test_pyard tests.test_smart_sort + # When run the second time, it should use the already installed library python -m unittest tests.test_pyard tests.test_smart_sort From de4ac34a72f96428952d4c76968a731787163d16 Mon Sep 17 00:00:00 2001 From: pbashyal-nmdp Date: Thu, 17 Jun 2021 14:08:15 -0500 Subject: [PATCH 4/4] =?UTF-8?q?Bump=20version:=200.6.4=20=E2=86=92=200.6.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyard/__init__.py | 2 +- setup.cfg | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyard/__init__.py b/pyard/__init__.py index 5341080..7c35c79 100644 --- a/pyard/__init__.py +++ b/pyard/__init__.py @@ -24,4 +24,4 @@ from .pyard import ARD __author__ = """NMDP Bioinformatics""" -__version__ = '0.6.4' +__version__ = '0.6.5' diff --git a/setup.cfg b/setup.cfg index 09c0516..0c1d453 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.6.4 +current_version = 0.6.5 commit = True tag = True diff --git a/setup.py b/setup.py index ef9f86f..2ef0b55 100644 --- a/setup.py +++ b/setup.py @@ -42,7 +42,7 @@ setup( name='py-ard', - version='0.6.4', + version='0.6.5', description="ARD reduction for HLA with Python", long_description=readme + '\n\n' + history, author="CIBMTR",