Skip to content

Commit

Permalink
Merge pull request #150 from pbashyal-nmdp/reduce_2field
Browse files Browse the repository at this point in the history
Reduce 2field
  • Loading branch information
mmaiers-nmdp committed Feb 23, 2022
2 parents 2c58147 + 2952fb2 commit 9620c56
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions extras/reduce_conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"reduce_serology": false,
"reduce_v2": true,
"convert_v2_to_v3": false,
"reduce_2field": true,
"reduce_3field": true,
"reduce_P": true,
"reduce_XX": false,
Expand Down
2 changes: 1 addition & 1 deletion pyard/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
from .pyard import ARD

__author__ = """NMDP Bioinformatics"""
__version__ = '0.7.0'
__version__ = '0.7.1'
8 changes: 8 additions & 0 deletions scripts/pyard-reduce-csv
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ def is_3field(allele: str) -> bool:
return len(allele.split(':')) > 2


def is_2field(allele: str) -> bool:
return len(allele.split(':')) == 2


def is_P(allele: str) -> bool:
if allele.endswith('P'):
fields = allele.split(':')
Expand All @@ -68,6 +72,10 @@ def should_be_reduced(allele, locus_allele):
if ard.is_v2(locus_allele):
return True

if ard_config["reduce_2field"]:
if is_2field(locus_allele):
return True

if ard_config["reduce_3field"]:
if is_3field(locus_allele):
return True
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.7.0
current_version = 0.7.1
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

setup(
name='py-ard',
version='0.7.0',
version='0.7.1',
description="ARD reduction for HLA with Python",
long_description=readme + '\n\n' + history,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 9620c56

Please sign in to comment.