Skip to content

Commit

Permalink
Merge pull request #75 from rcsb/dev-dwp
Browse files Browse the repository at this point in the history
V1.22 Adjust BIRD citation method in DictMethodChemRefHelper
  • Loading branch information
piehld authored May 8, 2024
2 parents e7b7679 + b9e39b7 commit 39f5e0e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion HISTORY.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,5 @@
resources for each dataset (via providerTypeExclude)
26-Mar-2024 - V1.20 Add GlyGen annotation 'type' to polymer entity instances, but temporarily turn off loading
Fix incremental update method for NeighborInteractionWorkflow
1-Apr-2024 - V1.21 Turn on GlyGen annotations loading
1-Apr-2024 - V1.21 Turn on GlyGen annotations loading
3-May-2024 - V1.22 Adjust BIRD citation method in DictMethodChemRefHelper
10 changes: 7 additions & 3 deletions rcsb/utils/dictionary/DictMethodChemRefHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# 29-Mar-2023 dwp Correct attribute name '_rcsb_chem_comp_target.provenance_code' to '_rcsb_chem_comp_target.provenance_source'
# 5-Apr-2023 dwp Stop loading rcsb_chem_comp_synonyms for rcsb_chem_comp_synonyms.type 'Brand Name' (to be loaded to new separate data item later)
# 18-Sep-2023 dwp Load COD references separately from CCDC/CSD references
# 3-May-2024 dwp Change BIRD citation method to copy categories instead of just renaming, and only apply to BIRD entries
##
"""
Helper class implements external method references supporting chemical
Expand Down Expand Up @@ -809,12 +810,15 @@ def renameCitationCategory(self, dataContainer, catName, **kwargs):
logger.debug("Starting with %r %r", dataContainer.getName(), catName)
if not (dataContainer.exists("chem_comp") and dataContainer.exists("pdbx_chem_comp_identifier")):
return False
containerName = dataContainer.getName()
if not containerName.upper().startswith("PRD_"):
return False
#
# Rename target categories
# Copy target categories to new name
if dataContainer.exists("citation"):
dataContainer.rename("citation", "rcsb_bird_citation")
dataContainer.copy("citation", "rcsb_bird_citation")
if dataContainer.exists("citation_author"):
dataContainer.rename("citation_author", "rcsb_bird_citation_author")
dataContainer.copy("citation_author", "rcsb_bird_citation_author")
return True
except Exception as e:
logger.exception("For %s failing with %s", catName, str(e))
Expand Down
2 changes: 1 addition & 1 deletion rcsb/utils/dictionary/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
__author__ = "John Westbrook"
__email__ = "[email protected]"
__license__ = "Apache 2.0"
__version__ = "1.21"
__version__ = "1.22"
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
scipy
numpy
mmcif >= 0.75
mmcif >= 0.88.0
rcsb.utils.chemref >= 0.79
rcsb.utils.citation >= 0.16
rcsb.utils.config >= 0.35
Expand Down

0 comments on commit 39f5e0e

Please sign in to comment.