Skip to content

Commit

Permalink
Merge pull request #192 from pbashyal-nmdp/xx_broad_split_fix
Browse files Browse the repository at this point in the history
Fix xx_codes for broad/split
  • Loading branch information
mmaiers-nmdp authored Feb 8, 2023
2 parents dbfac4d + 2a60667 commit 09cad4e
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion api-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ openapi: 3.0.3
info:
title: ARD Reduction
description: Reduce to ARD Level
version: "0.8.3"
version: "0.9.0"
servers:
- url: 'http://localhost:8080'
tags:
Expand Down
2 changes: 1 addition & 1 deletion pyard/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
from .blender import blender as dr_blender

__author__ = """NMDP Bioinformatics"""
__version__ = "0.8.3"
__version__ = "0.9.0"
3 changes: 2 additions & 1 deletion pyard/data_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
# > http://www.fsf.org/licensing/licenses/lgpl.html
# > http://www.opensource.org/licenses/lgpl-license.php
#
import copy
from collections import namedtuple
import functools
import sqlite3
Expand Down Expand Up @@ -380,7 +381,7 @@ def generate_alleles_and_xx_codes_and_who(
if broad in xx_codes:
xx_codes[broad].extend(xx_codes[split])
else:
xx_codes[broad] = xx_codes[split]
xx_codes[broad] = copy.deepcopy(xx_codes[split])

# Save this version of the valid alleles
db.save_set(db_connection, "alleles", valid_alleles, "allele")
Expand Down
1 change: 0 additions & 1 deletion pyard/pyard.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ class ARD(object):
def __init__(
self, imgt_version: str = "Latest", data_dir: str = None, config: dict = None
):

"""
ARD will load valid alleles, xx codes and MAC mappings for the given
version of IMGT database, downloading and generating the database if
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.8.3
current_version = 0.9.0
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 @@ -39,7 +39,7 @@

setup(
name="py-ard",
version="0.8.3",
version="0.9.0",
description="ARD reduction for HLA with Python",
long_description=readme + "\n\n" + history,
long_description_content_type="text/markdown",
Expand Down
6 changes: 6 additions & 0 deletions tests/test_pyard.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,9 @@ def test_allele_duplicated(self):

def test_imgt_db_version(self):
self.assertEqual(self.ard.get_db_version(), int(TestPyArd.db_version))

def test_xx_codes_broad_split(self):
self.assertFalse(
"DQB1*06" in self.ard.redux_gl("DQB1*05:XX", "lgx"),
"The split shouldn't include other splits",
)

0 comments on commit 09cad4e

Please sign in to comment.