diff --git a/api-spec.yaml b/api-spec.yaml index 04a45ba..debe488 100644 --- a/api-spec.yaml +++ b/api-spec.yaml @@ -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: diff --git a/pyard/__init__.py b/pyard/__init__.py index d7cd5ab..1df241a 100644 --- a/pyard/__init__.py +++ b/pyard/__init__.py @@ -25,4 +25,4 @@ from .blender import blender as dr_blender __author__ = """NMDP Bioinformatics""" -__version__ = "0.8.3" +__version__ = "0.9.0" diff --git a/pyard/data_repository.py b/pyard/data_repository.py index 7a6d9f9..1a4afe6 100644 --- a/pyard/data_repository.py +++ b/pyard/data_repository.py @@ -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 @@ -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") diff --git a/pyard/pyard.py b/pyard/pyard.py index 26f3b90..0170374 100644 --- a/pyard/pyard.py +++ b/pyard/pyard.py @@ -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 diff --git a/setup.cfg b/setup.cfg index aceba8c..d9e5227 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.8.3 +current_version = 0.9.0 commit = True tag = True diff --git a/setup.py b/setup.py index bfadde3..3277fa9 100644 --- a/setup.py +++ b/setup.py @@ -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", diff --git a/tests/test_pyard.py b/tests/test_pyard.py index 865799d..02f9e05 100644 --- a/tests/test_pyard.py +++ b/tests/test_pyard.py @@ -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", + )