def finallyProcess(self, _edObject=None):
     """
     Parses the labelit.screen log file and the generated MOSFLM script
     """
     EDPluginExecProcessScript.finallyProcess(self, _edObject)
     self.DEBUG("EDPluginDistlSignalStrengthThinClientv1_1.finallyProcess")
     strLabelitDistlLog = self.readProcessLogFile()
     if (strLabelitDistlLog is None):
         strErrorMessage = "EDPluginDistlSignalStrengthThinClientv1_1.finallyProcess : Could not read the Labelit log file"
         self.error(strErrorMessage)
         self.addErrorMessage(strErrorMessage)
         self.setFailure()
         xsDataImageQualityIndicators = XSDataImageQualityIndicators()
         xsDataImageQualityIndicators.setImage(self.xsDataImage)
     elif strLabelitDistlLog == "":
         strLabelitDislErr = self.readProcessErrorLogFile()
         if "httplib.BadStatusLine" in strLabelitDislErr:
             strErrorMessage = "Cannot read image due to problem with file permission!"
         else:
             strErrorMessage = "Labelit thin client error message: " + strLabelitDislErr
         self.error(strErrorMessage)
         self.addErrorMessage(strErrorMessage)
         self.setFailure()
         xsDataImageQualityIndicators = XSDataImageQualityIndicators()
         xsDataImageQualityIndicators.setImage(self.xsDataImage)
     else:
         xsDataImageQualityIndicators = self.parseLabelitDistlOutput(strLabelitDistlLog)
         xsDataImageQualityIndicators.setImage(self.xsDataImage)
     xsDataResultDistlSignalStrength = XSDataResultDistlSignalStrength()
     xsDataResultDistlSignalStrength.setImageQualityIndicators(xsDataImageQualityIndicators)
     self.setDataOutput(xsDataResultDistlSignalStrength)
Exemplo n.º 2
0
 def finallyProcess(self, _edObject=None):
     EDPluginExecProcessScript.finallyProcess(self)
     self.DEBUG("EDPluginBestv1_2.finallyProcess")
     xsDataResultBest = self.getOutputDataFromDNATableFile(
         os.path.join(self.getWorkingDirectory(),
                      self.getScriptBaseName() + "_dnaTables.xml"))
     xsDataFilePathToLog = XSDataFile(
         XSDataString(
             os.path.join(self.getWorkingDirectory(),
                          self.getScriptLogFileName())))
     xsDataResultBest.setPathToLogFile(xsDataFilePathToLog)
     strError = self.readProcessErrorLogFile()
     if ((strError is not None) and (strError != "")):
         strErrorMessage = EDMessage.ERROR_EXECUTION_03 % (
             'EDPluginBestv1_2.finallyProcess', 'EDPluginBestv1_2',
             strError)
         self.error(strErrorMessage)
         self.addErrorMessage(strErrorMessage)
         # Append error message to best log
         strLog = self.readProcessLogFile()
         strLog += "\n" + strError
         EDUtilsFile.writeFile(
             os.path.join(self.getWorkingDirectory(),
                          self.getScriptLogFileName()), strLog)
         self.setDataOutput(xsDataResultBest)
         self.setFailure()
     else:
         strPathToPlotMtv = os.path.join(
             self.getWorkingDirectory(),
             self.getScriptBaseName() + "_plots.mtv")
         if os.path.exists(strPathToPlotMtv):
             xsDataFilePathToPlotMtv = XSDataFile(
                 XSDataString(strPathToPlotMtv))
             xsDataResultBest.setPathToPlotMtvFile(xsDataFilePathToPlotMtv)
         # Check for .gle files
         for strPath in os.listdir(self.getWorkingDirectory()):
             if strPath.endswith(".gle"):
                 xsDataBestGlePlot = XSDataBestGlePlot()
                 xsDataBestGlePlot.script = XSDataFile(
                     XSDataString(
                         os.path.join(self.getWorkingDirectory(), strPath)))
                 strDataPath = strPath[:-4] + ".dat"
                 if os.path.exists(
                         os.path.join(self.getWorkingDirectory(),
                                      strDataPath)):
                     xsDataBestGlePlot.data = XSDataFile(
                         XSDataString(
                             os.path.join(self.getWorkingDirectory(),
                                          strDataPath)))
                 else:
                     strDataPath = strPath[:-4] + ".data"
                     if os.path.exists(
                             os.path.join(self.getWorkingDirectory(),
                                          strDataPath)):
                         xsDataBestGlePlot.data = XSDataFile(
                             XSDataString(
                                 os.path.join(self.getWorkingDirectory(),
                                              strDataPath)))
                 xsDataResultBest.addGlePlot(xsDataBestGlePlot)
         self.setDataOutput(xsDataResultBest)
Exemplo n.º 3
0
 def finallyProcess(self, _edObject=None):
     EDPluginExecProcessScript.finallyProcess(self)
     self.DEBUG("EDPluginBestv1_2.finallyProcess")
     strError = self.readProcessErrorLogFile()
     if ((strError is not None) and (strError != "")):
         strErrorMessage = EDMessage.ERROR_EXECUTION_03 % (
             'EDPluginBestv1_2.postProcess', 'EDPluginBestv1_2', strError)
         self.error(strErrorMessage)
         self.addErrorMessage(strErrorMessage)
         self.setDataOutput(XSDataResultBest())
         self.setFailure()
     else:
         xsDataResultBest = self.getOutputDataFromDNATableFile(
             os.path.join(self.getWorkingDirectory(),
                          self.getScriptBaseName() + "_dnaTables.xml"))
         xsDataFilePathToLog = XSDataFile(
             XSDataString(
                 os.path.join(self.getWorkingDirectory(),
                              self.getScriptLogFileName())))
         xsDataResultBest.setPathToLogFile(xsDataFilePathToLog)
         xsDataFilePathToPlotMtv = XSDataFile(
             XSDataString(
                 os.path.join(self.getWorkingDirectory(),
                              self.getScriptBaseName() + "_plots.mtv")))
         xsDataResultBest.setPathToPlotMtvFile(xsDataFilePathToPlotMtv)
         self.setDataOutput(xsDataResultBest)
Exemplo n.º 4
0
 def finallyProcess(self, _edObject=None):
     """
     Parses the labelit.screen log file and the generated MOSFLM script
     """
     EDPluginExecProcessScript.finallyProcess(self, _edObject)
     self.DEBUG("EDPluginDistlSignalStrengthThinClientv1_1.finallyProcess")
     strLabelitDistlLog = self.readProcessLogFile()
     if (strLabelitDistlLog is None):
         strErrorMessage = "EDPluginDistlSignalStrengthThinClientv1_1.finallyProcess : Could not read the Labelit log file"
         self.error(strErrorMessage)
         self.addErrorMessage(strErrorMessage)
         self.setFailure()
         xsDataImageQualityIndicators = XSDataImageQualityIndicators()
         xsDataImageQualityIndicators.setImage(self.xsDataImage)
     elif strLabelitDistlLog == "":
         strLabelitDislErr = self.readProcessErrorLogFile()
         if "httplib.BadStatusLine" in strLabelitDislErr:
             strErrorMessage = "Cannot read image due to problem with file permission!"
         else:
             strErrorMessage = "Labelit thin client error message: " + strLabelitDislErr
         self.error(strErrorMessage)
         self.addErrorMessage(strErrorMessage)
         self.setFailure()
         xsDataImageQualityIndicators = XSDataImageQualityIndicators()
         xsDataImageQualityIndicators.setImage(self.xsDataImage)
     else:
         xsDataImageQualityIndicators = self.parseLabelitDistlOutput(
             strLabelitDistlLog)
         xsDataImageQualityIndicators.setImage(self.xsDataImage)
     xsDataResultDistlSignalStrength = XSDataResultDistlSignalStrength()
     xsDataResultDistlSignalStrength.setImageQualityIndicators(
         xsDataImageQualityIndicators)
     self.setDataOutput(xsDataResultDistlSignalStrength)
Exemplo n.º 5
0
 def finallyProcess(self, _edObject=None):
     EDPluginExecProcessScript.finallyProcess(self)
     self.DEBUG("EDPluginH5ToCBFv1_1.finallyProcess")
     if self.CBFFile is not None:
         if os.path.exists(self.CBFFile):
             self.dataOutput.outputCBFFile = XSDataFile(XSDataString(self.CBFFile))
     elif self.CBFFileTemplate is not None:
         self.dataOutput.outputCBFFileTemplate = XSDataFile(XSDataString(self.CBFFileTemplate))
Exemplo n.º 6
0
 def finallyProcess(self, _edObject=None):
     EDPluginExecProcessScript.finallyProcess(self)
     self.DEBUG("EDPluginH5ToCBFv1_0.finallyProcess")
     if self.tmpCBFFile is not None:
         if os.path.exists(self.tmpCBFFile):
             os.remove(self.tmpCBFFile)
     if self.CBFFile is not None:
         if os.path.exists(self.CBFFile):
             self.dataOutput.outputCBFFile = XSDataFile(XSDataString(self.CBFFile))
Exemplo n.º 7
0
 def finallyProcess(self, _edObject=None):
     EDPluginExecProcessScript.finallyProcess(self)
     self.DEBUG("EDPluginExecMtz2Variousv1_0.finallyProcess")
     xsDataResult = self.getOutputDataFromDNATableFile("rdfit.xml")
     if os.path.exists(self.strScaleIntensityPlotPath):
         xsDataResult.scaleIntensityPlot = XSDataFile(XSDataString(self.strScaleIntensityPlotPath))
     if os.path.exists(self.strBFactorPlot):
         xsDataResult.bFactorPlot = XSDataFile(XSDataString(self.strBFactorPlot))
     if os.path.exists(self.htmlPagePath):
         xsDataResult.htmlPage = XSDataFile(XSDataString(self.htmlPagePath))
     if os.path.exists(self.jsonPath):
         xsDataResult.jsonPath = XSDataFile(XSDataString(self.jsonPath))
     self.setDataOutput(xsDataResult)
Exemplo n.º 8
0
 def finallyProcess(self, _edObject=None):
     EDPluginExecProcessScript.finallyProcess(self)
     self.DEBUG("EDPluginBestv1_2.finallyProcess")
     xsDataResultBest = self.getOutputDataFromDNATableFile(
         os.path.join(self.getWorkingDirectory(), self.getScriptBaseName() + "_dnaTables.xml")
     )
     xsDataFilePathToLog = XSDataFile(
         XSDataString(os.path.join(self.getWorkingDirectory(), self.getScriptLogFileName()))
     )
     xsDataResultBest.setPathToLogFile(xsDataFilePathToLog)
     strError = self.readProcessErrorLogFile()
     if (strError is not None) and (strError != ""):
         strErrorMessage = EDMessage.ERROR_EXECUTION_03 % (
             "EDPluginBestv1_2.finallyProcess",
             "EDPluginBestv1_2",
             strError,
         )
         self.error(strErrorMessage)
         self.addErrorMessage(strErrorMessage)
         # Append error message to best log
         strLog = self.readProcessLogFile()
         strLog += "\n" + strError
         EDUtilsFile.writeFile(os.path.join(self.getWorkingDirectory(), self.getScriptLogFileName()), strLog)
         self.setDataOutput(xsDataResultBest)
         self.setFailure()
     else:
         strPathToPlotMtv = os.path.join(self.getWorkingDirectory(), self.getScriptBaseName() + "_plots.mtv")
         if os.path.exists(strPathToPlotMtv):
             xsDataFilePathToPlotMtv = XSDataFile(XSDataString(strPathToPlotMtv))
             xsDataResultBest.setPathToPlotMtvFile(xsDataFilePathToPlotMtv)
         # Check for .gle files
         for strPath in os.listdir(self.getWorkingDirectory()):
             if strPath.endswith(".gle"):
                 xsDataBestGlePlot = XSDataBestGlePlot()
                 xsDataBestGlePlot.script = XSDataFile(
                     XSDataString(os.path.join(self.getWorkingDirectory(), strPath))
                 )
                 strDataPath = strPath[:-4] + ".dat"
                 if os.path.exists(os.path.join(self.getWorkingDirectory(), strDataPath)):
                     xsDataBestGlePlot.data = XSDataFile(
                         XSDataString(os.path.join(self.getWorkingDirectory(), strDataPath))
                     )
                 else:
                     strDataPath = strPath[:-4] + ".data"
                     if os.path.exists(os.path.join(self.getWorkingDirectory(), strDataPath)):
                         xsDataBestGlePlot.data = XSDataFile(
                             XSDataString(os.path.join(self.getWorkingDirectory(), strDataPath))
                         )
                 xsDataResultBest.addGlePlot(xsDataBestGlePlot)
         self.setDataOutput(xsDataResultBest)
Exemplo n.º 9
0
 def finallyProcess(self, _edObject=None):
     EDPluginExecProcessScript.finallyProcess(self)
     self.DEBUG("EDPluginExecMtz2Variousv1_0.finallyProcess")
     xsDataResult = self.getOutputDataFromDNATableFile("rdfit.xml")
     if os.path.exists(self.strScaleIntensityPlotPath):
         xsDataResult.scaleIntensityPlot = XSDataFile(
             XSDataString(self.strScaleIntensityPlotPath))
     if os.path.exists(self.strBFactorPlot):
         xsDataResult.bFactorPlot = XSDataFile(
             XSDataString(self.strBFactorPlot))
     if os.path.exists(self.htmlPagePath):
         xsDataResult.htmlPage = XSDataFile(XSDataString(self.htmlPagePath))
     if os.path.exists(self.jsonPath):
         xsDataResult.jsonPath = XSDataFile(XSDataString(self.jsonPath))
     self.setDataOutput(xsDataResult)
 def finallyProcess(self, _edObject=None):
     EDPluginExecProcessScript.finallyProcess(self)
     EDVerbose.DEBUG("EDPluginBestv1_2.finallyProcess")
     strError = self.readProcessErrorLogFile()
     if((strError is not None) and (strError != "")):
         strErrorMessage = EDMessage.ERROR_EXECUTION_03 % ('EDPluginBestv1_2.postProcess', 'EDPluginBestv1_2', strError)
         EDVerbose.error(strErrorMessage)
         self.addErrorMessage(strErrorMessage)
         self.setDataOutput(XSDataResultBest())
         self.setFailure()
     else:
         xsDataResultBest = self.getOutputDataFromDNATableFile(EDUtilsPath.mergePath(self.getWorkingDirectory(), self.getScriptBaseName() + "_dnaTables.xml"))
         xsDataFilePathToLog = XSDataFile(XSDataString(os.path.join(self.getWorkingDirectory(), self.getScriptLogFileName())))
         xsDataResultBest.setPathToLogFile(xsDataFilePathToLog)
         self.setDataOutput(xsDataResultBest)
 def finallyProcess(self, _edObject = None):
     EDPluginExecProcessScript.finallyProcess(self)
     self.DEBUG("EDPluginExecMtz2Variousv1_0.finallyProcess")
     xsDataResult = XSDataResultMtz2Various()
     xsDataResult.setHklfile(XSDataFile(XSDataString(self.strHklFile)))
     self.setDataOutput(xsDataResult)
Exemplo n.º 12
0
 def finallyProcess(self, _edObject = None):
     EDPluginExecProcessScript.finallyProcess(self)
     self.DEBUG("EDPluginExecMtz2Variousv1_0.finallyProcess")
     xsDataResult = self.getOutputDataFromDNATableFile("rdfit.xml")
     self.setDataOutput(xsDataResult)
Exemplo n.º 13
0
 def finallyProcess(self, _edObject=None):
     EDPluginExecProcessScript.finallyProcess(self, _edObject)
     self.DEBUG("EDPluginPhenixXtriagev1_1.finallyProcess")
     # Remove local mtz file if any
     if self.strPathToLocalMtz is not None and os.path.exists(self.strPathToLocalMtz):
         os.remove(self.strPathToLocalMtz)
Exemplo n.º 14
0
 def finallyProcess(self, _edObject=None):
     EDPluginExecProcessScript.finallyProcess(self)
     self.DEBUG("EDPluginXOalignv1_0.finallyProcess")
Exemplo n.º 15
0
 def finallyProcess(self, _edObject=None):
     EDPluginExecProcessScript.finallyProcess(self)
     self.DEBUG("EDPluginExecMtz2Variousv1_0.finallyProcess")
     xsDataResult = XSDataResultMtz2Various()
     xsDataResult.setHklfile(XSDataFile(XSDataString(self.strHklFile)))
     self.setDataOutput(xsDataResult)
Exemplo n.º 16
0
 def finallyProcess(self, _edObject=None):
     EDPluginExecProcessScript.finallyProcess(self)
     self.DEBUG("EDPluginHTML2PDFv1_0.finallyProcess")
     if self.pdfFile is not None:
         if os.path.exists(self.pdfFile):
             self.dataOutput.pdfFile = XSDataFile(XSDataString(self.pdfFile))