Skip to content

Commit 3c09d37

Browse files
committed
changed warning message, added info about deprecating a crystal
1 parent 161e189 commit 3c09d37

File tree

4 files changed

+22
-4
lines changed

4 files changed

+22
-4
lines changed

USER-GUIDE.md

+16
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,22 @@ XCA looks for all `LINK` records, selects only those involving the relevant liga
345345
example) and grafts the protein atom onto the ligand for each record (of course, usually there will only be a single
346346
one for each ligand).
347347

348+
#### Overriding status
349+
350+
There is a mechanism to manually override the status of any crystal. Typically you would use this to deprecate a crystal
351+
that had previously been included, but you now want to exclude from analysis in Fragalysis. To do this add a section like
352+
this at the top level of your `config.yaml` file:
353+
354+
```yaml
355+
overrides:
356+
crystals:
357+
A71EV2A-x0202:
358+
status: deprecated
359+
status_reason: bad karma
360+
```
361+
362+
That example would mark the crystal `A71EV2A-x0202` as being of `deprecated` status.
363+
348364
### 2.3. The assemblies YAML
349365

350366
This file specifies both the biological *assemblies* and *crystalforms* relative to some reference PDBs.

src/xchemalign/aligner.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -718,9 +718,10 @@ def _perform_alignments(self, meta):
718718
+ ligand_residue
719719
+ ' in crystal '
720720
+ dtag
721-
+ '. '
722-
+ 'Maybe this is caused by the ligand residue number changing between versions. '
723-
+ 'If you can\'t correct this then add this crystal to the \`excludes\` list.'
721+
+ '. One cause for this is the ligand residue number changing between versions;'
722+
+ ' if it\'s not that, the cause might be even more obscure.'
723+
+ ' Talk to a developer, and good luck.'
724+
+ ' If you can\'t correct this then you can add this crystal to the \`exclude\` list.'
724725
)
725726
self._log_error(msg)
726727
exit(1)

src/xchemalign/collator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,7 @@ def _munge_history(self, meta):
12121212
new_or_updated_xtals = {}
12131213

12141214
# get any user defined overrides
1215-
overrides = self.config.get("overrides", {})
1215+
overrides = self.config.get(Constants.CONFIG_OVERRIDES, {})
12161216

12171217
count = 0
12181218
for metad in self.meta_history:

src/xchemalign/utils.py

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ class Constants:
6262
CONFIG_CODE_PREFIX = 'code_prefix'
6363
CONFIG_CODE_PREFIX_TOOLTIP = 'code_prefix_tooltip'
6464
CONFIG_PANDDAS_EVENT_FILES = "panddas_event_files"
65+
CONFIG_OVERRIDES = "overrides"
6566
META_RUN_ON = "run_on"
6667
META_INPUT_DIRS = "input_dirs"
6768
META_VERSION_NUM = "version_number"

0 commit comments

Comments
 (0)