Skip to content
Snippets Groups Projects
Commit d71bf9f2 authored by B13nch3n's avatar B13nch3n
Browse files

Always return cifcheck-errors.

parent dd015791
Branches
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ARG VERSION_PYTHON ...@@ -7,7 +7,7 @@ ARG VERSION_PYTHON
ARG VERSION_BASE_IMAGE ARG VERSION_BASE_IMAGE
ARG VERSION_CPP_DICT_PACK="v2.500" ARG VERSION_CPP_DICT_PACK="v2.500"
ARG VERSION_PY_MMCIF="0.76" ARG VERSION_PY_MMCIF="0.79"
## Set up environment ## Set up environment
ENV MMCIF_DICTS_DIR="/usr/local/share/mmcif-dict-suite" \ ENV MMCIF_DICTS_DIR="/usr/local/share/mmcif-dict-suite" \
...@@ -97,7 +97,7 @@ RUN set -e pipefail; \ ...@@ -97,7 +97,7 @@ RUN set -e pipefail; \
gunzip *.gz; \ gunzip *.gz; \
# #
## Fetch the merged ModelCIF dictionary ## Fetch the merged ModelCIF dictionary
if test x${USE_DICT_VERSION} == xlatest; then \ if test x${USE_DICT_VERSION} = xlatest; then \
export _MA_DICT_URL="${_GIT_URL}/dist/mmcif_ma.dic"; \ export _MA_DICT_URL="${_GIT_URL}/dist/mmcif_ma.dic"; \
fi; \ fi; \
curl ${_MA_DICT_URL} -s -L -o mmcif_ma.dic; \ curl ${_MA_DICT_URL} -s -L -o mmcif_ma.dic; \
......
[[_TOC_]]
# ModelCIF validation tool # ModelCIF validation tool
This is a tool to check that the formatting of ModelCIF files complies with the ModelCIF format declaration (aka "dictionary"). Upon successful validation, a ModelCIF file can be extended with the dictionary version the file was compared to (option [`--extend-validated-file`](#add-validation-dictionary-to-ModelCIF-file)). For more basic mmCIF validation, the dictionary of the underlying PDBx/mmCIF format is also available. This is a tool to check that the formatting of [ModelCIF](https://mmcif.wwpdb.org/dictionaries/mmcif_ma.dic/Index/) files complies with the ModelCIF format declaration (aka "dictionary"). Upon successful validation, a ModelCIF file can be extended with the dictionary version the file was compared to (option [`--extend-validated-file`](#add-dictionary-information-used-for-validation-to-modelcIF-file)). For more basic [mmCIF](https://mmcif.wwpdb.org) validation, the dictionary of the underlying [PDBx/mmCIF](https://mmcif.wwpdb.org/dictionaries/mmcif_pdbx_v50.dic/Index/) format is also available.
The easiest way to run validation is from Docker container. The easiest way to run validation is from [Docker](https://www.docker.com) container.
The tool itself is a wrapper around the [`CifCheck`](https://github.com/rcsb/cpp-dict-pack) tool by [RCSB](https://www.rcsb.org/). The tool itself is a wrapper around the [`CifCheck`](https://github.com/rcsb/cpp-dict-pack) tool by [RCSB](https://www.rcsb.org/).
[[_TOC_]]
## How to run the validation tool ## How to run the validation tool
This is just a description of the validation tool itself. When running it from inside a container, the command needs to be prefixed with the instructions to start the container. Find information for running the validation container in "[How to run the container](#how-to-run-the-container)". This is just a description of the [validation tool](./validate-mmcif-file.py) itself. When running it from inside a container, the command needs to be prefixed with the instructions to start the container. Find information for running the validation Docker container in "[How to run the container](#how-to-run-the-container)".
Upon completion, if there hasn't been any error running the command, the validation tool returns a concise report in JSON format. That output is meant to be input to a website or any kind of nicely formatted report. Output can also be stored as a file. If the tested ModelCIF file is fully compliant with the ModelCIF format, the JSON output has Upon completion, if there hasn't been any error running the command, the validation tool returns a concise report in [JSON](https://www.json.org/json-en.html) format. That output is meant to be input to a website or any kind of nicely formatted report. Output can also be stored as a JSON formatted file. If the tested ModelCIF file is fully compliant with the ModelCIF format, the JSON output has
- `status` "completed" - `status` "completed"
- no messages in the `diagnosis` list - no messages in the `diagnosis` list
......
...@@ -476,6 +476,7 @@ class _CifCheck: ...@@ -476,6 +476,7 @@ class _CifCheck:
"""Run CifCheck for a given file and catch the output. """Run CifCheck for a given file and catch the output.
Returns False if the CifCheck execution itself failed.""" Returns False if the CifCheck execution itself failed."""
self.check_results["cifcheck-errors"] = []
try: try:
format_errors = self._execute(cif_file) format_errors = self._execute(cif_file)
except _CifCheckFailedError as exc: except _CifCheckFailedError as exc:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment