wwpdb.apps.seqmodule 0.27.1__tar.gz → 0.27.2__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.
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/PKG-INFO +1 -1
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/__init__.py +1 -1
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/io/FetchSeqInfoUtils.py +84 -47
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/update/UpdatePolymerEntityPartitions.py +0 -1
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/util/FetchReferenceSequenceUtils.py +17 -23
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb.apps.seqmodule.egg-info/PKG-INFO +1 -1
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/README.md +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/setup.cfg +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/setup.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/__init__.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/__init__.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/align/AlignmentBackEndEditingTools.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/align/AlignmentDepictionTools.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/align/AlignmentExport.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/align/AlignmentFrontEndUIEditor.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/align/AlignmentStatistics.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/align/AlignmentStatisticsTests.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/align/AlignmentToolUtils.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/align/AlignmentTools.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/align/__init__.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/control/DataImporter.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/control/SequenceDataAssembleExample.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/control/SequenceDataAssembleTests.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/control/SequenceDataAssemble_v2.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/control/SequenceDataPrepTests.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/control/SummaryViewDepiction.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/control/SummaryViewTests.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/control/SummaryView_v2.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/control/__init__.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/io/AlignmentDataStore.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/io/BlastPlusReader.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/io/ModelSequenceUtils.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/io/ModelSequenceUtilsTests.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/io/PdbxIoUtils.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/io/SequenceDataExportTests.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/io/SequenceDataExport_v2.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/io/SequenceDataStore.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/io/SequenceDataStoreTests.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/io/SequenceEditStore.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/io/SequenceEditStoreTests.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/io/TaxonomyDbUtils.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/io/TaxonomyUtils.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/io/TaxonomyUtilsTests.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/io/__init__.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/io/testAuto.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/link/PolymerLinkageDepict.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/link/__init__.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/update/UpdatePolymerEntityReference_v2.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/update/UpdatePolymerEntitySourceDetails.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/update/__init__.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/util/Autodict.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/util/GetSameSeqAnnotationWithTaxIdOnly.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/util/LocalBlastSearchUtils.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/util/MultiProcLimit.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/util/SearchEntityPolySeqs.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/util/SeqReferenceSearchUtils.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/util/SequenceAssign.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/util/SequenceExamples.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/util/SequenceFeatureDepict.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/util/SequenceLabel.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/util/SequenceReferenceData.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/util/UpdateSequenceDataStoreUtils.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/util/__init__.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/view3d/ModelViewer3D.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/view3d/__init__.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/webapp/SeqModWebApp_v2.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/webapp/SeqModWebRequest.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/webapp/__init__.py +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb.apps.seqmodule.egg-info/SOURCES.txt +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb.apps.seqmodule.egg-info/dependency_links.txt +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb.apps.seqmodule.egg-info/not-zip-safe +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb.apps.seqmodule.egg-info/requires.txt +0 -0
- {wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb.apps.seqmodule.egg-info/top_level.txt +0 -0
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
# 29-Sep-2022 zf Added input 'begin' & 'end' values checking from idTupleList in fetchUniProt() method.
|
|
22
22
|
# 11-Nov-2022 zf Create FetchSeqInfoUtils class with fetchUniProt(), fetchNcbiGi(), fetchNcbiSummary(), and getRefInfo() methods.
|
|
23
23
|
# getRefInfo() method is moved from FetchReferenceSequenceUtils.__getRefInfo() method.
|
|
24
|
+
# 2-Jun-2024 zf Added persistent objects self.__resultDicts & self.__multiResultDicts. Fixed the bug related to missing start & end sequence numbers.
|
|
24
25
|
##
|
|
25
26
|
"""
|
|
26
27
|
Utility methods to retrieve information from NCBI & Uniprot databases
|
|
@@ -54,6 +55,8 @@ class FetchSeqInfoUtils(object):
|
|
|
54
55
|
if not self.__srd:
|
|
55
56
|
self.__srd = SequenceReferenceData(self.__verbose, self.__lfh)
|
|
56
57
|
#
|
|
58
|
+
self.__resultDicts = {}
|
|
59
|
+
self.__multiResultDicts = {}
|
|
57
60
|
|
|
58
61
|
def getRefInfo(self, dbName, dbAccession, dbIsoform, start, end, addMissingKeyFlag=True):
|
|
59
62
|
"""Fetch sequence data from Uniprot or GeneBank database.
|
|
@@ -115,54 +118,72 @@ class FetchSeqInfoUtils(object):
|
|
|
115
118
|
"""
|
|
116
119
|
if idTupleList is None:
|
|
117
120
|
idTupleList = []
|
|
121
|
+
#
|
|
118
122
|
d = {}
|
|
119
123
|
if not idTupleList:
|
|
120
124
|
return d
|
|
121
125
|
#
|
|
122
126
|
idCodeList = []
|
|
127
|
+
foundCache = False
|
|
123
128
|
for idTuple in idTupleList:
|
|
129
|
+
if idTuple[0] in self.__resultDicts:
|
|
130
|
+
foundCache = True
|
|
131
|
+
continue
|
|
132
|
+
#
|
|
124
133
|
if idTuple[0] not in idCodeList:
|
|
125
134
|
idCodeList.append(idTuple[0])
|
|
126
135
|
#
|
|
127
136
|
#
|
|
128
|
-
if not idCodeList:
|
|
137
|
+
if (not foundCache) and (not idCodeList):
|
|
129
138
|
return d
|
|
130
139
|
#
|
|
131
|
-
|
|
132
|
-
ok = fobj.fetchList(idCodeList)
|
|
133
|
-
if filePath is not None:
|
|
134
|
-
fobj.writeUnpXml(filePath)
|
|
140
|
+
self.__fetchUniProtXmlFile(idCodeList, filePath)
|
|
135
141
|
#
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
142
|
+
# filter any redundant annotations --
|
|
143
|
+
#
|
|
144
|
+
for idTuple in idTupleList:
|
|
145
|
+
if idTuple[0] not in self.__resultDicts:
|
|
146
|
+
continue
|
|
140
147
|
#
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
148
|
+
vd = self.__resultDicts[idTuple[0]]
|
|
149
|
+
seqLength = 0
|
|
150
|
+
if ("sequence" in vd) and vd["sequence"] and (len(vd["sequence"]) > 1):
|
|
151
|
+
seqLength = len(vd["sequence"])
|
|
152
|
+
#
|
|
153
|
+
if (idTuple[0] in self.__multiResultDicts) and self.__multiResultDicts[idTuple[0]]:
|
|
154
|
+
try:
|
|
155
|
+
idTuple1 = int(idTuple[1])
|
|
156
|
+
except: # noqa: E722 pylint: disable=bare-except
|
|
157
|
+
idTuple1 = 0
|
|
158
|
+
#
|
|
159
|
+
try:
|
|
160
|
+
idTuple2 = int(idTuple[2])
|
|
161
|
+
except: # noqa: E722 pylint: disable=bare-except
|
|
162
|
+
idTuple2 = 0
|
|
144
163
|
#
|
|
145
|
-
|
|
164
|
+
if ((idTuple1 == 0) or (idTuple2 == 0)) and (seqLength > 1):
|
|
165
|
+
idTuple1 = 1
|
|
166
|
+
idTuple2 = seqLength
|
|
146
167
|
#
|
|
147
|
-
|
|
148
|
-
|
|
168
|
+
found = False
|
|
169
|
+
if (idTuple1 > 0) and (idTuple2 > 0) and (idTuple1 <= idTuple2):
|
|
149
170
|
diff = -1
|
|
150
|
-
for retD in
|
|
151
|
-
if ("begin" not in retD) or ("end" not in retD) or (
|
|
152
|
-
(
|
|
171
|
+
for retD in self.__multiResultDicts[idTuple[0]]:
|
|
172
|
+
if ("begin" not in retD) or ("end" not in retD) or (idTuple1 and (idTuple1 < retD["begin"])) or \
|
|
173
|
+
(idTuple2 and (idTuple2 > retD["end"])):
|
|
153
174
|
continue
|
|
154
175
|
#
|
|
155
176
|
if diff == -1:
|
|
156
177
|
found = True
|
|
157
178
|
vd = retD
|
|
158
179
|
try:
|
|
159
|
-
diff = (int(
|
|
180
|
+
diff = (int(idTuple1) - int(retD["begin"])) + (int(retD["end"]) - int(idTuple2))
|
|
160
181
|
except: # noqa: E722 pylint: disable=bare-except
|
|
161
182
|
pass
|
|
162
183
|
#
|
|
163
184
|
else:
|
|
164
185
|
try:
|
|
165
|
-
diff1 = (int(
|
|
186
|
+
diff1 = (int(idTuple1) - int(retD["begin"])) + (int(retD["end"]) - int(idTuple2))
|
|
166
187
|
if diff1 < diff:
|
|
167
188
|
diff = diff1
|
|
168
189
|
vd = retD
|
|
@@ -172,40 +193,40 @@ class FetchSeqInfoUtils(object):
|
|
|
172
193
|
#
|
|
173
194
|
#
|
|
174
195
|
#
|
|
175
|
-
if (not found) and ("all" in multiResultDicts[idTuple[0]][-1]) and (multiResultDicts[idTuple[0]][-1]["all"] == "yes"):
|
|
176
|
-
vd = multiResultDicts[idTuple[0]][-1]
|
|
177
|
-
#
|
|
178
196
|
#
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
197
|
+
if (not found) and ("all" in self.__multiResultDicts[idTuple[0]][-1]) and (self.__multiResultDicts[idTuple[0]][-1]["all"] == "yes"):
|
|
198
|
+
vd = self.__multiResultDicts[idTuple[0]][-1]
|
|
199
|
+
#
|
|
200
|
+
#
|
|
201
|
+
for k in vd.keys():
|
|
202
|
+
if k in ["ec", "comments", "synonyms"]:
|
|
203
|
+
v = vd[k]
|
|
204
|
+
oL = []
|
|
205
|
+
tL = v.split(",")
|
|
206
|
+
for it in tL:
|
|
207
|
+
sV = str(it).strip()
|
|
208
|
+
if k == "ec":
|
|
209
|
+
sVL = sV.split(".")
|
|
210
|
+
oL1 = []
|
|
211
|
+
for s1 in sVL:
|
|
212
|
+
if str(s1).startswith("n"):
|
|
213
|
+
oL1.append("-")
|
|
214
|
+
else:
|
|
215
|
+
oL1.append(s1)
|
|
195
216
|
#
|
|
196
|
-
sV = ".".join(oL1)
|
|
197
|
-
#
|
|
198
|
-
if sV in oL:
|
|
199
|
-
continue
|
|
200
|
-
else:
|
|
201
|
-
oL.append(sV)
|
|
202
217
|
#
|
|
218
|
+
sV = ".".join(oL1)
|
|
219
|
+
#
|
|
220
|
+
if sV in oL:
|
|
221
|
+
continue
|
|
222
|
+
else:
|
|
223
|
+
oL.append(sV)
|
|
203
224
|
#
|
|
204
|
-
vd[k] = ",".join(oL)
|
|
205
225
|
#
|
|
226
|
+
vd[k] = ",".join(oL)
|
|
206
227
|
#
|
|
207
|
-
d[idTuple] = vd
|
|
208
228
|
#
|
|
229
|
+
d[idTuple] = vd
|
|
209
230
|
#
|
|
210
231
|
return d
|
|
211
232
|
|
|
@@ -255,3 +276,19 @@ class FetchSeqInfoUtils(object):
|
|
|
255
276
|
#
|
|
256
277
|
#
|
|
257
278
|
return myD
|
|
279
|
+
|
|
280
|
+
def __fetchUniProtXmlFile(self, idCodeList=[], filePath=None):
|
|
281
|
+
""" Fetch Uniprot Xml File
|
|
282
|
+
"""
|
|
283
|
+
if not idCodeList:
|
|
284
|
+
return;
|
|
285
|
+
#
|
|
286
|
+
fobj = FetchUnpXml(verbose=self.__verbose, log=self.__lfh)
|
|
287
|
+
ok = fobj.fetchList(idCodeList)
|
|
288
|
+
if filePath is not None:
|
|
289
|
+
fobj.writeUnpXml(filePath)
|
|
290
|
+
#
|
|
291
|
+
if ok:
|
|
292
|
+
self.__resultDicts.update(fobj.getResult())
|
|
293
|
+
self.__multiResultDicts.update(fobj.getMultipleResultDict())
|
|
294
|
+
#
|
|
@@ -375,7 +375,6 @@ class UpdatePolymerEntityPartitions(object):
|
|
|
375
375
|
dbIsoform = dbAccession
|
|
376
376
|
dbAcc = tL[0]
|
|
377
377
|
#
|
|
378
|
-
fetchUtil.reset()
|
|
379
378
|
fetchErr, refFeatureDict, _refSeqList = fetchUtil.fetchReferenceSequence("UNP", dbAcc, dbIsoform, polyTypeCode="AA",
|
|
380
379
|
refSeqBeg=dbSeqBegin, refSeqEnd=dbSeqEnd)
|
|
381
380
|
#
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
# 3-Oct-2022 zf update fetchReferenceSequenceWithSeqMatch() methods for better handling author provided reference sequence cases.
|
|
7
7
|
# add runSeqAlignment() & __toList() methods
|
|
8
8
|
# 11-Nov-2022 zf move __getRefInfo() method to FetchSeqInfoUtils class.
|
|
9
|
-
#
|
|
9
|
+
# 2-Jun-2024 zf add persistent object self.__fetchSeqUtil.
|
|
10
10
|
##
|
|
11
11
|
"""
|
|
12
12
|
Methods to get reference sequence data from reference database based database name and identifier.
|
|
@@ -40,27 +40,22 @@ class FetchReferenceSequenceUtils(object):
|
|
|
40
40
|
self.__accCode = ""
|
|
41
41
|
self.__refInfoD = {}
|
|
42
42
|
#
|
|
43
|
-
self.
|
|
44
|
-
|
|
45
|
-
def reset(self):
|
|
46
|
-
self.__accCode = ""
|
|
47
|
-
self.__refInfoD = {}
|
|
43
|
+
self.__fetchSeqUtil = FetchSeqInfoUtils(siteId=self.__siteId, seqReferenceData=self.__srd, verbose=self.__verbose, log=self.__lfh)
|
|
48
44
|
|
|
49
45
|
def fetchReferenceSequence(self, dbName, dbAccession, dbIsoform, polyTypeCode="AA", refSeqBeg=None, refSeqEnd=None):
|
|
50
|
-
"""return error message, sequence feature dictionary, sequence list
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
self.__accCode, self.__refInfoD = fetchSeqUtil.getRefInfo(dbName, dbAccession, dbIsoform, start, end)
|
|
46
|
+
"""return error message, sequence feature dictionary, sequence list
|
|
47
|
+
"""
|
|
48
|
+
try:
|
|
49
|
+
start = int(str(refSeqBeg))
|
|
50
|
+
except: # noqa: E722 pylint: disable=bare-except
|
|
51
|
+
start = 0
|
|
52
|
+
#
|
|
53
|
+
try:
|
|
54
|
+
end = int(str(refSeqEnd))
|
|
55
|
+
except: # noqa: E722 pylint: disable=bare-except
|
|
56
|
+
end = 0
|
|
57
|
+
#
|
|
58
|
+
self.__accCode, self.__refInfoD = self.__fetchSeqUtil.getRefInfo(dbName, dbAccession, dbIsoform, start, end)
|
|
64
59
|
#
|
|
65
60
|
if (not self.__refInfoD) or ("sequence" not in self.__refInfoD):
|
|
66
61
|
error = "Fetch reference sequence [ dbName=" + dbName + ", Accession=" + self.__accCode + "] failed."
|
|
@@ -137,12 +132,11 @@ class FetchReferenceSequenceUtils(object):
|
|
|
137
132
|
dbAccession = tL[0]
|
|
138
133
|
#
|
|
139
134
|
#
|
|
140
|
-
|
|
141
|
-
self.__accCode, self.__refInfoD = fetchSeqUtil.getRefInfo(dbName, dbAccession, dbIsoform, 0, 0)
|
|
135
|
+
self.__accCode, self.__refInfoD = self.__fetchSeqUtil.getRefInfo(dbName, dbAccession, dbIsoform, 0, 0)
|
|
142
136
|
#
|
|
143
137
|
if (not self.__refInfoD) or ("sequence" not in self.__refInfoD) or (not self.__refInfoD["sequence"]):
|
|
144
138
|
if dbCode:
|
|
145
|
-
self.__accCode, self.__refInfoD =
|
|
139
|
+
self.__accCode, self.__refInfoD = self.__fetchSeqUtil.getRefInfo(dbName, dbCode, "", 0, 0)
|
|
146
140
|
if (not self.__refInfoD) or ("sequence" not in self.__refInfoD) or (not self.__refInfoD["sequence"]):
|
|
147
141
|
return False, {}
|
|
148
142
|
#
|
|
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
|
{wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/align/__init__.py
RENAMED
|
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
|
{wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/control/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/io/PdbxIoUtils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/io/TaxonomyUtils.py
RENAMED
|
File without changes
|
|
File without changes
|
{wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/io/__init__.py
RENAMED
|
File without changes
|
{wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/io/testAuto.py
RENAMED
|
File without changes
|
|
File without changes
|
{wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/link/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/update/__init__.py
RENAMED
|
File without changes
|
{wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/util/Autodict.py
RENAMED
|
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
|
{wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/util/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/view3d/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wwpdb.apps.seqmodule-0.27.1 → wwpdb_apps_seqmodule-0.27.2}/wwpdb/apps/seqmodule/webapp/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|