def postProcess(self):
        self.DEBUG('Import: postProcess')
        EDPluginControl.postProcess(self)

        res = XSDataEDNAprocImportOut()
        status = XSDataStatus()
        res.status = status
        if self.dataInput.input_noanom:
            all_good = not self.anom.isFailure() and not self.noanom.isFailure()
        else:
            all_good = not self.anom.isFailure()
        status.isSuccess = XSDataBoolean(all_good)
        files = list()
        if not self.anom.isFailure():
            files.append(self.anom.dataInput.output_file)
        if self.dataInput.input_noanom and not self.noanom.isFailure():
            files.append(self.noanom.dataInput.output_file)
        res.files = files

        if self.dataInput.input_noanom:
            res.pointless_sgnumber = self.noanom.dataOutput.pointless_sgnumber
            res.pointless_sgstring = self.noanom.dataOutput.pointless_sgstring
            res.pointless_cell = self.noanom.dataOutput.pointless_cell
        else:
            res.pointless_sgnumber = self.anom.dataOutput.pointless_sgnumber
            res.pointless_sgstring = self.anom.dataOutput.pointless_sgstring
            res.pointless_cell = self.anom.dataOutput.pointless_cell

        res.aimless_log_anom = self.anom.dataOutput.aimless_log

        if self.dataInput.input_noanom:
            res.aimless_log_noanom = self.noanom.dataOutput.aimless_log

        self.dataOutput = res
Esempio n. 2
0
    def postProcess(self):
        self.DEBUG('Import: postProcess')
        EDPluginControl.postProcess(self)

        res = XSDataEDNAprocImportOut()
        status = XSDataStatus()
        res.status = status
        if self.dataInput.input_noanom:
            all_good = not self.anom.isFailure() and not self.noanom.isFailure(
            )
        else:
            all_good = not self.anom.isFailure()
        status.isSuccess = XSDataBoolean(all_good)
        files = list()
        if not self.anom.isFailure():
            files.append(self.anom.dataInput.output_file)
        if self.dataInput.input_noanom and not self.noanom.isFailure():
            files.append(self.noanom.dataInput.output_file)
        res.files = files

        if self.dataInput.input_noanom:
            res.pointless_sgnumber = self.noanom.dataOutput.pointless_sgnumber
            res.pointless_sgstring = self.noanom.dataOutput.pointless_sgstring
            res.pointless_cell = self.noanom.dataOutput.pointless_cell
        else:
            res.pointless_sgnumber = self.anom.dataOutput.pointless_sgnumber
            res.pointless_sgstring = self.anom.dataOutput.pointless_sgstring
            res.pointless_cell = self.anom.dataOutput.pointless_cell

        res.aimless_log_anom = self.anom.dataOutput.aimless_log

        if self.dataInput.input_noanom:
            res.aimless_log_noanom = self.noanom.dataOutput.aimless_log

        self.dataOutput = res
Esempio n. 3
0
    def postProcess(self):
        self.DEBUG('Pointless: postProcess')
        EDPluginExecProcessScript.postProcess(self)
        output_file = self.dataInput.output_file.value

        sgre = re.compile(
            """ \* Space group = '(?P<sgstr>.*)' \(number\s+(?P<sgnumber>\d+)\)"""
        )

        sgnumber = sgstr = None
        # returns None if the file does not exist...
        log = self.readProcessLogFile()
        if log is not None:
            # we'll apply the regexp to the whole file contents which
            # hopefully won't be that long.
            m = sgre.match(log)
            if m is not None:
                d = m.groupdict()
                sgnumber = d['sgnumber']
                sgstr = d['sgstr']

        res = XSDataPointlessOut()
        if sgnumber is not None:
            res.sgnumber = XSDataInteger(sgnumber)
        if sgstr is not None:
            res.sgstr = XSDataString(sgstr)
        status = XSDataStatus()
        status.isSuccess = XSDataBoolean(os.path.exists(output_file))
        res.status = status

        self.dataOutput = res
Esempio n. 4
0
    def postProcess(self):
        self.DEBUG('Pointless: postProcess')
        EDPluginExecProcessScript.postProcess(self)
        output_file = self.dataInput.output_file.value

        sgre = re.compile(""" \* Space group = '(?P<sgstr>.*)' \(number\s+(?P<sgnumber>\d+)\)""")

        sgnumber = sgstr = None
        # returns None if the file does not exist...
        log = self.readProcessLogFile()
        if log is not None:
            # we'll apply the regexp to the whole file contents which
            # hopefully won't be that long.
            m = sgre.search(log)
            if m is not None:
                d = m.groupdict()
                sgnumber = d['sgnumber']
                sgstr = d['sgstr']

        res = XSDataPointlessOut()
        if sgnumber is not None:
            res.sgnumber = XSDataInteger(sgnumber)
        if sgstr is not None:
            res.sgstr = XSDataString(sgstr)
        status = XSDataStatus()
        status.isSuccess = XSDataBoolean(os.path.exists(output_file))
        res.status = status

        self.dataOutput = res
    def postProcess(self):
        self.DEBUG('FileConversion: postProcess')
        EDPluginControl.postProcess(self)
        output_file = self.dataInput.output_file.value

        res = XSDataResult()
        status = XSDataStatus()
        status.isSuccess = XSDataBoolean(os.path.exists(self.uniqueify.dataInput.output_file.value))
        res.status = status

        self.dataOutput = res
Esempio n. 6
0
    def postProcess(self):
        self.DEBUG('Truncate: postProcess')
        EDPluginExecProcessScript.postProcess(self)
        output_file = self.dataInput.output_file.value

        res = XSDataResult()
        status = XSDataStatus()
        status.isSuccess = XSDataBoolean(os.path.exists(output_file))
        res.status = status

        self.dataOutput = res
Esempio n. 7
0
    def postProcess(self):
        self.DEBUG('Uniqueify: postProcess')
        EDPluginExecProcessScript.postProcess(self)
        output_file = self.dataInput.output_file.value

        res = XSDataResult()
        status = XSDataStatus()
        status.isSuccess = XSDataBoolean(os.path.exists(output_file))
        res.status = status

        self.dataOutput = res
    def postProcess(self):
        self.DEBUG('FileConversion: postProcess')
        EDPluginControl.postProcess(self)
        output_file = self.dataInput.output_file.value

        res = XSDataResult()
        status = XSDataStatus()
        status.isSuccess = XSDataBoolean(
            os.path.exists(self.uniqueify.dataInput.output_file.value))
        res.status = status

        self.dataOutput = res
    def parsePointlessOutput(self, _outputFile):

        sgre = re.compile(
            """ \* Space group = '(?P<sgstr>.*)' \(number\s+(?P<sgnumber>\d+)\)"""
        )

        sgnumber = sgstr = None

        res = XSDataPointlessOut()
        status = XSDataStatus()
        status.isSuccess = XSDataBoolean(False)
        if os.path.exists(_outputFile):
            res.status = status

            strLog = EDUtilsFile.readFile(_outputFile)
            if strLog is not None:
                # we'll apply the regexp to the whole file contents which
                # hopefully won't be that long.
                m = sgre.search(strLog)
                if m is not None:
                    d = m.groupdict()
                    sgnumber = d['sgnumber']
                    sgstr = d['sgstr']

                    res.sgnumber = XSDataInteger(sgnumber)
                    res.sgstr = XSDataString(sgstr)
                    status.isSuccess = XSDataBoolean(True)
                    # Search first for unit cell after the Laue group...
                    unitCellRe = re.compile(
                        """  Laue group confidence.+\\n\\n\s+Unit cell:(.+)""")
                    m2 = unitCellRe.search(strLog)
                    if m2 is None:
                        # Then search it from the end...
                        unitCellRe = re.compile(
                            """ \* Cell Dimensions : \(obsolete \- refer to dataset cell dimensions above\)\\n\\n(.+)"""
                        )
                        m2 = unitCellRe.search(strLog)
                    if m2 is not None:
                        listCell = m2.groups()[0].split()
                        xsDataCCP4Cell = XSDataCCP4Cell()
                        xsDataCCP4Cell.length_a = XSDataLength(listCell[0])
                        xsDataCCP4Cell.length_b = XSDataLength(listCell[1])
                        xsDataCCP4Cell.length_c = XSDataLength(listCell[2])
                        xsDataCCP4Cell.angle_alpha = XSDataAngle(listCell[3])
                        xsDataCCP4Cell.angle_beta = XSDataAngle(listCell[4])
                        xsDataCCP4Cell.angle_gamma = XSDataAngle(listCell[5])
                        res.cell = xsDataCCP4Cell
        return res
Esempio n. 10
0
 def finallyProcess(self, _edObject=None):
     EDPluginControl.finallyProcess(self)
     executiveSummary = os.linesep.join(self.lstExecutiveSummary)
     self.xsDataResult.status = XSDataStatus(executiveSummary=XSDataString(executiveSummary))
     self.dataOutput = self.xsDataResult
     if self.frame:
         self.frame.processing = False
Esempio n. 11
0
    def postProcess(self):
        self.DEBUG('Import: postProcess')
        EDPluginControl.postProcess(self)

        res = XSDataAutoprocImportOut()
        status = XSDataStatus()
        res.status = status
        all_good = not self.anom.isFailure() and not self.noanom.isFailure()
        status.isSuccess = XSDataBoolean(all_good)
        files = list()
        for p in [self.anom, self.noanom]:
            if not p.isFailure():
                files.append(p.dataInput.output_file)
        res.files = files

        self.dataOutput = res
Esempio n. 12
0
 def postProcess(self, _edObject=None):
     EDPluginControl.postProcess(self)
     self.DEBUG("EDPluginBioSaxsNormalizev1_0.postProcess")
     # Create some output data
     self.xsdResult.status = XSDataStatus(
         executiveSummary=XSDataString(os.linesep.join(self.lstProcessLog)))
     self.setDataOutput(self.xsdResult)
    def postProcess(self, _edObject=None):
        EDPluginControl.postProcess(self)
        self.DEBUG("EDPluginControlSaxsAnalysisv1_0.postProcess")
        # Create some output data
        strLog = """Rg   =   %.2f +/- %2f 
I(0) =   %.2e +/- %.2e
Points   %i to %i 
Quality: %4.2f%%     Aggregated: %s""" % (
            self.autoRg.rg.value, self.autoRg.rgStdev.value,
            self.autoRg.i0.value, self.autoRg.i0Stdev.value,
            self.autoRg.firstPointUsed.value, self.autoRg.lastPointUsed.value,
            self.autoRg.quality.value * 100., self.autoRg.isagregated.value)
        if self.gnom is None:
            strLog += """
datGnom failed"""
        else:
            strLog += """
Dmax    =    %12.2f       Total =   %12.2f     
Guinier =    %12.2f       Gnom =    %12.2f""" % (
                self.gnom.dmax.value, self.gnom.total.value,
                self.gnom.rgGuinier.value, self.gnom.rgGnom.value)
        if self.xVolume is None:
            strLog += """
datPorod failed"""
        else:
            strLog += """
Volume  =    %12.2f""" % (self.xVolume.value)

        xsDataResult = XSDataResultSaxsAnalysis(
            autoRg=self.autoRg,
            gnom=self.gnom,
            volume=self.xVolume,
            status=XSDataStatus(executiveSummary=XSDataString(strLog)))
        self.setDataOutput(xsDataResult)
    def postProcess(self):
        self.DEBUG('Import: postProcess')
        EDPluginControl.postProcess(self)

        res = XSDataAutoprocImportOut()
        status = XSDataStatus()
        res.status = status
        all_good = not self.anom.isFailure() and not self.noanom.isFailure()
        status.isSuccess = XSDataBoolean(all_good)
        files = list()
        for p in [self.anom, self.noanom]:
            if not p.isFailure():
                files.append(p.dataInput.output_file)
        res.files = files

        self.dataOutput = res
Esempio n. 15
0
 def finallyProcess(self, _edObject=None):
     EDPluginControl.finallyProcess(self)
     executiveSummary = os.linesep.join(self.lstExecutiveSummary)
     self.xsDataResult.status = XSDataStatus(
         executiveSummary=XSDataString(executiveSummary))
     self.dataOutput = self.xsDataResult
     EDPluginBioSaxsHPLCv1_3.dictHPLC[self.runId].reset()
Esempio n. 16
0
    def postProcess(self, _edObject=None):
        EDPluginControl.postProcess(self)
        self.DEBUG("EDPluginBioSaxsISPyBModellingv1_0.postProcess")
        # Create some output data

        xsDataResult = XSDataResultBioSaxsISPyBModellingv1_0(status=XSDataStatus(executiveSummary=XSDataString(os.linesep.join(self.lstError))))
        self.setDataOutput(xsDataResult)
 def postProcess(self, _edObject=None):
     EDPluginControl.postProcess(self)
     self.DEBUG("EDPluginControlSingleSamplev1_0.postProcess")
     # Create some output data
     xsDataResult = XSDataResultBioSaxsSingleSamplev1_0()
     xsDataResult.status = XSDataStatus(executiveSummary=XSDataString(self.strExecutiveSummary))
     self.setDataOutput(xsDataResult)
Esempio n. 18
0
 def postProcess(self, _edObject=None):
     EDPluginControl.postProcess(self)
     xsDataResult = XSDataResultBioSaxsSolutionScatteringISPyBv1_0(
         status=XSDataStatus(
             executiveSummary=XSDataString(os.linesep.join(self.lstError))))
     self.setDataOutput(xsDataResult)
     self.DEBUG("EDPluginBioSaxsSolutionScatteringISPyBv1_0.postProcess")
Esempio n. 19
0
    def postProcess(self, _edObject=None):
        EDPluginControl.postProcess(self)
        self.DEBUG("EDPluginAutoSubv1_0.postProcess")
        # Create some output data

        self.xsDataResult.status = XSDataStatus(executiveSummary=XSDataString(os.linesep.join(self.lstProcessLog)))
        self.xsDataResult.subtractedCurve = XSDataFile(XSDataString(self.subtractedCurve))        
        self.dataOutput = self.xsDataResult
Esempio n. 20
0
    def finallyProcess(self, _edObject=None):
        EDPluginControl.finallyProcess(self)

        self.xsDataResult.status = XSDataStatus(
            message=self.getXSDataMessage(),
            executiveSummary=XSDataString(
                os.linesep.join(self.getListExecutiveSummaryLines())))
        self.dataOutput = self.xsDataResult
    def postProcess(self, _edObject=None):
        EDPluginControl.postProcess(self)
        self.DEBUG("EDPluginBioSaxsProcessOneFilev1_4.postProcess")
        # Create some output data
        if os.path.exists(self.integratedCurve):
            self.xsDataResult.integratedCurve = XSDataFile(XSDataString(self.integratedCurve))

        self.xsDataResult.status = XSDataStatus(executiveSummary=XSDataString(os.linesep.join(self.lstExecutiveSummary)))
        self.setDataOutput(self.xsDataResult)
Esempio n. 22
0
    def postProcess(self, _edObject=None):
        EDPluginControl.postProcess(self)
        EDVerbose.DEBUG("EDPluginBioSaxsAzimutIntv1_1.postProcess")

        # Create some output data
        strLog = os.linesep.join(self.lstProcessLog)
        self.xsdResult.status = XSDataStatus(executiveSummary=XSDataString(strLog))
        self.setDataOutput(self.xsdResult)
        EDVerbose.DEBUG("EDPluginBioSaxsAzimutIntv1_1.postProces: Comments generated: " + os.linesep + strLog)
Esempio n. 23
0
    def postProcess(self, _edObject=None):
        EDPluginExecProcessScript.postProcess(self)
        self.DEBUG("EDPluginExecDamminv0_2.postProcess")
        # Create some output data
        cwd = self.getWorkingDirectory()
        model = XSDataSaxsModel(name=XSDataString("dammin"))

        xsDataResult = XSDataResultDammin(model=model)
        pathLogFile = os.path.join(cwd, "dammin.log")
        pathFitFile = os.path.join(cwd, "dammin.fit")
        pathFirFile = os.path.join(cwd, "dammin.fir")
        pathMoleculeFile = os.path.join(cwd, "dammin-1.pdb")
        pathSolventFile = os.path.join(cwd, "dammin-0.pdb")

        try:
            res = parse_atsas.parsePDB(pathMoleculeFile, pathMoleculeFile)
        except Exception as error:
            self.ERROR("EDPluginExecDamminv0_2:parsePDB: %s" % error)
        else:
            for k in res:
                self.__setattr__(k, res[k])

        if os.path.exists(pathLogFile):
            xsDataResult.logFile = model.logFile = XSDataFile(
                XSDataString(pathLogFile))
            if not self.Rfactor:
                self.Rfactor = self.returnDamminRFactor()
            if self.Rfactor:
                xsDataResult.rfactor = model.rfactor = XSDataDouble(
                    self.Rfactor)
        if os.path.exists(pathFitFile):
            xsDataResult.fitFile = model.fitFile = XSDataFile(
                XSDataString(pathFitFile))
        if os.path.exists(pathFirFile):
            model.firFile = XSDataFile(XSDataString(pathFirFile))
            xsDataResult.chiSqrt = model.chiSqrt = self.returnDamminChiSqrt()
        if os.path.exists(pathMoleculeFile):
            xsDataResult.pdbMoleculeFile = model.pdbFile = XSDataFile(
                XSDataString(pathMoleculeFile))
        if os.path.exists(pathSolventFile):
            xsDataResult.pdbSolventFile = XSDataFile(
                XSDataString(pathSolventFile))

        if self.volume:
            model.volume = XSDataDouble(self.volume)
        if self.Rg:
            model.rg = XSDataDouble(self.Rg)
        if self.Dmax:
            model.dmax = XSDataDouble(self.Dmax)

        self.generateExecutiveSummary()
        xsDataResult.status = XSDataStatus(
            message=self.getXSDataMessage(),
            executiveSummary=XSDataString(
                os.linesep.join(self.getListExecutiveSummaryLines())))
        self.dataOutput = xsDataResult
    def parsePointlessOutput(self, _outputFile):
        
        sgre = re.compile(""" \* Space group = '(?P<sgstr>.*)' \(number\s+(?P<sgnumber>\d+)\)""")

        sgnumber = sgstr = None

        res = XSDataPointlessOut()
        status = XSDataStatus()
        status.isSuccess = XSDataBoolean(False)
        if os.path.exists(_outputFile):
            res.status = status

            strLog = EDUtilsFile.readFile(_outputFile)
            if strLog is not None:
                # we'll apply the regexp to the whole file contents which
                # hopefully won't be that long.
                m = sgre.search(strLog)
                if m is not None:
                    d = m.groupdict()
                    sgnumber = d['sgnumber']
                    sgstr = d['sgstr']

                    res.sgnumber = XSDataInteger(sgnumber)
                    res.sgstr = XSDataString(sgstr)
                    status.isSuccess = XSDataBoolean(True)
                    # Search first for unit cell after the Laue group...
                    unitCellRe = re.compile("""  Laue group confidence.+\\n\\n\s+Unit cell:(.+)""")
                    m2 = unitCellRe.search(strLog)
                    if m2 is None:
                        # Then search it from the end...
                        unitCellRe = re.compile(""" \* Cell Dimensions : \(obsolete \- refer to dataset cell dimensions above\)\\n\\n(.+)""")
                        m2 = unitCellRe.search(strLog)
                    if m2 is not None:
                        listCell = m2.groups()[0].split()
                        xsDataCCP4Cell = XSDataCCP4Cell()
                        xsDataCCP4Cell.length_a = XSDataLength(listCell[0])
                        xsDataCCP4Cell.length_b = XSDataLength(listCell[1])
                        xsDataCCP4Cell.length_c = XSDataLength(listCell[2])
                        xsDataCCP4Cell.angle_alpha = XSDataAngle(listCell[3])
                        xsDataCCP4Cell.angle_beta = XSDataAngle(listCell[4])
                        xsDataCCP4Cell.angle_gamma = XSDataAngle(listCell[5])
                        res.cell = xsDataCCP4Cell
        return res
Esempio n. 25
0
    def postProcess(self, _edObject=None):
        EDPluginExecProcessScript.postProcess(self)
        self.DEBUG("EDPluginExecDamstartv0_2.postProcess")
        model = XSDataSaxsModel(name=XSDataString("damstart"))
        xsDataResult = XSDataResultDamstart(model=model)

        xsDataResult.outputPdbFile = model.pdbFile = XSDataFile(XSDataString(os.path.join(self.getWorkingDirectory(), self.__strOutputPdbFileName)))
        xsDataResult.status = XSDataStatus(message=self.getXSDataMessage(),
                                          executiveSummary=XSDataString(os.linesep.join(self.getListExecutiveSummaryLines())))
        self.setDataOutput(xsDataResult)
Esempio n. 26
0
    def postProcess(self, _edObject=None):
        EDPluginControl.postProcess(self)
        EDVerbose.DEBUG("EDPluginBioSaxsAzimutIntv1_0.postProcess")

        #remove the terminal carriage return
        if self.strProcessLog.endswith("\n"):
           self.strProcessLog = self.strProcessLog[:-1]
        # Create some output data
        self.xsdResult.setStatus(XSDataStatus(executiveSummary=XSDataString(self.strProcessLog)))
        self.setDataOutput(self.xsdResult)
        EDVerbose.DEBUG("Comment generated ...\n" + self.strProcessLog)
Esempio n. 27
0
 def postProcess(self, _edObject=None):
     EDPluginControl.postProcess(self)
     self.DEBUG("EDPluginBioSaxsSmartMergev1_0.postProcess")
     # Create some output data
     xsDataResult = XSDataResultBioSaxsSmartMergev1_0()
     xsDataResult.mergedCurve = self.dataInput.mergedCurve
     executiveSummary = os.linesep.join(self.lstSummary)
     xsDataResult.status = XSDataStatus(
         executiveSummary=XSDataString(executiveSummary))
     self.setDataOutput(xsDataResult)
     self.DEBUG(executiveSummary)
Esempio n. 28
0
    def postProcess(self, _edObject=None):
        EDPluginControl.postProcess(self)
        self.DEBUG("EDPluginBioSaxsProcessOneFilev1_1.postProcess")
        # Create some output data
        xsDataResult = XSDataResultBioSaxsProcessOneFilev1_0()

        xsDataResult.normalizedImage = self.normalizedImage
        xsDataResult.integratedImage = self.integratedImage
        xsDataResult.integratedCurve = self.integratedCurve
        xsDataResult.status = XSDataStatus(executiveSummary=XSDataString(os.linesep.join(self.lstExecutiveSummary)))
        self.setDataOutput(xsDataResult)
Esempio n. 29
0
    def postProcess(self, _edObject=None):
        EDPluginControl.postProcess(self)
        self.DEBUG("EDPluginBioSaxsNormalizev1_1.postProcess")

        if os.path.isfile(self.strNormalizedImage):
            xsNormFile = XSDataImage()
            xsNormFile.setPath(XSDataString(self.strNormalizedImage))
            self.xsdResult.setNormalizedImage(xsNormFile)
        self.xsdResult.status = XSDataStatus(executiveSummary=XSDataString(os.linesep.join(self.lstProcessLog)))
        # Create some output data
        self.setDataOutput(self.xsdResult)
Esempio n. 30
0
    def postProcess(self, _edObject=None):
        EDPluginControl.postProcess(self)
        self.DEBUG("EDPluginBioSaxsProcessOneFilev1_3.postProcess")
        # Create some output data
        xsDataResult = XSDataResultBioSaxsProcessOneFilev1_0()
        if os.path.exists(self.integratedCurve):
            xsDataResult.integratedCurve = XSDataFile(XSDataString(self.integratedCurve))
        xsDataResult.sample = self.sample
        xsDataResult.experimentSetup = self.experimentSetup

        xsDataResult.status = XSDataStatus(executiveSummary=XSDataString(os.linesep.join(self.lstExecutiveSummary)))
        self.setDataOutput(xsDataResult)
Esempio n. 31
0
 def postProcess(self, _edObject=None):
     EDPluginControl.postProcess(self)
     self.DEBUG("EDPluginBioSaxsSmartMergev1_3.postProcess")
     # Create some output data
     xsDataResult = XSDataResultBioSaxsSmartMergev1_0()
     xsDataResult.mergedCurve = self.dataInput.mergedCurve
     executiveSummary = os.linesep.join(self.lstSummary)
     xsDataResult.status = XSDataStatus(executiveSummary=XSDataString(executiveSummary))
     if self.autoRg is not None:
         xsDataResult.autoRg = self.autoRg
     if self.strSubFile is not None and os.path.isfile(self.strSubFile):
         xsDataResult.subtractedCurve = XSDataFile(XSDataString(self.strSubFile))
     self.setDataOutput(xsDataResult)
Esempio n. 32
0
 def postProcess(self, _edObject=None):
     EDPluginControl.postProcess(self)
     self.DEBUG("EDPluginBioSaxsReduceFileSeriev1_0.postProcess")
     # Create some output data
     executiveSummary = os.linesep.join(self.lstSummary)
     xsDataResult = XSDataResultBioSaxsReduceFileSeriev1_0()
     xsDataResult.status = XSDataStatus(executiveSummary=XSDataString(executiveSummary))
     xsDataResult.directory1D = XSDataFile(XSDataString(self.directory1D))
     xsDataResult.directory2D = XSDataFile(XSDataString(self.directory2D))
     xsDataResult.directoryMisc = XSDataFile(XSDataString(self.directoryMisc))
     xsDataResult.mergedCurve = XSDataFile(XSDataString(self.strMergedCurve))
     self.setDataOutput(xsDataResult)
     self.DEBUG(executiveSummary)
Esempio n. 33
0
    def postProcess(self):
        self.DEBUG('FileConversion: postProcess')
        EDPluginControl.postProcess(self)
        output_file = self.dataInput.output_file.value

        # gzip the pointless multirecord file
        pointless_out = os.path.join(os.path.dirname(self.dataInput.output_file.value),
                                     self.pointless_out)
        try:
            self.DEBUG("gzip'ing pointless multirecord file {0}".format(pointless_out))
            subprocess.call(['gzip', pointless_out])
        except Exception:
            self.DEBUG("gzip'ing the file failed: {0}".format(traceback.format_exc()))

        res = XSDataFileConversionOut()
        status = XSDataStatus()
        status.isSuccess = XSDataBoolean(os.path.exists(self.uniqueify.dataInput.output_file.value))
        res.status = status
        res.pointless_sgnumber = self.pointless.dataOutput.sgnumber
        res.pointless_sgstring = self.pointless.dataOutput.sgstr
        res.aimless_log = XSDataString(self.aimless_log)
        self.dataOutput = res
    def postProcess(self):
        self.DEBUG('FileConversion: postProcess')
        EDPluginControl.postProcess(self)
        output_file = self.dataInput.output_file.value

        # gzip the aimless unmerged file
        aimless_unmerged_out = 'ep_{0}{1}_aimless_unmerged.mtz'.format(self.image_prefix, self.strAnomSuffix)
        aimless_unmerged_path = os.path.join(os.path.dirname(self.dataInput.output_file.value),
                                             aimless_unmerged_out)
        try:
            self.DEBUG("gzip'ing aimless unmerged file {0}".format(aimless_unmerged_path))
            subprocess.call(['gzip', aimless_unmerged_path])
        except Exception:
            self.DEBUG("gzip'ing the file failed: {0}".format(traceback.format_exc()))

        # gzip the pointless multirecord file
        pointless_out = os.path.join(os.path.dirname(self.dataInput.output_file.value),
                                     self.pointless_out)
        try:
            self.DEBUG("gzip'ing pointless multirecord file {0}".format(pointless_out))
            subprocess.call(['gzip', pointless_out])
        except Exception:
            self.DEBUG("gzip'ing the file failed: {0}".format(traceback.format_exc()))

        res = XSDataFileConversionOut()
        status = XSDataStatus()
        status.isSuccess = XSDataBoolean(os.path.exists(self.uniqueify.dataInput.output_file.value))
        res.status = status
        res.pointless_sgnumber = self.pointless.dataOutput.sgnumber
        res.pointless_sgstring = self.pointless.dataOutput.sgstr
        res.pointless_cell = [XSDataDouble(self.pointless.dataOutput.cell.length_a.value),
                              XSDataDouble(self.pointless.dataOutput.cell.length_b.value),
                              XSDataDouble(self.pointless.dataOutput.cell.length_c.value),
                              XSDataDouble(self.pointless.dataOutput.cell.angle_alpha.value),
                              XSDataDouble(self.pointless.dataOutput.cell.angle_beta.value),
                              XSDataDouble(self.pointless.dataOutput.cell.angle_gamma.value)]
        res.aimless_log = XSDataString(self.aimless_log)
        self.dataOutput = res
    def postProcess(self):
        self.DEBUG('FileConversion: postProcess')
        EDPluginControl.postProcess(self)
        output_file = self.dataInput.output_file.value

        # gzip the aimless unmerged file
        aimless_unmerged_out = 'ep_{0}{1}_aimless_unmerged.mtz'.format(self.image_prefix, self.strAnomSuffix)
        aimless_unmerged_path = os.path.join(os.path.dirname(self.dataInput.output_file.value),
                                             aimless_unmerged_out)
        try:
            self.DEBUG("gzip'ing aimless unmerged file {0}".format(aimless_unmerged_path))
            subprocess.call(['gzip', aimless_unmerged_path])
        except Exception:
            self.DEBUG("gzip'ing the file failed: {0}".format(traceback.format_exc()))

        # gzip the pointless multirecord file
        pointless_out = os.path.join(os.path.dirname(self.dataInput.output_file.value),
                                     self.pointless_out)
        try:
            self.DEBUG("gzip'ing pointless multirecord file {0}".format(pointless_out))
            subprocess.call(['gzip', pointless_out])
        except Exception:
            self.DEBUG("gzip'ing the file failed: {0}".format(traceback.format_exc()))

        res = XSDataFileConversionOut()
        status = XSDataStatus()
        status.isSuccess = XSDataBoolean(os.path.exists(self.uniqueify.dataInput.output_file.value))
        res.status = status
        res.pointless_sgnumber = self.pointless.dataOutput.sgnumber
        res.pointless_sgstring = self.pointless.dataOutput.sgstr
        res.pointless_cell = [XSDataDouble(self.pointless.dataOutput.cell.length_a.value),
                              XSDataDouble(self.pointless.dataOutput.cell.length_b.value),
                              XSDataDouble(self.pointless.dataOutput.cell.length_c.value),
                              XSDataDouble(self.pointless.dataOutput.cell.angle_alpha.value),
                              XSDataDouble(self.pointless.dataOutput.cell.angle_beta.value),
                              XSDataDouble(self.pointless.dataOutput.cell.angle_gamma.value)]
        res.aimless_log = XSDataString(self.aimless_log)
        self.dataOutput = res
Esempio n. 36
0
    def postProcess(self, _edObject=None):
        EDPluginExecProcessScript.postProcess(self)
        self.DEBUG("EDPluginExecDamaverv0_2.postProcess")
        # Create some output data

        self.outputDamaverPdbFiles()
        if self.__bAutomatic:
            self.parseDamselLog()
        self.generateExecutiveSummary()
        self.__xsDataResult.status = XSDataStatus(
            message=self.getXSDataMessage(),
            executiveSummary=XSDataString(
                os.linesep.join(self.getListExecutiveSummaryLines())))
        self.dataOutput = self.__xsDataResult
Esempio n. 37
0
    def postProcess(self, _edObject=None):
        EDPluginControl.postProcess(self)
        self.DEBUG("EDPluginControlSaxsAnalysisModelingv1_0.postProcess")
        # Create some output data

        self.xsDataResult.autoRg = self.autoRg
        self.xsDataResult.gnom = self.gnom
        self.xsDataResult.volume = self.xVolume
        self.xsDataResult.status = XSDataStatus(
            message=self.getXSDataMessage(),
            executiveSummary=XSDataString(
                os.linesep.join(self.getListExecutiveSummaryLines())))

        self.setDataOutput(self.xsDataResult)
    def postProcess(self, _edObject=None):
        EDPluginControl.postProcess(self)
        self.DEBUG("EDPluginControlXdsBest.postProcess")

        self.dataOutput = XSDataOutputXdsBurnStrategy()
        self.dataOutput.status = XSDataStatus()
        # check if a XDS.HKL file has been generated
        expected = os.path.join(self._xds.getWorkingDirectory(),
                                'XDS_ASCII.HKL')
        if os.path.exists(expected):
            self.dataOutput.status.isSuccess = XSDataBoolean(True)
            self.dataOutput.xds_hkl = XSDataString(expected)
        else:
            self.dataOutput.status.isSuccess = XSDataBoolean(False)