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