wwpdb.apps.seqmodule 0.26.8__tar.gz → 0.27.0__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.26.8 → wwpdb.apps.seqmodule-0.27.0}/PKG-INFO +1 -1
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/__init__.py +1 -1
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/align/AlignmentBackEndEditingTools.py +1 -1
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/align/AlignmentDepictionTools.py +6 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/control/SequenceDataAssemble_v2.py +3 -80
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/update/UpdatePolymerEntityPartitions.py +28 -15
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/util/FetchReferenceSequenceUtils.py +2 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/util/LocalBlastSearchUtils.py +13 -9
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb.apps.seqmodule.egg-info/PKG-INFO +1 -1
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/README.md +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/setup.cfg +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/setup.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/__init__.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/__init__.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/align/AlignmentExport.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/align/AlignmentFrontEndUIEditor.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/align/AlignmentStatistics.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/align/AlignmentStatisticsTests.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/align/AlignmentToolUtils.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/align/AlignmentTools.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/align/__init__.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/control/DataImporter.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/control/SequenceDataAssembleExample.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/control/SequenceDataAssembleTests.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/control/SequenceDataPrepTests.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/control/SummaryViewDepiction.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/control/SummaryViewTests.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/control/SummaryView_v2.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/control/__init__.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/io/AlignmentDataStore.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/io/BlastPlusReader.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/io/FetchSeqInfoUtils.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/io/ModelSequenceUtils.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/io/ModelSequenceUtilsTests.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/io/PdbxIoUtils.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/io/SequenceDataExportTests.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/io/SequenceDataExport_v2.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/io/SequenceDataStore.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/io/SequenceDataStoreTests.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/io/SequenceEditStore.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/io/SequenceEditStoreTests.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/io/TaxonomyDbUtils.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/io/TaxonomyUtils.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/io/TaxonomyUtilsTests.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/io/__init__.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/io/testAuto.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/link/PolymerLinkageDepict.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/link/__init__.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/update/UpdatePolymerEntityReference_v2.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/update/UpdatePolymerEntitySourceDetails.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/update/__init__.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/util/Autodict.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/util/GetSameSeqAnnotationWithTaxIdOnly.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/util/MultiProcLimit.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/util/SearchEntityPolySeqs.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/util/SeqReferenceSearchUtils.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/util/SequenceAssign.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/util/SequenceExamples.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/util/SequenceFeatureDepict.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/util/SequenceLabel.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/util/SequenceReferenceData.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/util/UpdateSequenceDataStoreUtils.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/util/__init__.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/view3d/ModelViewer3D.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/view3d/__init__.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/webapp/SeqModWebApp_v2.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/webapp/SeqModWebRequest.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/webapp/__init__.py +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb.apps.seqmodule.egg-info/SOURCES.txt +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb.apps.seqmodule.egg-info/dependency_links.txt +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb.apps.seqmodule.egg-info/not-zip-safe +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb.apps.seqmodule.egg-info/requires.txt +0 -0
- {wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb.apps.seqmodule.egg-info/top_level.txt +0 -0
|
@@ -385,7 +385,7 @@ class AlignmentBackEndEditingTools(AlignmentTools):
|
|
|
385
385
|
sFeature.setAuthRefAlignDetails(
|
|
386
386
|
seqLen=len(newSeqList), alignLen=int(alignLength), seqSim=float(numMatch) / float(alignLength), seqSimWithGaps=float(numMatchGaps) / float(alignLength)
|
|
387
387
|
)
|
|
388
|
-
sFeature.setAuthRefAlignRange(refMatchBegin=matchBeg, refMatchEnd=matchEnd)
|
|
388
|
+
sFeature.setAuthRefAlignRange(refMatchBegin=matchBeg, refMatchEnd=matchEnd)
|
|
389
389
|
#
|
|
390
390
|
if nextVersionFlag:
|
|
391
391
|
self.setFeature(sFeature.get(), seqType, seqInstId, seqPartId, seqAltId, nextVersion)
|
|
@@ -527,6 +527,8 @@ class AlignmentDepictionTools(AlignmentBackEndEditingTools):
|
|
|
527
527
|
self.__annotationDict["mutationOrig"] = featureObj.getEntityMutationDetailsOrig()
|
|
528
528
|
self.__annotationDict["description"] = featureObj.getEntityDescription()
|
|
529
529
|
self.__annotationDict["descriptionOrig"] = featureObj.getEntityDescriptionOrig()
|
|
530
|
+
self.__annotationDict["details"] = featureObj.getEntityDetails()
|
|
531
|
+
self.__annotationDict["detailsOrig"] = featureObj.getEntityDetailsOrig()
|
|
530
532
|
self.__annotationDict["source_method"] = featureObj.getEntityDescriptionOrig()
|
|
531
533
|
#
|
|
532
534
|
fp = open(htmlFilePath, "w")
|
|
@@ -540,6 +542,10 @@ class AlignmentDepictionTools(AlignmentBackEndEditingTools):
|
|
|
540
542
|
fp.write("<td><b>Mutation</b></td>")
|
|
541
543
|
fp.write("<td>%s</td>" % self.__annotationDict["mutation"])
|
|
542
544
|
fp.write("<td>%s</td>" % self.__annotationDict["mutationOrig"])
|
|
545
|
+
fp.write("</tr><tr>")
|
|
546
|
+
fp.write("<td><b>Entity details</b></td>")
|
|
547
|
+
fp.write("<td>%s</td>" % self.__annotationDict["details"])
|
|
548
|
+
fp.write("<td>%s</td>" % self.__annotationDict["detailsOrig"])
|
|
543
549
|
fp.write("</tr>")
|
|
544
550
|
fp.write("</table>")
|
|
545
551
|
fp.close()
|
|
@@ -113,7 +113,8 @@ class SequenceDataAssemble(UpdateSequenceDataStoreUtils):
|
|
|
113
113
|
self.__doRefSearchFlag = doRefSearch
|
|
114
114
|
#
|
|
115
115
|
if self._verbose:
|
|
116
|
-
self._lfh.write("\n+SequenceDataAssemble.doAssemble() STARTING with depId %r calPolyLink %r doRefSearch %r\n" %
|
|
116
|
+
self._lfh.write("\n+SequenceDataAssemble.doAssemble() STARTING with depId %r calPolyLink %r doRefSearch %r doAutoProcess %r\n" %
|
|
117
|
+
(self.__dataSetId, calPolyLink, doRefSearch, doAutoProcess))
|
|
117
118
|
#
|
|
118
119
|
pdbxFilePath = self.__pI.getModelPdbxFilePath(self.__dataSetId, fileSource="session", versionId="1")
|
|
119
120
|
polyLinkPath = self.__pI.getFilePath(self.__dataSetId, contentType="polymer-linkage-distances", formatType="json", fileSource="session")
|
|
@@ -720,10 +721,8 @@ class SequenceDataAssemble(UpdateSequenceDataStoreUtils):
|
|
|
720
721
|
#
|
|
721
722
|
return {}, {}, {}
|
|
722
723
|
#
|
|
723
|
-
# refD,ownRefD,otherRefD = self.__runSeqAllSearches(entityTupList)
|
|
724
|
-
#
|
|
725
724
|
if withRefFlag and (len(entityTupList) == 1):
|
|
726
|
-
seqSearchUtil = LocalBlastSearchUtils(siteId=self.__siteId, sessionPath=self.__sessionPath, pathInfo=self.__pI,
|
|
725
|
+
seqSearchUtil = LocalBlastSearchUtils(siteId=self.__siteId, sessionPath=self.__sessionPath, pathInfo=self.__pI,
|
|
727
726
|
doRefSearchFlag=self.__doRefSearchFlag, verbose=self._verbose, log=self._lfh)
|
|
728
727
|
predefinedRefD = seqSearchUtil.getPredefinedRefSequence(dataSetId=self.__dataSetId, entityD=entityTupList[0][1])
|
|
729
728
|
if predefinedRefD:
|
|
@@ -811,82 +810,6 @@ class SequenceDataAssemble(UpdateSequenceDataStoreUtils):
|
|
|
811
810
|
#
|
|
812
811
|
return {}, {}, {}
|
|
813
812
|
|
|
814
|
-
# def __runSeqAllSearches(self, entityTupList):
|
|
815
|
-
# """Perform all searches of the reference sequences"""
|
|
816
|
-
# try:
|
|
817
|
-
# startTime = time.time()
|
|
818
|
-
# #
|
|
819
|
-
# if self.__cI.get("USE_COMPUTE_CLUSTER"):
|
|
820
|
-
# numProc = len(entityTupList)
|
|
821
|
-
# else:
|
|
822
|
-
# numProc = int(multiprocessing.cpu_count() / 2)
|
|
823
|
-
# mpu = MultiProcUtil(verbose=True)
|
|
824
|
-
# mpu.set(workerObj=self, workerMethod="runMultiReferenceSearches")
|
|
825
|
-
# mpu.setWorkingDir(self.__sessionPath)
|
|
826
|
-
# #
|
|
827
|
-
# # Setup limits for NCBI requets
|
|
828
|
-
# apikey = self.__cI.get("NCBI_API_KEY")
|
|
829
|
-
# apirate = self.__cI.get("NCBI_API_RATE")
|
|
830
|
-
# if apikey:
|
|
831
|
-
# if apirate:
|
|
832
|
-
# rate = int(apirate)
|
|
833
|
-
# else:
|
|
834
|
-
# rate = 5
|
|
835
|
-
# #
|
|
836
|
-
# else:
|
|
837
|
-
# rate = 1
|
|
838
|
-
# #
|
|
839
|
-
# mpl = MultiProcLimit(rate)
|
|
840
|
-
# mpu.setOptions({"ncbilock": mpl})
|
|
841
|
-
# #
|
|
842
|
-
# _ok, _failList, retLists, _diagList = mpu.runMulti(dataList=entityTupList, numProc=numProc, numResults=1)
|
|
843
|
-
# #
|
|
844
|
-
# refD = {}
|
|
845
|
-
# ownRefD = {}
|
|
846
|
-
# otherRefD = {}
|
|
847
|
-
# for tupList in retLists:
|
|
848
|
-
# for tup in tupList:
|
|
849
|
-
# if tup[1]:
|
|
850
|
-
# refD[tup[0]] = tup[1]
|
|
851
|
-
# #
|
|
852
|
-
# if tup[2]:
|
|
853
|
-
# ownRefD[tup[0]] = tup[2]
|
|
854
|
-
# #
|
|
855
|
-
# if tup[3]:
|
|
856
|
-
# otherRefD[tup[0]] = tup[3]
|
|
857
|
-
# #
|
|
858
|
-
# #
|
|
859
|
-
# #
|
|
860
|
-
# if self._verbose:
|
|
861
|
-
# endTime = time.time()
|
|
862
|
-
# self._lfh.write(
|
|
863
|
-
# "+SequenceDataAssemble.__runSeqAllSearches() completed at %s (%.2f seconds)\n" % (time.strftime("%Y %m %d %H:%M:%S", time.localtime()), endTime - startTime)
|
|
864
|
-
# )
|
|
865
|
-
# #
|
|
866
|
-
# return refD, ownRefD, otherRefD
|
|
867
|
-
# except: # noqa: E722 pylint: disable=bare-except
|
|
868
|
-
# if self._verbose:
|
|
869
|
-
# self._lfh.write("+SequenceDataAssemble.__runSeqAllSearches() - failing \n")
|
|
870
|
-
# traceback.print_exc(file=self._lfh)
|
|
871
|
-
# #
|
|
872
|
-
# #
|
|
873
|
-
# return {}, {}, {}
|
|
874
|
-
|
|
875
|
-
# EP: Believe unused
|
|
876
|
-
# def runMultiReferenceSearches(self, dataList, procName, optionsD, workingDir): # pylint: disable=unused-argument
|
|
877
|
-
# """Multiple reference sequence search processing API"""
|
|
878
|
-
# ncbilock = optionsD.get("ncbilock", None)
|
|
879
|
-
# rList = []
|
|
880
|
-
# for tupL in dataList:
|
|
881
|
-
# seqSearchUtil = SeqReferenceSearchUtils(
|
|
882
|
-
# siteId=self.__siteId, sessionPath=self.__sessionPath, pathInfo=self.__pI, verbose=self._verbose, log=self._lfh, ncbilock=ncbilock
|
|
883
|
-
# )
|
|
884
|
-
# eRefD, selfRefD, sameSeqRefD = seqSearchUtil.run(self.__dataSetId, tupL[1], tupL[2], self.__doRefSearchFlag, self.__forceBlastSearchFlag)
|
|
885
|
-
# rList.append((tupL[0], eRefD, selfRefD, sameSeqRefD))
|
|
886
|
-
# #
|
|
887
|
-
# #
|
|
888
|
-
# return rList, rList, []
|
|
889
|
-
|
|
890
813
|
def __runSameSeqAnnotationSearch(self, entityTupList):
|
|
891
814
|
"""Search same sequence annotation information from processed entries"""
|
|
892
815
|
try:
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# 7-Aug-2015 jdw upper case input one-letter-code sequence -
|
|
8
8
|
# 7-Sep-2017 zf modified __updatePolymerEntityPartitions() to remove extra incorrect fragment assignment(s)
|
|
9
9
|
# 7-Aug-2021 zf add option for changing _entity_poly.type
|
|
10
|
-
# 6-Jan-2024 zf add Sequence Builder Form, modify Sequence Parition and Taxonomy Data Form
|
|
10
|
+
# 6-Jan-2024 zf add Sequence Builder Form, modify Sequence Parition and Taxonomy Data Form
|
|
11
11
|
#
|
|
12
12
|
##
|
|
13
13
|
"""
|
|
@@ -25,7 +25,9 @@ try:
|
|
|
25
25
|
except ImportError:
|
|
26
26
|
import pickle as pickle
|
|
27
27
|
#
|
|
28
|
-
import os
|
|
28
|
+
import os
|
|
29
|
+
import string
|
|
30
|
+
import sys
|
|
29
31
|
import traceback
|
|
30
32
|
import copy
|
|
31
33
|
|
|
@@ -77,12 +79,14 @@ class UpdatePolymerEntityPartitions(object):
|
|
|
77
79
|
-->
|
|
78
80
|
|
|
79
81
|
"""
|
|
80
|
-
#
|
|
82
|
+
# <h3>Sequence Builder</h3>
|
|
81
83
|
seq_build_top_template = """
|
|
82
84
|
<div class="head ui-corner-all">
|
|
83
85
|
<div><a href="#" class="toggle"><span class="fltlft width20px"><span class="ui-icon ui-icon-circle-arrow-e"></span></span><span style="color:#696">Sequence Builder based on the relevant UniProt sequence(s) (Click to open the input form)</span></a></div>
|
|
84
86
|
</div>
|
|
85
87
|
<div style="display: none;">
|
|
88
|
+
<p style="color:#FF0000">Each row should only contain one portion of the author sequence. The "Expression Tag" or "Linker" sequence should have its own row and they should be put in
|
|
89
|
+
the "Expression Tag/linker Input Box" text box.</p>
|
|
86
90
|
<form name="formseqbuilder" id="formseqbuilder" action="/service/sequence_editor/respond_form/seqbuilder" method="post" class="seqbuilder_ajaxform">
|
|
87
91
|
<input type="hidden" name="sessionid" value="%s" />
|
|
88
92
|
<input type="hidden" name="entityid" value="%s" />
|
|
@@ -187,7 +191,7 @@ class UpdatePolymerEntityPartitions(object):
|
|
|
187
191
|
oL.append(seq_build_top_template % (self.__sessionId, entityId, 3))
|
|
188
192
|
for i in range(0, 3):
|
|
189
193
|
oL.append("<tr>")
|
|
190
|
-
oL.append('<td>%d</td>' % (i+1))
|
|
194
|
+
oL.append('<td>%d</td>' % (i + 1))
|
|
191
195
|
oL.append('<td><input type="text" id="uniprot_id_%d" name="uniprot_id_%d" value="" size="20" /></td>' % (i + 1, i + 1))
|
|
192
196
|
oL.append('<td><input type="text" id="beg_uniprot_num_%d" name="beg_uniprot_num_%d" value="" size="10" /></td>' % (i + 1, i + 1))
|
|
193
197
|
oL.append('<td><input type="text" id="end_uniprot_num_%d" name="end_uniprot_num_%d" value="" size="10" /></td>' % (i + 1, i + 1))
|
|
@@ -372,8 +376,8 @@ class UpdatePolymerEntityPartitions(object):
|
|
|
372
376
|
dbAcc = tL[0]
|
|
373
377
|
#
|
|
374
378
|
fetchUtil.reset()
|
|
375
|
-
fetchErr, refFeatureDict,
|
|
376
|
-
|
|
379
|
+
fetchErr, refFeatureDict, _refSeqList = fetchUtil.fetchReferenceSequence("UNP", dbAcc, dbIsoform, polyTypeCode="AA",
|
|
380
|
+
refSeqBeg=dbSeqBegin, refSeqEnd=dbSeqEnd)
|
|
377
381
|
#
|
|
378
382
|
if fetchErr:
|
|
379
383
|
if errMsg:
|
|
@@ -398,6 +402,7 @@ class UpdatePolymerEntityPartitions(object):
|
|
|
398
402
|
seqPartD["hitFrom"] = int(dbSeqBegin)
|
|
399
403
|
seqPartD["hitTo"] = int(dbSeqEnd)
|
|
400
404
|
seqPartD["sequence"] = refFeatureDict["sequence"][seqPartD["hitFrom"] - 1: seqPartD["hitTo"]]
|
|
405
|
+
seqPartD["taxonomy_id"] = refFeatureDict["taxonomy_id"]
|
|
401
406
|
seqPartList.append(seqPartD)
|
|
402
407
|
#
|
|
403
408
|
#
|
|
@@ -412,7 +417,7 @@ class UpdatePolymerEntityPartitions(object):
|
|
|
412
417
|
return self.__processBuiltSequence(entityId, seqPartList)
|
|
413
418
|
except: # noqa: E722 pylint: disable=bare-except
|
|
414
419
|
self.__lfh.write("+UpdatePolymerEntityPartitions.seqBuilderResponder() failing\n")
|
|
415
|
-
traceback.print_exc(file=self.
|
|
420
|
+
traceback.print_exc(file=self.__lfh)
|
|
416
421
|
return "Fetch reference sequence failed: got exception.", False, "", []
|
|
417
422
|
#
|
|
418
423
|
|
|
@@ -421,7 +426,11 @@ class UpdatePolymerEntityPartitions(object):
|
|
|
421
426
|
"""
|
|
422
427
|
seqlist = []
|
|
423
428
|
reflist = []
|
|
429
|
+
taxIdList = []
|
|
424
430
|
for seqPartD in seqPartList:
|
|
431
|
+
if ("taxonomy_id" in seqPartD) and seqPartD["taxonomy_id"]:
|
|
432
|
+
taxIdList.append(seqPartD["taxonomy_id"])
|
|
433
|
+
#
|
|
425
434
|
inP = False
|
|
426
435
|
r3 = ""
|
|
427
436
|
seqPartD["queryFrom"] = len(seqlist) + 1
|
|
@@ -435,13 +444,13 @@ class UpdatePolymerEntityPartitions(object):
|
|
|
435
444
|
continue
|
|
436
445
|
if s == ")":
|
|
437
446
|
inP = False
|
|
438
|
-
seqlist.append(
|
|
447
|
+
seqlist.append(["(" + r3 + ")", 0])
|
|
439
448
|
continue
|
|
440
449
|
#
|
|
441
450
|
if inP:
|
|
442
451
|
r3 += s
|
|
443
452
|
else:
|
|
444
|
-
seqlist.append(
|
|
453
|
+
seqlist.append([s, 0])
|
|
445
454
|
#
|
|
446
455
|
#
|
|
447
456
|
seqPartD["queryTo"] = len(seqlist)
|
|
@@ -450,7 +459,7 @@ class UpdatePolymerEntityPartitions(object):
|
|
|
450
459
|
("hitTo" in seqPartD) and seqPartD["hitTo"] and (seqPartD["queryTo"] > seqPartD["queryFrom"]):
|
|
451
460
|
seqlist[-1][1] = 1
|
|
452
461
|
myD = {}
|
|
453
|
-
for key in (
|
|
462
|
+
for key in ("db_accession", "hitFrom", "hitTo", "queryFrom", "queryTo"):
|
|
454
463
|
myD[key] = seqPartD[key]
|
|
455
464
|
#
|
|
456
465
|
reflist.append(myD)
|
|
@@ -468,10 +477,10 @@ class UpdatePolymerEntityPartitions(object):
|
|
|
468
477
|
formatedLen += len(seqTup[0])
|
|
469
478
|
if seqTup[1] == 1:
|
|
470
479
|
if len(seqInfoList) > 0:
|
|
471
|
-
seqInfoD = {
|
|
480
|
+
seqInfoD = {"beg_num": seqInfoList[-1]["end_num"] + 1, "end_num": idx}
|
|
472
481
|
seqInfoList.append(seqInfoD)
|
|
473
482
|
else:
|
|
474
|
-
seqInfoList.append(
|
|
483
|
+
seqInfoList.append({"beg_num": 1, "end_num": idx})
|
|
475
484
|
#
|
|
476
485
|
#
|
|
477
486
|
#
|
|
@@ -482,7 +491,12 @@ class UpdatePolymerEntityPartitions(object):
|
|
|
482
491
|
seqInfoD["end_num"] = str(seqInfoD["end_num"])
|
|
483
492
|
#
|
|
484
493
|
else:
|
|
485
|
-
seqInfoList.append(
|
|
494
|
+
seqInfoList.append({"beg_num": "1", "end_num": str(len(seqlist))})
|
|
495
|
+
#
|
|
496
|
+
if len(seqInfoList) == len(taxIdList):
|
|
497
|
+
for idx, seqInfoD in enumerate(seqInfoList):
|
|
498
|
+
seqInfoD["taxonomy_id"] = taxIdList[idx]
|
|
499
|
+
#
|
|
486
500
|
#
|
|
487
501
|
matchRefSeqPickleFile = os.path.join(self.__sessionPath, "Entity-" + entityId + "-MatchedRefSeqs.pic")
|
|
488
502
|
if os.access(matchRefSeqPickleFile, os.F_OK):
|
|
@@ -527,9 +541,8 @@ class UpdatePolymerEntityPartitions(object):
|
|
|
527
541
|
self.__lfh.write("+UpdatePolymerEntityPartitions._getCurrentAuthSelection() no return for entityId %r partId %r\n" % (entityId, partId))
|
|
528
542
|
return None, None, None
|
|
529
543
|
|
|
530
|
-
|
|
531
544
|
def __formatSelectList(self, name, value, valList):
|
|
532
|
-
displayList = [
|
|
545
|
+
displayList = [""]
|
|
533
546
|
displayList.extend(valList)
|
|
534
547
|
text = '<select name="' + name + '" id="' + name + '">\n'
|
|
535
548
|
for disVal in displayList:
|
|
@@ -169,7 +169,7 @@ class LocalBlastSearchUtils(object):
|
|
|
169
169
|
if not self.__checkPartRange(len(self.__fullOneLetterSeq), self.__entityD["PART_LIST"]):
|
|
170
170
|
return {}
|
|
171
171
|
#
|
|
172
|
-
refSeqInfoD,matchedRefList = self.__readPredefinedRefSequenceInfo()
|
|
172
|
+
refSeqInfoD, matchedRefList = self.__readPredefinedRefSequenceInfo()
|
|
173
173
|
if (not refSeqInfoD) or (not matchedRefList):
|
|
174
174
|
return {}
|
|
175
175
|
#
|
|
@@ -540,7 +540,7 @@ class LocalBlastSearchUtils(object):
|
|
|
540
540
|
#
|
|
541
541
|
#
|
|
542
542
|
if not refSeqInfoD:
|
|
543
|
-
return {},[]
|
|
543
|
+
return {}, []
|
|
544
544
|
#
|
|
545
545
|
# Read matched sequence information generated in UpdatePolymerEntityPartitions.seqBuilderResponder()
|
|
546
546
|
#
|
|
@@ -556,7 +556,7 @@ class LocalBlastSearchUtils(object):
|
|
|
556
556
|
matchedRefList = []
|
|
557
557
|
#
|
|
558
558
|
#
|
|
559
|
-
return refSeqInfoD,matchedRefList
|
|
559
|
+
return refSeqInfoD, matchedRefList
|
|
560
560
|
|
|
561
561
|
def __processPredefinedRefSequence(self, oneLetterCodeSeq, refSeqInfoD, matchedRefList):
|
|
562
562
|
""" Create Auth/Seq sequences alignment
|
|
@@ -576,7 +576,7 @@ class LocalBlastSearchUtils(object):
|
|
|
576
576
|
#
|
|
577
577
|
authSeq = oneLetterCodeSeq[(seqNumBeg - 1) : seqNumEnd]
|
|
578
578
|
matchedAuthSeq = authSeq[(matchedRefD["queryFrom"] - seqNumBeg) : (matchedRefD["queryTo"] - seqNumBeg + 1)]
|
|
579
|
-
#matchedAuthSeq = oneLetterCodeSeq[(queryFrom - 1) : queryTo]
|
|
579
|
+
# matchedAuthSeq = oneLetterCodeSeq[(queryFrom - 1) : queryTo]
|
|
580
580
|
matchedRefSeq = refSeqInfoD[matchedRefD["db_accession"]]["sequence"][(matchedRefD["hitFrom"] - 1) : matchedRefD["hitTo"]]
|
|
581
581
|
if matchedAuthSeq != matchedRefSeq:
|
|
582
582
|
return {}
|
|
@@ -606,7 +606,7 @@ class LocalBlastSearchUtils(object):
|
|
|
606
606
|
hitD["alignment"] = alignIndex
|
|
607
607
|
hitD["seq_tup_list"] = sTup3L
|
|
608
608
|
hitD["statistics"] = (alignLength, seqSim, seqSimWithGaps)
|
|
609
|
-
predefinedRefD[str(partNum)] = [
|
|
609
|
+
predefinedRefD[str(partNum)] = [hitD]
|
|
610
610
|
else:
|
|
611
611
|
self.__lfh.write("+LocalBlastSearchUtils.__processPredefinedRefSequence() get sequence alignment index error: %s\n" % error)
|
|
612
612
|
return {}
|
|
@@ -617,7 +617,7 @@ class LocalBlastSearchUtils(object):
|
|
|
617
617
|
if not foundRefFlag:
|
|
618
618
|
return {}
|
|
619
619
|
#
|
|
620
|
-
except:
|
|
620
|
+
except: # noqa: E722 pylint: disable=bare-except
|
|
621
621
|
if self.__verbose:
|
|
622
622
|
traceback.print_exc(file=self.__lfh)
|
|
623
623
|
self.__lfh.write("+LocalBlastSearchUtils.__processPredefinedRefSequence() for entity %r failed\n" % self.__entityId)
|
|
@@ -631,7 +631,7 @@ class LocalBlastSearchUtils(object):
|
|
|
631
631
|
#
|
|
632
632
|
currSeq = self.__entityD["SEQ_ENTITY_1"]
|
|
633
633
|
self.__entitySeq = currSeq.replace(" ", "").replace("\n", "").replace("\t", "")
|
|
634
|
-
self.__blastResultFile = self.__pI.getFilePath(self.__dataSetId, contentType="seqdb-match", formatType="pic",
|
|
634
|
+
self.__blastResultFile = self.__pI.getFilePath(self.__dataSetId, contentType="seqdb-match", formatType="pic",
|
|
635
635
|
fileSource="session", partNumber=self.__entityId)
|
|
636
636
|
self.__writeSearchResult(retD)
|
|
637
637
|
#
|
|
@@ -965,6 +965,7 @@ class LocalBlastSearchUtils(object):
|
|
|
965
965
|
if "non_isoform_score" not in hit:
|
|
966
966
|
hit["non_isoform_score"] = 1
|
|
967
967
|
#
|
|
968
|
+
hit["db_score"] = 0
|
|
968
969
|
if fullScoreFlag or ("identity_score" not in hit):
|
|
969
970
|
hit["identity_score"] = (float(hit["identity"]) - float(hit["gaps"])) * 100.0 / float(hit["query_length"])
|
|
970
971
|
hit["sorting_score"] = hit["identity_score"]
|
|
@@ -980,8 +981,6 @@ class LocalBlastSearchUtils(object):
|
|
|
980
981
|
#
|
|
981
982
|
if hit["db_name"] == "SP":
|
|
982
983
|
hit["db_score"] = 1
|
|
983
|
-
else:
|
|
984
|
-
hit["db_score"] = 0
|
|
985
984
|
#
|
|
986
985
|
#
|
|
987
986
|
if self.__authRefIdList and ((hit["db_code"].strip().upper() in self.__authRefIdList) or (hit["db_accession"].strip().upper() in
|
|
@@ -1016,6 +1015,11 @@ class LocalBlastSearchUtils(object):
|
|
|
1016
1015
|
taxidMatch = 1
|
|
1017
1016
|
#
|
|
1018
1017
|
#
|
|
1018
|
+
# Add the following modification per request by DAOTHER-8863
|
|
1019
|
+
#
|
|
1020
|
+
if (hit["db_score"] == 1) and (taxidMatch > 0):
|
|
1021
|
+
taxidMatch = 3
|
|
1022
|
+
#
|
|
1019
1023
|
hit["taxid_match"] = taxidMatch
|
|
1020
1024
|
if fullScoreFlag and (taxidMatch == 3):
|
|
1021
1025
|
if hit["identity_score"] > highest_identity_score_with_taxid_match:
|
|
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.26.8 → wwpdb.apps.seqmodule-0.27.0}/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
|
{wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/control/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/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.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/io/TaxonomyUtils.py
RENAMED
|
File without changes
|
|
File without changes
|
{wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/io/__init__.py
RENAMED
|
File without changes
|
{wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/io/testAuto.py
RENAMED
|
File without changes
|
|
File without changes
|
{wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/link/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/update/__init__.py
RENAMED
|
File without changes
|
{wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/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
|
{wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/util/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/wwpdb/apps/seqmodule/view3d/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wwpdb.apps.seqmodule-0.26.8 → wwpdb.apps.seqmodule-0.27.0}/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
|