From 412e6d0e255a38e5b2168f2bedb6c2cdc9709470 Mon Sep 17 00:00:00 2001 From: Arthur Zalevsky Date: Tue, 10 Sep 2024 16:30:47 -0700 Subject: [PATCH] Workaround for the entries with problematic crosslinking-ms dataset layout --- ihm_validation/mmcif_io.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/ihm_validation/mmcif_io.py b/ihm_validation/mmcif_io.py index 96ab3749..e93d4151 100644 --- a/ihm_validation/mmcif_io.py +++ b/ihm_validation/mmcif_io.py @@ -750,8 +750,24 @@ def get_dataset_details(self) -> dict: acc1 = 'PDB ID: ' + acc dataset_comp['Details'].append(acc1) elif isinstance(i, ihm.dataset.CXMSDataset): - acc1 = self.get_dataset_xl_info(i._id) - dataset_comp['Details'].append(acc1) + details_ = '' + + if acc != utility.NA: + details_ += f'ID: {acc}; ' + + try: + acc1 = self.get_dataset_xl_info(i._id) + except (ValueError, IndexError): + acc1 = utility.NA + + if acc1 != utility.NA: + details_ += acc1 + + if acc == acc1 == utility.NA: + details_ = utility.NA + + dataset_comp['Details'].append(details_) + elif 'EMDB' in str(i.__class__.__name__): acc1 = 'EMDB ID: ' + acc dataset_comp['Details'].append(acc1)