rcsb.exdb 1.31__py3-none-any.whl → 1.33__py3-none-any.whl
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/exdb/tree/TreeNodeListWorker.py +72 -49
- {rcsb_exdb-1.31.dist-info → rcsb_exdb-1.33.dist-info}/METADATA +2 -2
- {rcsb_exdb-1.31.dist-info → rcsb_exdb-1.33.dist-info}/RECORD +5 -42
- rcsb/exdb/tests/TEST-EXDB-CLI-EXEC.sh +0 -19
- rcsb/exdb/tests/TEST-EXDB-CLI-REFSEQ-EXEC.sh +0 -12
- rcsb/exdb/tests/__init__.py +0 -0
- rcsb/exdb/tests/fixtureDictMethodResourceProvider.py +0 -104
- rcsb/exdb/tests/fixturePdbxLoader.py +0 -298
- rcsb/exdb/tests/test-data/components-abbrev.cif +0 -2739
- rcsb/exdb/tests/test-data/prdcc-abbrev.cif +0 -9171
- rcsb/exdb/tests/testAnnotationExtractor.py +0 -79
- rcsb/exdb/tests/testBranchedEntityExtractor.py +0 -81
- rcsb/exdb/tests/testChemRefLoader.py +0 -106
- rcsb/exdb/tests/testChemRefMappingProvider.py +0 -95
- rcsb/exdb/tests/testCitationAdapter.py +0 -97
- rcsb/exdb/tests/testCitationExtractor.py +0 -93
- rcsb/exdb/tests/testCitationUtils.py +0 -92
- rcsb/exdb/tests/testEntryInfoEtlWorkflow.py +0 -70
- rcsb/exdb/tests/testEntryInfoProvider.py +0 -97
- rcsb/exdb/tests/testGlycanEtlWorkflow.py +0 -70
- rcsb/exdb/tests/testGlycanProvider.py +0 -98
- rcsb/exdb/tests/testGlycanUtils.py +0 -64
- rcsb/exdb/tests/testLigandNeighborMappingProvider.py +0 -90
- rcsb/exdb/tests/testObjectExtractor.py +0 -342
- rcsb/exdb/tests/testObjectTransformer.py +0 -83
- rcsb/exdb/tests/testObjectUpdater.py +0 -120
- rcsb/exdb/tests/testPolymerEntityExtractor.py +0 -93
- rcsb/exdb/tests/testPubChemDataCacheProvider.py +0 -124
- rcsb/exdb/tests/testPubChemEtlWorkflow.py +0 -134
- rcsb/exdb/tests/testPubChemEtlWrapper.py +0 -155
- rcsb/exdb/tests/testPubChemIndexCacheProvider.py +0 -123
- rcsb/exdb/tests/testReferenceSequenceAnnotationAdapter.py +0 -106
- rcsb/exdb/tests/testReferenceSequenceAssignmentAdapter.py +0 -121
- rcsb/exdb/tests/testReferenceSequenceAssignmentAdapterValidate.py +0 -122
- rcsb/exdb/tests/testReferenceSequenceAssignmentProvider.py +0 -117
- rcsb/exdb/tests/testReferenceSequenceCacheProvider.py +0 -94
- rcsb/exdb/tests/testTaxonomyExtractor.py +0 -75
- rcsb/exdb/tests/testTreeNodeListWorker.py +0 -111
- rcsb/exdb/tests/testUniProtCoreEtlWorker.py +0 -99
- rcsb/exdb/tests/testUniProtExtractor.py +0 -77
- {rcsb_exdb-1.31.dist-info → rcsb_exdb-1.33.dist-info}/WHEEL +0 -0
- {rcsb_exdb-1.31.dist-info → rcsb_exdb-1.33.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
##
|
|
2
|
-
# File: UniProtCoreEtlWorkerTests.py
|
|
3
|
-
# Author: J. Westbrook
|
|
4
|
-
# Date: 9-Dec-2018
|
|
5
|
-
#
|
|
6
|
-
# Updates:
|
|
7
|
-
#
|
|
8
|
-
##
|
|
9
|
-
"""
|
|
10
|
-
Tests for loading UniProt core collection
|
|
11
|
-
|
|
12
|
-
"""
|
|
13
|
-
|
|
14
|
-
__docformat__ = "google en"
|
|
15
|
-
__author__ = "John Westbrook"
|
|
16
|
-
__email__ = "jwest@rcsb.rutgers.edu"
|
|
17
|
-
__license__ = "Apache 2.0"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
import logging
|
|
21
|
-
import os
|
|
22
|
-
import platform
|
|
23
|
-
import resource
|
|
24
|
-
import time
|
|
25
|
-
import unittest
|
|
26
|
-
|
|
27
|
-
from rcsb.exdb.seq.UniProtCoreEtlWorker import UniProtCoreEtlWorker
|
|
28
|
-
from rcsb.utils.config.ConfigUtil import ConfigUtil
|
|
29
|
-
|
|
30
|
-
logging.basicConfig(level=logging.INFO, format="%(asctime)s [%(levelname)s]-%(module)s.%(funcName)s: %(message)s")
|
|
31
|
-
logger = logging.getLogger()
|
|
32
|
-
|
|
33
|
-
HERE = os.path.abspath(os.path.dirname(__file__))
|
|
34
|
-
TOPDIR = os.path.dirname(os.path.dirname(os.path.dirname(HERE)))
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
class UniProtCoreEtlWorkerTests(unittest.TestCase):
|
|
38
|
-
def __init__(self, methodName="runTest"):
|
|
39
|
-
super(UniProtCoreEtlWorkerTests, self).__init__(methodName)
|
|
40
|
-
self.__verbose = True
|
|
41
|
-
|
|
42
|
-
def setUp(self):
|
|
43
|
-
#
|
|
44
|
-
#
|
|
45
|
-
self.__mockTopPath = os.path.join(TOPDIR, "rcsb", "mock-data")
|
|
46
|
-
configPath = os.path.join(TOPDIR, "rcsb", "mock-data", "config", "dbload-setup-example.yml")
|
|
47
|
-
configName = "site_info_configuration"
|
|
48
|
-
self.__cfgOb = ConfigUtil(configPath=configPath, defaultSectionName=configName, mockTopPath=self.__mockTopPath)
|
|
49
|
-
self.__cachePath = os.path.join(TOPDIR, "CACHE")
|
|
50
|
-
#
|
|
51
|
-
# sample data set
|
|
52
|
-
self.__updateId = "2018_23"
|
|
53
|
-
#
|
|
54
|
-
self.__startTime = time.time()
|
|
55
|
-
logger.debug("Starting %s at %s", self.id(), time.strftime("%Y %m %d %H:%M:%S", time.localtime()))
|
|
56
|
-
|
|
57
|
-
def tearDown(self):
|
|
58
|
-
unitS = "MB" if platform.system() == "Darwin" else "GB"
|
|
59
|
-
rusageMax = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss
|
|
60
|
-
logger.info("Maximum resident memory size %.4f %s", rusageMax / 10 ** 6, unitS)
|
|
61
|
-
endTime = time.time()
|
|
62
|
-
logger.info("Completed %s at %s (%.4f seconds)", self.id(), time.strftime("%Y %m %d %H:%M:%S", time.localtime()), endTime - self.__startTime)
|
|
63
|
-
|
|
64
|
-
@unittest.skip("Disable test - deprecated")
|
|
65
|
-
def testLoadUniProtCore(self):
|
|
66
|
-
"""Test case - load UniProt core collection reference data -"""
|
|
67
|
-
try:
|
|
68
|
-
uw = UniProtCoreEtlWorker(self.__cfgOb, self.__cachePath)
|
|
69
|
-
ok = uw.load(self.__updateId, extResource="UniProt", loadType="full")
|
|
70
|
-
#
|
|
71
|
-
self.assertTrue(ok)
|
|
72
|
-
except Exception as e:
|
|
73
|
-
logger.exception("Failing with %s", str(e))
|
|
74
|
-
self.fail()
|
|
75
|
-
|
|
76
|
-
@unittest.skip("Disable test - deprecated")
|
|
77
|
-
def testValidateUniProtCore(self):
|
|
78
|
-
"""Test case - validate UniProt core collection reference data -"""
|
|
79
|
-
try:
|
|
80
|
-
uw = UniProtCoreEtlWorker(self.__cfgOb, self.__cachePath, doValidate=True)
|
|
81
|
-
ok = uw.load(self.__updateId, extResource="UniProt", loadType="full")
|
|
82
|
-
#
|
|
83
|
-
self.assertTrue(ok)
|
|
84
|
-
except Exception as e:
|
|
85
|
-
logger.exception("Failing with %s", str(e))
|
|
86
|
-
self.fail()
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
def uniProtCoreEtlWorkerSuite():
|
|
90
|
-
suiteSelect = unittest.TestSuite()
|
|
91
|
-
suiteSelect.addTest(UniProtCoreEtlWorkerTests("testLoadUniProtCore"))
|
|
92
|
-
suiteSelect.addTest(UniProtCoreEtlWorkerTests("testValidateUniProtCore"))
|
|
93
|
-
return suiteSelect
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
if __name__ == "__main__":
|
|
97
|
-
#
|
|
98
|
-
mySuite = uniProtCoreEtlWorkerSuite()
|
|
99
|
-
unittest.TextTestRunner(verbosity=2).run(mySuite)
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
##
|
|
2
|
-
# File: UniProtExtractorTests.py
|
|
3
|
-
# Author: J. Westbrook
|
|
4
|
-
# Date: 5-Dec-2020
|
|
5
|
-
#
|
|
6
|
-
# Updates:
|
|
7
|
-
#
|
|
8
|
-
##
|
|
9
|
-
"""
|
|
10
|
-
Tests for extraction of UniProt reference sequence details from the ExDB UniProt collection.
|
|
11
|
-
"""
|
|
12
|
-
__docformat__ = "google en"
|
|
13
|
-
__author__ = "John Westbrook"
|
|
14
|
-
__email__ = "jwest@rcsb.rutgers.edu"
|
|
15
|
-
__license__ = "Apache 2.0"
|
|
16
|
-
|
|
17
|
-
import logging
|
|
18
|
-
import os
|
|
19
|
-
import platform
|
|
20
|
-
import resource
|
|
21
|
-
import time
|
|
22
|
-
import unittest
|
|
23
|
-
|
|
24
|
-
from rcsb.exdb.seq.UniProtExtractor import UniProtExtractor
|
|
25
|
-
from rcsb.utils.config.ConfigUtil import ConfigUtil
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
logging.basicConfig(level=logging.INFO, format="%(asctime)s [%(levelname)s]-%(module)s.%(funcName)s: %(message)s")
|
|
29
|
-
logger = logging.getLogger()
|
|
30
|
-
|
|
31
|
-
HERE = os.path.abspath(os.path.dirname(__file__))
|
|
32
|
-
TOPDIR = os.path.dirname(os.path.dirname(os.path.dirname(HERE)))
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
class UniProtExtractorTests(unittest.TestCase):
|
|
36
|
-
def __init__(self, methodName="runTest"):
|
|
37
|
-
super(UniProtExtractorTests, self).__init__(methodName)
|
|
38
|
-
self.__verbose = True
|
|
39
|
-
|
|
40
|
-
def setUp(self):
|
|
41
|
-
#
|
|
42
|
-
self.__mockTopPath = os.path.join(TOPDIR, "rcsb", "mock-data")
|
|
43
|
-
configPath = os.path.join(TOPDIR, "rcsb", "mock-data", "config", "dbload-setup-example.yml")
|
|
44
|
-
configName = "site_info_configuration"
|
|
45
|
-
self.__cfgOb = ConfigUtil(configPath=configPath, defaultSectionName=configName, mockTopPath=self.__mockTopPath)
|
|
46
|
-
#
|
|
47
|
-
#
|
|
48
|
-
self.__startTime = time.time()
|
|
49
|
-
logger.debug("Starting %s at %s", self.id(), time.strftime("%Y %m %d %H:%M:%S", time.localtime()))
|
|
50
|
-
|
|
51
|
-
def tearDown(self):
|
|
52
|
-
unitS = "MB" if platform.system() == "Darwin" else "GB"
|
|
53
|
-
rusageMax = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss
|
|
54
|
-
logger.info("Maximum resident memory size %.4f %s", rusageMax / 10 ** 6, unitS)
|
|
55
|
-
endTime = time.time()
|
|
56
|
-
logger.info("Completed %s at %s (%.4f seconds)", self.id(), time.strftime("%Y %m %d %H:%M:%S", time.localtime()), endTime - self.__startTime)
|
|
57
|
-
|
|
58
|
-
def testGetUniProtDetails(self):
|
|
59
|
-
"""Test case - get UniProt reference sequences and essential details"""
|
|
60
|
-
try:
|
|
61
|
-
uEx = UniProtExtractor(self.__cfgOb)
|
|
62
|
-
unpD = uEx.getReferenceSequenceDetails()
|
|
63
|
-
logger.info("UniProt count %d", len(unpD))
|
|
64
|
-
except Exception as e:
|
|
65
|
-
logger.exception("Failing with %s", str(e))
|
|
66
|
-
self.fail()
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
def extractorSuite():
|
|
70
|
-
suiteSelect = unittest.TestSuite()
|
|
71
|
-
suiteSelect.addTest(UniProtExtractorTests("testGetGoIds"))
|
|
72
|
-
return suiteSelect
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
if __name__ == "__main__":
|
|
76
|
-
mySuite = extractorSuite()
|
|
77
|
-
unittest.TextTestRunner(verbosity=2).run(mySuite)
|
|
File without changes
|
|
File without changes
|