py-ard 2.4.4__tar.gz → 2.4.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. {py_ard-2.4.4 → py_ard-2.4.6}/PKG-INFO +1 -1
  2. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/__init__.py +1 -1
  3. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/cli/reduce_csv.py +26 -0
  4. {py_ard-2.4.4 → py_ard-2.4.6}/pyproject.toml +6 -1
  5. {py_ard-2.4.4 → py_ard-2.4.6}/.gitignore +0 -0
  6. {py_ard-2.4.4 → py_ard-2.4.6}/CONTRIBUTING.rst +0 -0
  7. {py_ard-2.4.4 → py_ard-2.4.6}/HISTORY.rst +0 -0
  8. {py_ard-2.4.4 → py_ard-2.4.6}/LICENSE +0 -0
  9. {py_ard-2.4.4 → py_ard-2.4.6}/README.md +0 -0
  10. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/ard.py +0 -0
  11. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/blender.py +0 -0
  12. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/cli/__init__.py +0 -0
  13. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/cli/import_db.py +0 -0
  14. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/cli/redux.py +0 -0
  15. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/cli/status.py +0 -0
  16. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/config.py +0 -0
  17. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/constants.py +0 -0
  18. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/data_repository.py +0 -0
  19. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/db.py +0 -0
  20. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/dna_relshp.csv +0 -0
  21. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/drbx.py +0 -0
  22. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/exceptions.py +0 -0
  23. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/handlers/__init__.py +0 -0
  24. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/handlers/allele_handler.py +0 -0
  25. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/handlers/gl_string_processor.py +0 -0
  26. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/handlers/hats_handler.py +0 -0
  27. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/handlers/mac_handler.py +0 -0
  28. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/handlers/serology_handler.py +0 -0
  29. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/handlers/shortnull_handler.py +0 -0
  30. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/handlers/v2_handler.py +0 -0
  31. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/handlers/xx_handler.py +0 -0
  32. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/loader/CWD2.csv +0 -0
  33. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/loader/__init__.py +0 -0
  34. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/loader/allele_list.py +0 -0
  35. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/loader/cwd.py +0 -0
  36. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/loader/g_group.py +0 -0
  37. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/loader/mac_codes.py +0 -0
  38. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/loader/p_group.py +0 -0
  39. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/loader/serology.py +0 -0
  40. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/loader/version.py +0 -0
  41. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/loader/wmda-data-model.md +0 -0
  42. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/mappings.py +0 -0
  43. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/misc.py +0 -0
  44. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/rc.py +0 -0
  45. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/reducers/__init__.py +0 -0
  46. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/reducers/base_reducer.py +0 -0
  47. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/reducers/default_reducer.py +0 -0
  48. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/reducers/exon_reducer.py +0 -0
  49. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/reducers/first_field_reducer.py +0 -0
  50. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/reducers/g_reducer.py +0 -0
  51. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/reducers/hats_reducer.py +0 -0
  52. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/reducers/lg_reducer.py +0 -0
  53. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/reducers/p_reducer.py +0 -0
  54. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/reducers/reducer_factory.py +0 -0
  55. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/reducers/s_reducer.py +0 -0
  56. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/reducers/u2_reducer.py +0 -0
  57. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/reducers/w_reducer.py +0 -0
  58. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/serology.py +0 -0
  59. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/simple_table.py +0 -0
  60. {py_ard-2.4.4 → py_ard-2.4.6}/pyard/smart_sort.py +0 -0
  61. {py_ard-2.4.4 → py_ard-2.4.6}/tests/api-test.hurl +0 -0
  62. {py_ard-2.4.4 → py_ard-2.4.6}/tests/environment.py +0 -0
  63. {py_ard-2.4.4 → py_ard-2.4.6}/tests/features/1f_reduction.feature +0 -0
  64. {py_ard-2.4.4 → py_ard-2.4.6}/tests/features/Gexpand.feature +0 -0
  65. {py_ard-2.4.4 → py_ard-2.4.6}/tests/features/Pexpand.feature +0 -0
  66. {py_ard-2.4.4 → py_ard-2.4.6}/tests/features/Wexpand.feature +0 -0
  67. {py_ard-2.4.4 → py_ard-2.4.6}/tests/features/XX.feature +0 -0
  68. {py_ard-2.4.4 → py_ard-2.4.6}/tests/features/allele.feature +0 -0
  69. {py_ard-2.4.4 → py_ard-2.4.6}/tests/features/cwd.feature +0 -0
  70. {py_ard-2.4.4 → py_ard-2.4.6}/tests/features/drbx.feature +0 -0
  71. {py_ard-2.4.4 → py_ard-2.4.6}/tests/features/drbx_blender.feature +0 -0
  72. {py_ard-2.4.4 → py_ard-2.4.6}/tests/features/glstring.feature +0 -0
  73. {py_ard-2.4.4 → py_ard-2.4.6}/tests/features/mac.feature +0 -0
  74. {py_ard-2.4.4 → py_ard-2.4.6}/tests/features/optional_expression_characters.feature +0 -0
  75. {py_ard-2.4.4 → py_ard-2.4.6}/tests/features/p_g_group.feature +0 -0
  76. {py_ard-2.4.4 → py_ard-2.4.6}/tests/features/p_group.feature +0 -0
  77. {py_ard-2.4.4 → py_ard-2.4.6}/tests/features/serology.feature +0 -0
  78. {py_ard-2.4.4 → py_ard-2.4.6}/tests/features/serology_broad_splits.feature +0 -0
  79. {py_ard-2.4.4 → py_ard-2.4.6}/tests/features/serology_typings_redux.feature +0 -0
  80. {py_ard-2.4.4 → py_ard-2.4.6}/tests/features/shortnulls.feature +0 -0
  81. {py_ard-2.4.4 → py_ard-2.4.6}/tests/features/u2_reduction.feature +0 -0
  82. {py_ard-2.4.4 → py_ard-2.4.6}/tests/features/valid_allele.feature +0 -0
  83. {py_ard-2.4.4 → py_ard-2.4.6}/tests/features/version2.feature +0 -0
  84. {py_ard-2.4.4 → py_ard-2.4.6}/tests/features/who.feature +0 -0
  85. {py_ard-2.4.4 → py_ard-2.4.6}/tests/steps/XX.py +0 -0
  86. {py_ard-2.4.4 → py_ard-2.4.6}/tests/steps/broad_splits.py +0 -0
  87. {py_ard-2.4.4 → py_ard-2.4.6}/tests/steps/cwd.py +0 -0
  88. {py_ard-2.4.4 → py_ard-2.4.6}/tests/steps/drbx_blender.py +0 -0
  89. {py_ard-2.4.4 → py_ard-2.4.6}/tests/steps/generate_drbx.py +0 -0
  90. {py_ard-2.4.4 → py_ard-2.4.6}/tests/steps/mac.py +0 -0
  91. {py_ard-2.4.4 → py_ard-2.4.6}/tests/steps/redux_allele.py +0 -0
  92. {py_ard-2.4.4 → py_ard-2.4.6}/tests/steps/validate_allele.py +0 -0
  93. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/expected-serology.json +0 -0
  94. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/expected.json +0 -0
  95. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/handlers/__init__.py +0 -0
  96. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/handlers/test_allele_handler.py +0 -0
  97. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/handlers/test_gl_string_handler.py +0 -0
  98. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/handlers/test_mac_handler.py +0 -0
  99. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/handlers/test_serology_handler.py +0 -0
  100. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/handlers/test_shortnull_handler.py +0 -0
  101. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/handlers/test_v2_handler.py +0 -0
  102. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/handlers/test_xx_handler.py +0 -0
  103. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/reducers/__init__.py +0 -0
  104. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/reducers/test_all_reducers.py +0 -0
  105. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/reducers/test_base_reducer.py +0 -0
  106. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/reducers/test_default_reducer.py +0 -0
  107. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/reducers/test_exon_reducer.py +0 -0
  108. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/reducers/test_first_field_reducer.py +0 -0
  109. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/reducers/test_g_reducer.py +0 -0
  110. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/reducers/test_lg_reducer.py +0 -0
  111. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/reducers/test_p_reducer.py +0 -0
  112. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/reducers/test_reducer_factory.py +0 -0
  113. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/reducers/test_s_reducer.py +0 -0
  114. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/reducers/test_u2_reducer.py +0 -0
  115. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/reducers/test_w_reducer.py +0 -0
  116. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/simple_table/__init__.py +0 -0
  117. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/simple_table/test_column.py +0 -0
  118. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/simple_table/test_simple_table.py +0 -0
  119. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/simple_table/test_simple_table_failures.py +0 -0
  120. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/test_cli.py +0 -0
  121. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/test_load_allele_list.py +0 -0
  122. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/test_load_serology_broad_split_mapping.py +0 -0
  123. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/test_load_serology_mappings.py +0 -0
  124. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/test_pyard.py +0 -0
  125. {py_ard-2.4.4 → py_ard-2.4.6}/tests/unit/test_smart_sort.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: py-ard
3
- Version: 2.4.4
3
+ Version: 2.4.6
4
4
  Summary: ARD reduction for HLA with Python
5
5
  Project-URL: Homepage, https://github.com/nmdp-bioinformatics/py-ard
6
6
  Project-URL: Repository, https://github.com/nmdp-bioinformatics/py-ard
@@ -38,7 +38,7 @@ __all__ = [
38
38
  ]
39
39
 
40
40
  __author__ = """NMDP Bioinformatics"""
41
- __version__ = "2.4.4"
41
+ __version__ = "2.4.6"
42
42
 
43
43
 
44
44
  def init(
@@ -193,6 +193,21 @@ def create_drbx(row, locus_in_allele_name):
193
193
  return drbx.map_drbx(row.values, locus_in_allele_name)
194
194
 
195
195
 
196
+ def update_to_drbx(subject_loci_columns, drbx_loci, subject):
197
+ subject_loci_columns_drbx = {}
198
+ for locus, cols in subject_loci_columns.items():
199
+ if locus in drbx_loci:
200
+ if locus == "DRB3":
201
+ subject_loci_columns_drbx["DRBX"] = [
202
+ f"{subject}_DRBX_1",
203
+ f"{subject}_DRBX_2",
204
+ ]
205
+ else:
206
+ subject_loci_columns_drbx[locus] = cols
207
+
208
+ return subject_loci_columns_drbx
209
+
210
+
196
211
  def reduce_locus_columns(df, ard_config, locus_column_mapping, verbose):
197
212
  reduce_prefix = ard_config.get("reduced_column_prefix", "reduced_")
198
213
  for subject in locus_column_mapping:
@@ -245,6 +260,10 @@ def reduce_locus_columns(df, ard_config, locus_column_mapping, verbose):
245
260
  ):
246
261
  for subject in locus_column_mapping:
247
262
  subject_loci_columns = locus_column_mapping[subject]
263
+ if ard_config.get("map_drb345_to_drbx"):
264
+ subject_loci_columns = update_to_drbx(
265
+ subject_loci_columns, drbx_loci, subject
266
+ )
248
267
  slug_columns = []
249
268
  for locus in subject_loci_columns:
250
269
  slug_column = f"{subject}_{locus}_slug"
@@ -260,6 +279,13 @@ def reduce_locus_columns(df, ard_config, locus_column_mapping, verbose):
260
279
  if ard_config.get("suppress_reduced_locus_column"):
261
280
  df.drop(columns=locus_typ_pair, inplace=True)
262
281
 
282
+ if ard_config.get("map_drb345_to_drbx") and ard_config.get(
283
+ "suppress_reduced_locus_column"
284
+ ):
285
+ subject_loci_columns = locus_column_mapping[subject]
286
+ for locus in drbx_loci:
287
+ df.drop(columns=subject_loci_columns[locus], inplace=True)
288
+
263
289
  if ard_config.get("generate_glstring"):
264
290
  df[subject + "_gl"] = df[slug_columns].agg(
265
291
  lambda slugs: "^".join(slug for slug in slugs if slug), axis=1
@@ -71,7 +71,7 @@ dev = [
71
71
  ]
72
72
 
73
73
  [tool.bumpversion]
74
- current_version = "2.4.4"
74
+ current_version = "2.4.6"
75
75
  commit = true
76
76
  tag = true
77
77
 
@@ -95,6 +95,11 @@ filename = "Makefile"
95
95
  search = "PYARD_VERSION := {current_version}"
96
96
  replace = "PYARD_VERSION := {new_version}"
97
97
 
98
+ [[tool.bumpversion.files]]
99
+ filename = ".github/workflows/docker-ci.yml"
100
+ search = "type=raw,value={current_version}"
101
+ replace = "type=raw,value={new_version}"
102
+
98
103
  [tool.hatch.version]
99
104
  path = "pyard/__init__.py"
100
105
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes