py-ard 2.4.3__tar.gz → 2.4.4__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.3 → py_ard-2.4.4}/PKG-INFO +1 -1
  2. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/__init__.py +1 -1
  3. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/ard.py +1 -1
  4. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/cli/reduce_csv.py +19 -3
  5. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/cli/redux.py +6 -2
  6. {py_ard-2.4.3 → py_ard-2.4.4}/pyproject.toml +1 -1
  7. {py_ard-2.4.3 → py_ard-2.4.4}/.gitignore +0 -0
  8. {py_ard-2.4.3 → py_ard-2.4.4}/CONTRIBUTING.rst +0 -0
  9. {py_ard-2.4.3 → py_ard-2.4.4}/HISTORY.rst +0 -0
  10. {py_ard-2.4.3 → py_ard-2.4.4}/LICENSE +0 -0
  11. {py_ard-2.4.3 → py_ard-2.4.4}/README.md +0 -0
  12. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/blender.py +0 -0
  13. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/cli/__init__.py +0 -0
  14. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/cli/import_db.py +0 -0
  15. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/cli/status.py +0 -0
  16. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/config.py +0 -0
  17. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/constants.py +0 -0
  18. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/data_repository.py +0 -0
  19. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/db.py +0 -0
  20. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/dna_relshp.csv +0 -0
  21. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/drbx.py +0 -0
  22. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/exceptions.py +0 -0
  23. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/handlers/__init__.py +0 -0
  24. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/handlers/allele_handler.py +0 -0
  25. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/handlers/gl_string_processor.py +0 -0
  26. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/handlers/hats_handler.py +0 -0
  27. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/handlers/mac_handler.py +0 -0
  28. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/handlers/serology_handler.py +0 -0
  29. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/handlers/shortnull_handler.py +0 -0
  30. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/handlers/v2_handler.py +0 -0
  31. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/handlers/xx_handler.py +0 -0
  32. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/loader/CWD2.csv +0 -0
  33. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/loader/__init__.py +0 -0
  34. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/loader/allele_list.py +0 -0
  35. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/loader/cwd.py +0 -0
  36. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/loader/g_group.py +0 -0
  37. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/loader/mac_codes.py +0 -0
  38. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/loader/p_group.py +0 -0
  39. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/loader/serology.py +0 -0
  40. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/loader/version.py +0 -0
  41. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/loader/wmda-data-model.md +0 -0
  42. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/mappings.py +0 -0
  43. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/misc.py +0 -0
  44. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/rc.py +0 -0
  45. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/reducers/__init__.py +0 -0
  46. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/reducers/base_reducer.py +0 -0
  47. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/reducers/default_reducer.py +0 -0
  48. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/reducers/exon_reducer.py +0 -0
  49. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/reducers/first_field_reducer.py +0 -0
  50. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/reducers/g_reducer.py +0 -0
  51. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/reducers/hats_reducer.py +0 -0
  52. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/reducers/lg_reducer.py +0 -0
  53. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/reducers/p_reducer.py +0 -0
  54. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/reducers/reducer_factory.py +0 -0
  55. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/reducers/s_reducer.py +0 -0
  56. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/reducers/u2_reducer.py +0 -0
  57. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/reducers/w_reducer.py +0 -0
  58. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/serology.py +0 -0
  59. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/simple_table.py +0 -0
  60. {py_ard-2.4.3 → py_ard-2.4.4}/pyard/smart_sort.py +0 -0
  61. {py_ard-2.4.3 → py_ard-2.4.4}/tests/api-test.hurl +0 -0
  62. {py_ard-2.4.3 → py_ard-2.4.4}/tests/environment.py +0 -0
  63. {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/1f_reduction.feature +0 -0
  64. {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/Gexpand.feature +0 -0
  65. {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/Pexpand.feature +0 -0
  66. {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/Wexpand.feature +0 -0
  67. {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/XX.feature +0 -0
  68. {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/allele.feature +0 -0
  69. {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/cwd.feature +0 -0
  70. {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/drbx.feature +0 -0
  71. {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/drbx_blender.feature +0 -0
  72. {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/glstring.feature +0 -0
  73. {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/mac.feature +0 -0
  74. {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/optional_expression_characters.feature +0 -0
  75. {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/p_g_group.feature +0 -0
  76. {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/p_group.feature +0 -0
  77. {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/serology.feature +0 -0
  78. {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/serology_broad_splits.feature +0 -0
  79. {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/serology_typings_redux.feature +0 -0
  80. {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/shortnulls.feature +0 -0
  81. {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/u2_reduction.feature +0 -0
  82. {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/valid_allele.feature +0 -0
  83. {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/version2.feature +0 -0
  84. {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/who.feature +0 -0
  85. {py_ard-2.4.3 → py_ard-2.4.4}/tests/steps/XX.py +0 -0
  86. {py_ard-2.4.3 → py_ard-2.4.4}/tests/steps/broad_splits.py +0 -0
  87. {py_ard-2.4.3 → py_ard-2.4.4}/tests/steps/cwd.py +0 -0
  88. {py_ard-2.4.3 → py_ard-2.4.4}/tests/steps/drbx_blender.py +0 -0
  89. {py_ard-2.4.3 → py_ard-2.4.4}/tests/steps/generate_drbx.py +0 -0
  90. {py_ard-2.4.3 → py_ard-2.4.4}/tests/steps/mac.py +0 -0
  91. {py_ard-2.4.3 → py_ard-2.4.4}/tests/steps/redux_allele.py +0 -0
  92. {py_ard-2.4.3 → py_ard-2.4.4}/tests/steps/validate_allele.py +0 -0
  93. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/expected-serology.json +0 -0
  94. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/expected.json +0 -0
  95. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/handlers/__init__.py +0 -0
  96. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/handlers/test_allele_handler.py +0 -0
  97. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/handlers/test_gl_string_handler.py +0 -0
  98. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/handlers/test_mac_handler.py +0 -0
  99. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/handlers/test_serology_handler.py +0 -0
  100. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/handlers/test_shortnull_handler.py +0 -0
  101. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/handlers/test_v2_handler.py +0 -0
  102. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/handlers/test_xx_handler.py +0 -0
  103. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/reducers/__init__.py +0 -0
  104. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/reducers/test_all_reducers.py +0 -0
  105. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/reducers/test_base_reducer.py +0 -0
  106. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/reducers/test_default_reducer.py +0 -0
  107. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/reducers/test_exon_reducer.py +0 -0
  108. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/reducers/test_first_field_reducer.py +0 -0
  109. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/reducers/test_g_reducer.py +0 -0
  110. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/reducers/test_lg_reducer.py +0 -0
  111. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/reducers/test_p_reducer.py +0 -0
  112. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/reducers/test_reducer_factory.py +0 -0
  113. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/reducers/test_s_reducer.py +0 -0
  114. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/reducers/test_u2_reducer.py +0 -0
  115. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/reducers/test_w_reducer.py +0 -0
  116. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/simple_table/__init__.py +0 -0
  117. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/simple_table/test_column.py +0 -0
  118. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/simple_table/test_simple_table.py +0 -0
  119. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/simple_table/test_simple_table_failures.py +0 -0
  120. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/test_cli.py +0 -0
  121. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/test_load_allele_list.py +0 -0
  122. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/test_load_serology_broad_split_mapping.py +0 -0
  123. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/test_load_serology_mappings.py +0 -0
  124. {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/test_pyard.py +0 -0
  125. {py_ard-2.4.3 → py_ard-2.4.4}/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.3
3
+ Version: 2.4.4
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.3"
41
+ __version__ = "2.4.4"
42
42
 
43
43
 
44
44
  def init(
@@ -345,7 +345,7 @@ class ARD:
345
345
  if self.config.strict_enabled:
346
346
  return allele in self.ars_mappings.p_group.values()
347
347
  allele = allele[:-1]
348
- elif allele.endswith("g"):
348
+ elif allele.endswith("g"): # noqa: SIM102
349
349
  if not self.config.strict_enabled:
350
350
  allele = allele[:-1]
351
351
 
@@ -385,7 +385,7 @@ def reduce_and_save(
385
385
 
386
386
  # Save as XLSX if specified
387
387
  if ard_config["output_file_format"] == "xlsx":
388
- out_csv_filename = f"{ard_config['out_csv_filename']}.xlsx"
388
+ out_csv_filename = f"{out_csv_filename}.xlsx"
389
389
  df.to_excel(out_csv_filename, index=False)
390
390
  else:
391
391
  # Save as compressed CSV if specified
@@ -479,6 +479,16 @@ def main():
479
479
  dest="ipd_version",
480
480
  help="IPD-IMGT/HLA db to use for redux",
481
481
  )
482
+ parser.add_argument(
483
+ "--input-file",
484
+ dest="input_file",
485
+ help="Input CSV file. Overrides config file",
486
+ )
487
+ parser.add_argument(
488
+ "--output-file",
489
+ dest="output_file",
490
+ help="Output CSV file. Overrides config file",
491
+ )
482
492
  parser.add_argument(
483
493
  "-q",
484
494
  "--quiet",
@@ -552,8 +562,14 @@ def main():
552
562
  config=csv_redux_config,
553
563
  )
554
564
 
555
- in_csv_filename = ard_config["in_csv_filename"]
556
- out_csv_filename = ard_config["out_csv_filename"]
565
+ if args.input_file:
566
+ in_csv_filename = args.input_file
567
+ else:
568
+ in_csv_filename = ard_config["in_csv_filename"]
569
+ if args.output_file:
570
+ out_csv_filename = args.output_file
571
+ else:
572
+ out_csv_filename = ard_config["out_csv_filename"]
557
573
 
558
574
  reduce_and_save(ard, ard_config, in_csv_filename, out_csv_filename, verbose)
559
575
 
@@ -149,6 +149,9 @@ def main():
149
149
  action="store_true",
150
150
  help="Validate the provided GL String",
151
151
  )
152
+ parser.add_argument(
153
+ "--lgx", dest="lgx", action="store_true", help="Perform lgx/ARD redux"
154
+ )
152
155
  parser.add_argument("--cwd", dest="cwd", help="Perform CWD redux")
153
156
  parser.add_argument(
154
157
  "--expand-mac", dest="expand_mac", help="Expand MAC to Allele List"
@@ -246,8 +249,9 @@ def main():
246
249
  parser.print_help()
247
250
  sys.exit(1)
248
251
 
249
- if args.redux_type:
250
- print(ard.redux(args.gl_string, args.redux_type))
252
+ redux_type = "lgx" if args.lgx else args.redux_type
253
+ if redux_type:
254
+ print(ard.redux(args.gl_string, redux_type))
251
255
  else:
252
256
  for redux_type in VALID_REDUCTION_MODES:
253
257
  redux_type_info = f"Reduction Method: {redux_type}"
@@ -71,7 +71,7 @@ dev = [
71
71
  ]
72
72
 
73
73
  [tool.bumpversion]
74
- current_version = "2.4.3"
74
+ current_version = "2.4.4"
75
75
  commit = true
76
76
  tag = true
77
77
 
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