Skip to content

Commit 9620c56

Browse files
authored
Merge pull request #150 from pbashyal-nmdp/reduce_2field
Reduce 2field
2 parents 2c58147 + 2952fb2 commit 9620c56

File tree

5 files changed

+12
-3
lines changed

5 files changed

+12
-3
lines changed

extras/reduce_conf.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"reduce_serology": false,
3131
"reduce_v2": true,
3232
"convert_v2_to_v3": false,
33+
"reduce_2field": true,
3334
"reduce_3field": true,
3435
"reduce_P": true,
3536
"reduce_XX": false,

pyard/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@
2424
from .pyard import ARD
2525

2626
__author__ = """NMDP Bioinformatics"""
27-
__version__ = '0.7.0'
27+
__version__ = '0.7.1'

scripts/pyard-reduce-csv

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ def is_3field(allele: str) -> bool:
4848
return len(allele.split(':')) > 2
4949

5050

51+
def is_2field(allele: str) -> bool:
52+
return len(allele.split(':')) == 2
53+
54+
5155
def is_P(allele: str) -> bool:
5256
if allele.endswith('P'):
5357
fields = allele.split(':')
@@ -68,6 +72,10 @@ def should_be_reduced(allele, locus_allele):
6872
if ard.is_v2(locus_allele):
6973
return True
7074

75+
if ard_config["reduce_2field"]:
76+
if is_2field(locus_allele):
77+
return True
78+
7179
if ard_config["reduce_3field"]:
7280
if is_3field(locus_allele):
7381
return True

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 = 0.7.0
2+
current_version = 0.7.1
33
commit = True
44
tag = True
55

setup.py

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

4343
setup(
4444
name='py-ard',
45-
version='0.7.0',
45+
version='0.7.1',
4646
description="ARD reduction for HLA with Python",
4747
long_description=readme + '\n\n' + history,
4848
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)