Skip to content

Commit

Permalink
Fix: V0.66 Remove possible redundancy in target reference assignments
Browse files Browse the repository at this point in the history
  • Loading branch information
jdwestbrook committed Aug 14, 2021
1 parent 255ec8b commit 9e341b3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
3 changes: 2 additions & 1 deletion HISTORY.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,5 @@
3-Aug-2021 - V0.63 Add backup option for nonbuildable caches
4-Aug-2021 - V0.64 Update dependencies and logging verbosity
13-Aug-2021 - V0.65 Remove possible redundancy in target cofactor data

13-Aug-2021 - V0.66 Remove possible redundancy in target reference assignments
#
13 changes: 13 additions & 0 deletions rcsb/utils/dictionary/DictMethodEntityHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -1998,7 +1998,12 @@ def buildRelatedTargetReferences(self, dataContainer, catName, **kwargs):
continue
eId = entryId + "_" + entityId
tDL = self.__chemblP.getTargets(eId)
dupD = {}
for tD in tDL:
if tD["query_id"] in dupD:
continue
dupD[tD["query_id"]] = entityId
#
entityBegSeqId = ";".join([str(tD["entity_beg_seq_id"]) for tD in tD["aligned_target"]])
targetBegSeqId = ";".join([str(tD["target_beg_seq_id"]) for tD in tD["aligned_target"]])
alignLength = ";".join([str(tD["length"]) for tD in tD["aligned_target"]])
Expand All @@ -2024,7 +2029,11 @@ def buildRelatedTargetReferences(self, dataContainer, catName, **kwargs):
continue
eId = entryId + "_" + entityId
tDL = self.__dbP.getTargets(eId)
dupD = {}
for tD in tDL:
if tD["query_id"] in dupD:
continue
dupD[tD["query_id"]] = entityId
entityBegSeqId = ";".join([str(tD["entity_beg_seq_id"]) for tD in tD["aligned_target"]])
targetBegSeqId = ";".join([str(tD["target_beg_seq_id"]) for tD in tD["aligned_target"]])
alignLength = ";".join([str(tD["length"]) for tD in tD["aligned_target"]])
Expand All @@ -2050,7 +2059,11 @@ def buildRelatedTargetReferences(self, dataContainer, catName, **kwargs):
continue
eId = entryId + "_" + entityId
tDL = self.__phP.getTargets(eId)
dupD = {}
for tD in tDL:
if tD["query_id"] in dupD:
continue
dupD[tD["query_id"]] = entityId
entityBegSeqId = ";".join([str(tD["entity_beg_seq_id"]) for tD in tD["aligned_target"]])
targetBegSeqId = ";".join([str(tD["target_beg_seq_id"]) for tD in tD["aligned_target"]])
alignLength = ";".join([str(tD["length"]) for tD in tD["aligned_target"]])
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__ = "0.65"
__version__ = "0.66"

0 comments on commit 9e341b3

Please sign in to comment.