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.
- {py_ard-2.4.3 → py_ard-2.4.4}/PKG-INFO +1 -1
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/__init__.py +1 -1
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/ard.py +1 -1
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/cli/reduce_csv.py +19 -3
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/cli/redux.py +6 -2
- {py_ard-2.4.3 → py_ard-2.4.4}/pyproject.toml +1 -1
- {py_ard-2.4.3 → py_ard-2.4.4}/.gitignore +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/CONTRIBUTING.rst +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/HISTORY.rst +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/LICENSE +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/README.md +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/blender.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/cli/__init__.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/cli/import_db.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/cli/status.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/config.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/constants.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/data_repository.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/db.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/dna_relshp.csv +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/drbx.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/exceptions.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/handlers/__init__.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/handlers/allele_handler.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/handlers/gl_string_processor.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/handlers/hats_handler.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/handlers/mac_handler.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/handlers/serology_handler.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/handlers/shortnull_handler.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/handlers/v2_handler.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/handlers/xx_handler.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/loader/CWD2.csv +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/loader/__init__.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/loader/allele_list.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/loader/cwd.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/loader/g_group.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/loader/mac_codes.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/loader/p_group.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/loader/serology.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/loader/version.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/loader/wmda-data-model.md +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/mappings.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/misc.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/rc.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/reducers/__init__.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/reducers/base_reducer.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/reducers/default_reducer.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/reducers/exon_reducer.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/reducers/first_field_reducer.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/reducers/g_reducer.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/reducers/hats_reducer.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/reducers/lg_reducer.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/reducers/p_reducer.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/reducers/reducer_factory.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/reducers/s_reducer.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/reducers/u2_reducer.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/reducers/w_reducer.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/serology.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/simple_table.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/pyard/smart_sort.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/api-test.hurl +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/environment.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/1f_reduction.feature +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/Gexpand.feature +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/Pexpand.feature +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/Wexpand.feature +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/XX.feature +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/allele.feature +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/cwd.feature +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/drbx.feature +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/drbx_blender.feature +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/glstring.feature +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/mac.feature +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/optional_expression_characters.feature +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/p_g_group.feature +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/p_group.feature +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/serology.feature +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/serology_broad_splits.feature +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/serology_typings_redux.feature +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/shortnulls.feature +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/u2_reduction.feature +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/valid_allele.feature +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/version2.feature +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/features/who.feature +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/steps/XX.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/steps/broad_splits.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/steps/cwd.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/steps/drbx_blender.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/steps/generate_drbx.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/steps/mac.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/steps/redux_allele.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/steps/validate_allele.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/expected-serology.json +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/expected.json +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/handlers/__init__.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/handlers/test_allele_handler.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/handlers/test_gl_string_handler.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/handlers/test_mac_handler.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/handlers/test_serology_handler.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/handlers/test_shortnull_handler.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/handlers/test_v2_handler.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/handlers/test_xx_handler.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/reducers/__init__.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/reducers/test_all_reducers.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/reducers/test_base_reducer.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/reducers/test_default_reducer.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/reducers/test_exon_reducer.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/reducers/test_first_field_reducer.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/reducers/test_g_reducer.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/reducers/test_lg_reducer.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/reducers/test_p_reducer.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/reducers/test_reducer_factory.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/reducers/test_s_reducer.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/reducers/test_u2_reducer.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/reducers/test_w_reducer.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/simple_table/__init__.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/simple_table/test_column.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/simple_table/test_simple_table.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/simple_table/test_simple_table_failures.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/test_cli.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/test_load_allele_list.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/test_load_serology_broad_split_mapping.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/test_load_serology_mappings.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/test_pyard.py +0 -0
- {py_ard-2.4.3 → py_ard-2.4.4}/tests/unit/test_smart_sort.py +0 -0
|
@@ -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"{
|
|
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
|
-
|
|
556
|
-
|
|
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
|
-
|
|
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}"
|
|
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
|
|
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
|
|
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
|