rcsb.workflow 0.43__tar.gz → 0.45__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rcsb_workflow-0.43 → rcsb_workflow-0.45}/HISTORY.txt +2 -0
- {rcsb_workflow-0.43/rcsb.workflow.egg-info → rcsb_workflow-0.45}/PKG-INFO +7 -7
- {rcsb_workflow-0.43 → rcsb_workflow-0.45}/rcsb/workflow/chem/__init__.py +1 -1
- {rcsb_workflow-0.43 → rcsb_workflow-0.45}/rcsb/workflow/targets/ProteinTargetSequenceExecutionWorkflow.py +11 -0
- {rcsb_workflow-0.43 → rcsb_workflow-0.45}/rcsb/workflow/targets/ProteinTargetSequenceWorkflow.py +61 -9
- {rcsb_workflow-0.43 → rcsb_workflow-0.45/rcsb.workflow.egg-info}/PKG-INFO +7 -7
- rcsb_workflow-0.45/rcsb.workflow.egg-info/requires.txt +13 -0
- rcsb_workflow-0.45/requirements.txt +8 -0
- rcsb_workflow-0.43/rcsb.workflow.egg-info/requires.txt +0 -13
- rcsb_workflow-0.43/requirements.txt +0 -8
- {rcsb_workflow-0.43 → rcsb_workflow-0.45}/LICENSE +0 -0
- {rcsb_workflow-0.43 → rcsb_workflow-0.45}/MANIFEST.in +0 -0
- {rcsb_workflow-0.43 → rcsb_workflow-0.45}/README.md +0 -0
- {rcsb_workflow-0.43 → rcsb_workflow-0.45}/rcsb/__init__.py +0 -0
- {rcsb_workflow-0.43 → rcsb_workflow-0.45}/rcsb/workflow/__init__.py +0 -0
- {rcsb_workflow-0.43 → rcsb_workflow-0.45}/rcsb/workflow/chem/ChemCompFileWorkflow.py +0 -0
- {rcsb_workflow-0.43 → rcsb_workflow-0.45}/rcsb/workflow/chem/ChemCompImageWorkflow.py +0 -0
- {rcsb_workflow-0.43 → rcsb_workflow-0.45}/rcsb/workflow/chem/ChemCompSearchIndexWorkflow.py +0 -0
- {rcsb_workflow-0.43 → rcsb_workflow-0.45}/rcsb/workflow/targets/__init__.py +0 -0
- {rcsb_workflow-0.43 → rcsb_workflow-0.45}/rcsb.workflow.egg-info/SOURCES.txt +0 -0
- {rcsb_workflow-0.43 → rcsb_workflow-0.45}/rcsb.workflow.egg-info/dependency_links.txt +0 -0
- {rcsb_workflow-0.43 → rcsb_workflow-0.45}/rcsb.workflow.egg-info/not-zip-safe +0 -0
- {rcsb_workflow-0.43 → rcsb_workflow-0.45}/rcsb.workflow.egg-info/top_level.txt +0 -0
- {rcsb_workflow-0.43 → rcsb_workflow-0.45}/setup.cfg +0 -0
- {rcsb_workflow-0.43 → rcsb_workflow-0.45}/setup.py +0 -0
|
@@ -35,3 +35,5 @@
|
|
|
35
35
|
Reduce resource footprint for Azure tests;
|
|
36
36
|
Make CARDTargetOntologyProvider stashable on Buildlocker
|
|
37
37
|
21-May-2024 - V0.43 Fix pylinting
|
|
38
|
+
20-Aug-2024 - V0.44 Add step for loading target cofactor data to MongoDB
|
|
39
|
+
27-Aug-2024 - V0.45 Update usage of CARDTargetOntologyProvider
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: rcsb.workflow
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.45
|
|
4
4
|
Summary: RCSB Python data processing and ETL/ELT workflow entry points
|
|
5
5
|
Home-page: https://github.com/rcsb/py-rcsb_workflow
|
|
6
6
|
Author: John Westbrook
|
|
@@ -16,12 +16,12 @@ Classifier: Programming Language :: Python :: 3.8
|
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
17
|
License-File: LICENSE
|
|
18
18
|
Requires-Dist: OpenEye-toolkits>=2020.2.2
|
|
19
|
-
Requires-Dist: rcsb.utils.chem>=0.
|
|
20
|
-
Requires-Dist: rcsb.utils.seq>=0.
|
|
21
|
-
Requires-Dist: rcsb.utils.targets>=0.
|
|
22
|
-
Requires-Dist: rcsb.utils.seqalign>=0.
|
|
23
|
-
Requires-Dist: rcsb.exdb>=
|
|
24
|
-
Requires-Dist: rcsb.utils.io>=1.
|
|
19
|
+
Requires-Dist: rcsb.utils.chem>=0.79
|
|
20
|
+
Requires-Dist: rcsb.utils.seq>=0.82
|
|
21
|
+
Requires-Dist: rcsb.utils.targets>=0.82
|
|
22
|
+
Requires-Dist: rcsb.utils.seqalign>=0.29
|
|
23
|
+
Requires-Dist: rcsb.exdb>=1.23
|
|
24
|
+
Requires-Dist: rcsb.utils.io>=1.48
|
|
25
25
|
Provides-Extra: dev
|
|
26
26
|
Requires-Dist: check-manifest; extra == "dev"
|
|
27
27
|
Provides-Extra: test
|
|
@@ -219,6 +219,17 @@ class ProteinTargetSequenceExecutionWorkflow(object):
|
|
|
219
219
|
logger.exception("Failing with %s", str(e))
|
|
220
220
|
return ok
|
|
221
221
|
|
|
222
|
+
def loadTargetCofactorData(self):
|
|
223
|
+
"""Load target cofactor data from search results"""
|
|
224
|
+
logger.info("Running loadTargetCofactorData...")
|
|
225
|
+
ok = False
|
|
226
|
+
try:
|
|
227
|
+
ptsW = ProteinTargetSequenceWorkflow(self.__cfgOb, self.__cachePath)
|
|
228
|
+
ok = ptsW.loadTargetCofactorData(resourceNameList=["chembl", "pharos", "drugbank"])
|
|
229
|
+
except Exception as e:
|
|
230
|
+
logger.exception("Failing with %s", str(e))
|
|
231
|
+
return ok
|
|
232
|
+
|
|
222
233
|
#
|
|
223
234
|
# --- --- --- ---
|
|
224
235
|
|
{rcsb_workflow-0.43 → rcsb_workflow-0.45}/rcsb/workflow/targets/ProteinTargetSequenceWorkflow.py
RENAMED
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
# 1-Jun-2023 aae Don't back up resources to GitHub during cache update workflows
|
|
16
16
|
# 12-Jun-2023 dwp Set useTaxonomy filter to False for CARD annotations
|
|
17
17
|
# 6-Jul-2023 aae Don't overwrite Buildlocker files if there is no data
|
|
18
|
+
# 20-Aug-2024 dwp Add step for loading target cofactor data to MongoDB
|
|
19
|
+
# 27-Aug-2024 dwp Update usage of CARDTargetOntologyProvider
|
|
18
20
|
##
|
|
19
21
|
__docformat__ = "google en"
|
|
20
22
|
__author__ = "John Westbrook"
|
|
@@ -304,7 +306,7 @@ class ProteinTargetSequenceWorkflow(object):
|
|
|
304
306
|
)
|
|
305
307
|
#
|
|
306
308
|
if taxonPath and mU.exists(taxonPath):
|
|
307
|
-
mL = mmS.getMatchResults(rawPath, taxonPath, useTaxonomy=True, misMatchCutoff=-1, sequenceIdentityCutoff=identityCutoff, useBitScore=useBitScore)
|
|
309
|
+
mL = mmS.getMatchResults(rawPath, taxonPath, useTaxonomy=True, useTaxonomyCache=True, misMatchCutoff=-1, sequenceIdentityCutoff=identityCutoff, useBitScore=useBitScore)
|
|
308
310
|
else:
|
|
309
311
|
mL = mmS.getMatchResults(rawPath, None, useTaxonomy=False, misMatchCutoff=-1, sequenceIdentityCutoff=identityCutoff, useBitScore=useBitScore)
|
|
310
312
|
logger.info("Query sequences with matches %r (%d) bitScore filter (%r)", resourceName, len(mL), useBitScore)
|
|
@@ -320,7 +322,7 @@ class ProteinTargetSequenceWorkflow(object):
|
|
|
320
322
|
|
|
321
323
|
Args:
|
|
322
324
|
referenceResourceName (str): reference resource name (e.g., pdbprent)
|
|
323
|
-
resourceNameList (list, optional): list of data resources. Defaults to ["sabdab", "card"].
|
|
325
|
+
resourceNameList (list, optional): list of data resources. Defaults to ["sabdab", "card", "imgt"].
|
|
324
326
|
useTaxonomy (bool, optional): use taxonomy in filtering selections where implemented (e.g., card). Defaults to True.
|
|
325
327
|
backup (bool, optional): backup results to stash storage. Defaults to False.
|
|
326
328
|
remotePrefix (str, optional): channel prefix for stash storage. Defaults to None.
|
|
@@ -328,7 +330,7 @@ class ProteinTargetSequenceWorkflow(object):
|
|
|
328
330
|
Returns:
|
|
329
331
|
bool: True for success or False otherwise
|
|
330
332
|
"""
|
|
331
|
-
resourceNameList = resourceNameList if resourceNameList else ["sabdab", "card"]
|
|
333
|
+
resourceNameList = resourceNameList if resourceNameList else ["sabdab", "card", "imgt"]
|
|
332
334
|
retOk = True
|
|
333
335
|
for resourceName in resourceNameList:
|
|
334
336
|
startTime = time.time()
|
|
@@ -358,17 +360,18 @@ class ProteinTargetSequenceWorkflow(object):
|
|
|
358
360
|
okB = fP.backup(self.__cfgOb, self.__configName, remotePrefix=remotePrefix, useStash=True, useGit=False)
|
|
359
361
|
logger.info("%r features backup status (%r)", resourceName, okB)
|
|
360
362
|
elif resourceName == "card":
|
|
363
|
+
fP = CARDTargetOntologyProvider(cachePath=self.__cachePath, useCache=True)
|
|
364
|
+
ok = fP.buildOntologyData()
|
|
365
|
+
fP.reload()
|
|
366
|
+
if ok and backup and fP.testCache():
|
|
367
|
+
okB = fP.backup(self.__cfgOb, self.__configName, remotePrefix=remotePrefix, useStash=True, useGit=False)
|
|
368
|
+
logger.info("%r ontology backup status (%r)", resourceName, okB)
|
|
361
369
|
fP = CARDTargetAnnotationProvider(cachePath=self.__cachePath, useCache=True)
|
|
362
370
|
ok = fP.buildAnnotationList(resultPath, useTaxonomy=useTaxonomy)
|
|
363
371
|
fP.reload()
|
|
364
372
|
if ok and backup and fP.testCache():
|
|
365
373
|
okB = fP.backup(self.__cfgOb, self.__configName, remotePrefix=remotePrefix, useStash=True, useGit=False)
|
|
366
374
|
logger.info("%r annotations backup status (%r)", resourceName, okB)
|
|
367
|
-
fP = CARDTargetOntologyProvider(cachePath=self.__cachePath, useCache=False)
|
|
368
|
-
ok = fP.reload()
|
|
369
|
-
if ok and backup and fP.testCache():
|
|
370
|
-
okB = fP.backup(self.__cfgOb, self.__configName, remotePrefix=remotePrefix, useStash=True, useGit=False)
|
|
371
|
-
logger.info("%r ontology backup status (%r)", resourceName, okB)
|
|
372
375
|
elif resourceName == "imgt":
|
|
373
376
|
fP = IMGTTargetFeatureProvider(cachePath=self.__cachePath, useCache=True)
|
|
374
377
|
ok = fP.buildFeatureList(useCache=True)
|
|
@@ -490,7 +493,7 @@ class ProteinTargetSequenceWorkflow(object):
|
|
|
490
493
|
crmpObj = ChemRefMappingProvider(cachePath=self.__cachePath, useCache=True)
|
|
491
494
|
lnmpObj = LigandNeighborMappingProvider(cachePath=self.__cachePath, useCache=True)
|
|
492
495
|
|
|
493
|
-
okB = True
|
|
496
|
+
ok = okB = True
|
|
494
497
|
resultPath = self.__getFilteredSearchResultPath(resourceName, referenceResourceName)
|
|
495
498
|
#
|
|
496
499
|
if resourceName == "chembl":
|
|
@@ -528,6 +531,55 @@ class ProteinTargetSequenceWorkflow(object):
|
|
|
528
531
|
logger.exception("Failing with %s", str(e))
|
|
529
532
|
return False
|
|
530
533
|
|
|
534
|
+
def loadTargetCofactorData(self, resourceNameList=None):
|
|
535
|
+
"""Load target cofactor data to MongoDB.
|
|
536
|
+
|
|
537
|
+
Args:
|
|
538
|
+
resourceNameList (list, optional): list of data resources. Defaults to ["pharos", "chembl"].
|
|
539
|
+
|
|
540
|
+
Returns:
|
|
541
|
+
bool: True for success or False otherwise
|
|
542
|
+
"""
|
|
543
|
+
resourceNameList = resourceNameList if resourceNameList else ["chembl", "pharos", "drugbank"]
|
|
544
|
+
retOk = True
|
|
545
|
+
for resourceName in resourceNameList:
|
|
546
|
+
startTime = time.time()
|
|
547
|
+
ok = self.__loadTargetCofactorData(resourceName)
|
|
548
|
+
logger.info(
|
|
549
|
+
"Completed loading target cofactor data for %s (status %r) at %s (%.4f seconds)",
|
|
550
|
+
resourceName,
|
|
551
|
+
ok,
|
|
552
|
+
time.strftime("%Y %m %d %H:%M:%S", time.localtime()),
|
|
553
|
+
time.time() - startTime,
|
|
554
|
+
)
|
|
555
|
+
retOk = retOk and ok
|
|
556
|
+
#
|
|
557
|
+
return retOk
|
|
558
|
+
|
|
559
|
+
def __loadTargetCofactorData(self, resourceName):
|
|
560
|
+
"""Load cofactor data inferred from sequence comparison results to MongoDB."""
|
|
561
|
+
try:
|
|
562
|
+
ok = okLoad = False
|
|
563
|
+
aP = None
|
|
564
|
+
#
|
|
565
|
+
if resourceName == "chembl":
|
|
566
|
+
aP = ChEMBLTargetCofactorProvider(cachePath=self.__cachePath, useCache=True)
|
|
567
|
+
elif resourceName == "pharos":
|
|
568
|
+
aP = PharosTargetCofactorProvider(cachePath=self.__cachePath, useCache=True, useStash=True, useGit=True)
|
|
569
|
+
elif resourceName == "drugbank":
|
|
570
|
+
aP = DrugBankTargetCofactorProvider(cachePath=self.__cachePath, useCache=True)
|
|
571
|
+
#
|
|
572
|
+
ok = aP.reload()
|
|
573
|
+
logger.info("%r cofactor data reload status (%r)", resourceName, ok)
|
|
574
|
+
#
|
|
575
|
+
if ok and aP.testCache():
|
|
576
|
+
okLoad = aP.loadCofactorData(cfgOb=self.__cfgOb)
|
|
577
|
+
|
|
578
|
+
return ok and okLoad
|
|
579
|
+
except Exception as e:
|
|
580
|
+
logger.exception("Failing with %s", str(e))
|
|
581
|
+
return False
|
|
582
|
+
|
|
531
583
|
def __getDatabasePath(self):
|
|
532
584
|
return os.path.join(self.__cachePath, "sequence-databases")
|
|
533
585
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: rcsb.workflow
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.45
|
|
4
4
|
Summary: RCSB Python data processing and ETL/ELT workflow entry points
|
|
5
5
|
Home-page: https://github.com/rcsb/py-rcsb_workflow
|
|
6
6
|
Author: John Westbrook
|
|
@@ -16,12 +16,12 @@ Classifier: Programming Language :: Python :: 3.8
|
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
17
|
License-File: LICENSE
|
|
18
18
|
Requires-Dist: OpenEye-toolkits>=2020.2.2
|
|
19
|
-
Requires-Dist: rcsb.utils.chem>=0.
|
|
20
|
-
Requires-Dist: rcsb.utils.seq>=0.
|
|
21
|
-
Requires-Dist: rcsb.utils.targets>=0.
|
|
22
|
-
Requires-Dist: rcsb.utils.seqalign>=0.
|
|
23
|
-
Requires-Dist: rcsb.exdb>=
|
|
24
|
-
Requires-Dist: rcsb.utils.io>=1.
|
|
19
|
+
Requires-Dist: rcsb.utils.chem>=0.79
|
|
20
|
+
Requires-Dist: rcsb.utils.seq>=0.82
|
|
21
|
+
Requires-Dist: rcsb.utils.targets>=0.82
|
|
22
|
+
Requires-Dist: rcsb.utils.seqalign>=0.29
|
|
23
|
+
Requires-Dist: rcsb.exdb>=1.23
|
|
24
|
+
Requires-Dist: rcsb.utils.io>=1.48
|
|
25
25
|
Provides-Extra: dev
|
|
26
26
|
Requires-Dist: check-manifest; extra == "dev"
|
|
27
27
|
Provides-Extra: test
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|