From 01195fa19c4466fe77013061facd3f8702b0405d Mon Sep 17 00:00:00 2001 From: B13nch3n <b13nch3n_01@theb-si.de> Date: Mon, 17 Oct 2022 17:26:04 +0200 Subject: [PATCH] Only merge PAE fiels on validation --- validation/validate-mmcif-file.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/validation/validate-mmcif-file.py b/validation/validate-mmcif-file.py index 94ddd44..c82178c 100755 --- a/validation/validate-mmcif-file.py +++ b/validation/validate-mmcif-file.py @@ -263,15 +263,22 @@ def _get_associated_files(model_cif_file, assoc_dir): if dat_cat is None: continue idxs = _get_indeces( - dat_cat, ["archive_file_id", "file_format", "file_path"] + dat_cat, + ["archive_file_id", "file_content", "file_format", "file_path"], ) for row in dat_cat: if row[idxs["file_format"]] == "cif": - arc_id = row[idxs["archive_file_id"]] - arc_file = archives[arc_id][0] - cif_file = row[idxs["file_path"]] - data = _unzip_arc_cif(arc_file, cif_file, assoc_dir) - assoc_files.append((data, archives[arc_id][1])) + if row[idxs["file_content"]] == "local pairwise QA scores": + arc_id = row[idxs["archive_file_id"]] + arc_file = archives[arc_id][0] + cif_file = row[idxs["file_path"]] + data = _unzip_arc_cif(arc_file, cif_file, assoc_dir) + assoc_files.append((data, archives[arc_id][1])) + elif row[idxs["file_content"]] not in ["other"]: + raise RuntimeError( + "Unknown associated CIF file content " + + f"found: {row[idxs['file_content']]}" + ) return assoc_files, mdl_cif, entry_id_map -- GitLab