Example #1
0
	def runPipeline(self):

		# read input file
		success = self.readInputs()	
		if success is False:
			return 1

		# run SIGMAA job
		sigmaa = SIGMAAjob(self.SIGMAAinputMtz,self.Mtz1LabelName,self.RfreeFlag,
						   self.inputPDBfile,self.outputDir,self.runLog)	
		success = sigmaa.run()
		if success is False:
			return 2
		self.CADinputMtz1 = sigmaa.outputMtz

		# run CAD job 
		cad = CADjob(self.CADinputMtz1,self.CADinputMtz2,self.CADinputMtz3,
					 self.Mtz1LabelName,self.Mtz2LabelName,self.Mtz3LabelName,
					 self.Mtz1LabelRename,self.Mtz2LabelRename,self.Mtz3LabelRename,
					 self.CADoutputMtz,self.outputDir,self.runLog)
		success = cad.run()
		if success is False:
			return 3

 		# run SCALEIT job 
		scaleit = SCALEITjob(self.SCALEITinputMtz,self.SCALEIToutputMtz,
							 self.Mtz1LabelRename,self.Mtz2LabelRename,
							 self.outputDir,self.runLog)
		success = scaleit.run()
		if success is False:
			return 4

		# end of pipeline reached	
		return 0
Example #2
0
    def combineMTZcolumns(self):

        # run CAD to combine necessary columns from input mtz files

        self.printStepNumber()

        cad = CADjob(inputMtz2=self.CADinputMtz2,
                     inputMtz3=self.CADinputMtz3,
                     Mtz2FPlabel=self.Mtz2LabelName,
                     Mtz2SIGFPlabel=self.Mtz2SIGFPlabel,
                     Mtz2LabelName=self.Mtz2LabelName,
                     Mtz3phaseLabel=self.Mtz3phaseLabel,
                     Mtz3FcalcLabel=self.Mtz3FcalcLabel,
                     Mtz2LabelRename=self.Mtz2LabelRename,
                     Mtz3LabelRename=self.Mtz3LabelRename,
                     outputMtz=self.CADoutputMtz,
                     outputDir=self.outputDir,
                     runLog=self.runLog,
                     FOMWeight=self.FOMweight,
                     ignoreSIGFs=self.ignoreSIGFs)

        if self.densMapType != 'HIGHONLY':
            cad.inputMtz1 = self.CADinputMtz1
            cad.Mtz1FPlabel = self.Mtz1LabelName
            cad.Mtz1SIGFPlabel = self.Mtz1SIGFPlabel
            cad.Mtz1LabelRename = self.Mtz1LabelRename
        else:
            cad.ignoreDset1 = True

        success = cad.run()

        if not success:
            error(text='Failure to successfully combine mtz files',
                  log=self.runLog)
Example #3
0
    def runPipeline(self):

        # run the current subroutine to parse an input
        # file and run CAD and SCALEIT to combine the
        # mtz information for a low and high dose
        # dataset within a damage series

        success = self.readInputs()
        if not success:
            return 1

            # copy input mtz files to working directory and rename
        self.moveInputMtzs()

        # run SIGMAA job if required to generate a new FOM weight column
        if self.FFTmapWeight == "recalculate":

            if self.densMapType == "2FOFC":
                mtzLbls_in = self.Mtz2LabelName
                mtzLbls_out = self.Mtz2LabelRename
            else:
                mtzLbls_in = self.Mtz1LabelName
                mtzLbls_out = self.Mtz1LabelName

            self.printStepNumber()
            sigmaa = SIGMAAjob(
                inputMtz=self.SIGMAAinputMtz,
                MtzLabelNameIn=mtzLbls_in,
                MtzLabelNameOut=mtzLbls_out,
                RfreeFlag=self.RfreeFlag1,
                inputPDB=self.inputPDBfile,
                outputDir=self.outputDir,
                runLog=self.runLog,
            )
            success = sigmaa.run()

            if not success:
                return 2

                # if 2FO-FC map required, use FWT column from sigmaa-output mtz (we are done here)
            if self.densMapType == "2FOFC":
                self.cleanUpDir()
                return 0

            self.CADinputMtz1 = sigmaa.outputMtz
        else:
            self.CADinputMtz1 = self.SIGMAAinputMtz

            # run CAD job
        self.printStepNumber()
        cad = CADjob(
            inputMtz1=self.CADinputMtz1,
            inputMtz2=self.CADinputMtz2,
            inputMtz3=self.CADinputMtz3,
            Mtz1LabelName=self.Mtz1LabelName,
            Mtz2LabelName=self.Mtz2LabelName,
            Mtz3phaseLabel=self.Mtz3phaseLabel,
            Mtz3FcalcLabel=self.Mtz3FcalcLabel,
            Mtz1LabelRename=self.Mtz1LabelRename,
            Mtz2LabelRename=self.Mtz2LabelRename,
            Mtz3LabelRename=self.Mtz3LabelRename,
            outputMtz=self.CADoutputMtz,
            outputDir=self.outputDir,
            runLog=self.runLog,
            FOMWeight=self.FFTmapWeight,
        )
        success = cad.run()

        if not success:
            return 3

            # run SCALEIT job
        if self.doScaling:
            self.printStepNumber()
            scaleit = SCALEITjob(
                inputMtz=self.SCALEITinputMtz,
                outputMtz=self.SCALEIToutputMtz,
                Mtz1Label=self.Mtz1LabelRename,
                Mtz2Label=self.Mtz2LabelRename,
                outputDir=self.outputDir,
                runLog=self.runLog,
            )
            success = scaleit.run()

            if not success:
                return 4

                # end of pipeline reached
        self.cleanUpDir()
        return 0