From 292b2e8480a36282a836747455307115b55e854f Mon Sep 17 00:00:00 2001 From: B13nch3n <b13nch3n_01@theb-si.de> Date: Sat, 7 May 2022 21:02:13 +0200 Subject: [PATCH] Explain associated dirs --- validation/README.md | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/validation/README.md b/validation/README.md index 93ea398..224ec96 100644 --- a/validation/README.md +++ b/validation/README.md @@ -51,10 +51,39 @@ $ validate-mmcif-file model.cif -e $ ``` -### Associated files... +### Base directory for associated files + +For a ModelCIF file using the `_ma_entry_associated_files` category, the validation tool tries to merge associated data into the ModelCIF file, if `_ma_entry_associated_files.file_format` is `cif`. That way the outsourced data is validated, too. + +Command line argument `--associates-dir` (`-a`) is used to declare the base directory associated files are stored in. Inside the directory, the path must follow what is defined in `_ma_entry_associated_files.file_url`. If the URL is just the file name, the file must be stored right in the associates directory. The following example works for `_ma_entry_associated_files.file_url model_pae.cif` + +```bash +$ grep _ma_entry_associated_files.file_url model.cif +_ma_entry_associated_files.file_url model_pae.cif +$ ls extra +model_pae.cif +$ validate-mmcif-file -a extra model.cif +{"status":"completed","diagnosis":[],"versions":[{"title":"mmcif_pdbx_v50.dic","version":"5.358","location":"https://raw.githubusercontent.com/ihmwg/ModelCIF/a24fcfa8d6c3ceb4b6f0676bcc341ac0cd24ff1f/base/mmcif_pdbx_v50.dic"},{"title":"mmcif_ma.dic","version":"1.4.0","location":"https://raw.githubusercontent.com/ihmwg/ModelCIF/a24fcfa8d6c3ceb4b6f0676bcc341ac0cd24ff1f/dist/mmcif_ma.dic"}]} +$ +``` + +If the URL points to a subdirectory, that must be reflected by the associates directory declared to the validation tool. The following example illustrates that the `extra` directory needs a `pae` directory storing the associated file as expected by `_ma_entry_associated_files.file_url`: + +```bash +$ grep _ma_entry_associated_files.file_url model.cif +_ma_entry_associated_files.file_url pae/model_pae.cif +$ ls extra +pae +$ ls extra/pae +model_pae.cif +$ validate-mmcif-file -a extra model.cif +{"status":"completed","diagnosis":[],"versions":[{"title":"mmcif_pdbx_v50.dic","version":"5.358","location":"https://raw.githubusercontent.com/ihmwg/ModelCIF/a24fcfa8d6c3ceb4b6f0676bcc341ac0cd24ff1f/base/mmcif_pdbx_v50.dic"},{"title":"mmcif_ma.dic","version":"1.4.0","location":"https://raw.githubusercontent.com/ihmwg/ModelCIF/a24fcfa8d6c3ceb4b6f0676bcc341ac0cd24ff1f/dist/mmcif_ma.dic"}]} +$ +``` + + - basic usage -- add version of dict validated against - remaining options ## How to run the container @@ -65,5 +94,7 @@ $ # Files in this directory -<!-- LocalWords: PDBx ModelCIF TOC JSON CifCheck RCSB mmcif cif pdbx dic +<!-- LocalWords: PDBx ModelCIF TOC JSON CifCheck RCSB mmcif cif pdbx dic dir +<!-- LocalWords: url pae + --> --> -- GitLab