コード例 #1
0
ファイル: protocol_cltomo.py プロジェクト: I2PC/scipion
    def runCLTomo(self):
        fnVols=self._getPath('input_volumes.xmd')
        writeSetOfVolumes(self.inputVolumes.get(), fnVols)
        params= ' -i '            + fnVols + \
                ' --oroot '       + self._getExtraPath("results") + \
                ' --iter '        + str(self.numberOfIterations.get()) + \
                ' --nref '        + str(self.numberOfReferences.get()) + \
                ' --sym '         + self.symmetry.get() + \
                ' --maxFreq '     + str(self.maximumResolution.get()) + \
                ' --sparsity '    + str(self.sparsity.get()/100.0) + \
                ' --DWTsparsity ' + str(self.dwtSparsity.get()/100.0) + \
                ' --maxShiftX '   + str(self.maxShiftX.get()) + \
                ' --maxShiftY '   + str(self.maxShiftY.get()) + \
                ' --maxShiftZ '   + str(self.maxShiftZ.get()) + \
                ' --maxRot '      + str(self.maxRot.get()) + \
                ' --maxTilt '     + str(self.maxTilt.get()) + \
                ' --maxPsi '      + str(self.maxPsi.get())
        if self.doGenerateInitial.get():
            params+=' --nref0 '+str(self.numberOfReferences0.get())
            if self.randomizeOrientation.get():
                params+=' --randomizeStartingOrientation'
        else:
            fnInitialVols=self._getExtraPath('intial_volumes.xmd')
            writeSetOfVolumes(self.referenceList.get(), fnInitialVols)
            params+=' --ref0 '+fnInitialVols
        if self.inputMask.hasValue():
            params+=' --mask binary_file '+self.inputMask.get().getLocation()
        if self.generateAligned.get():
            params+=" --generateAlignedVolumes"
        if not self.align:
            params+=" --dontAlign"

        self.runJob('xmipp_mpi_classify_CLTomo','%d %s'%(self.numberOfMpi.get(),params),env=self.getCLTomoEnviron(),numberOfMpi=1)
コード例 #2
0
    def runCLTomo(self):
        fnVols = self._getPath("input_volumes.xmd")
        writeSetOfVolumes(self.inputVolumes.get(), fnVols)
        params = (
            " -i "
            + fnVols
            + " --oroot "
            + self._getExtraPath("results")
            + " --iter "
            + str(self.numberOfIterations.get())
            + " --nref "
            + str(self.numberOfReferences.get())
            + " --sym "
            + self.symmetry.get()
            + " --maxFreq "
            + str(self.maximumResolution.get())
            + " --sparsity "
            + str(self.sparsity.get() / 100.0)
            + " --DWTsparsity "
            + str(self.dwtSparsity.get() / 100.0)
            + " --maxShiftX "
            + str(self.maxShiftX.get())
            + " --maxShiftY "
            + str(self.maxShiftY.get())
            + " --maxShiftZ "
            + str(self.maxShiftZ.get())
            + " --maxRot "
            + str(self.maxRot.get())
            + " --maxTilt "
            + str(self.maxTilt.get())
            + " --maxPsi "
            + str(self.maxPsi.get())
        )
        if self.doGenerateInitial.get():
            params += " --nref0 " + str(self.numberOfReferences0.get())
            if self.randomizeOrientation.get():
                params += " --randomizeStartingOrientation"
        else:
            fnInitialVols = self._getExtraPath("intial_volumes.xmd")
            writeSetOfVolumes(self.referenceList.get(), fnInitialVols)
            params += " --ref0 " + fnInitialVols
        if self.inputMask.hasValue():
            params += " --mask binary_file " + self.inputMask.get().getLocation()
        if self.generateAligned.get():
            params += " --generateAlignedVolumes"
        if self.dontAlign.get():
            params += " --dontAlign"

        self.runJob(
            "xmipp_mpi_classify_CLTomo",
            "%d %s" % (self.numberOfMpi.get(), params),
            env=self.getCLTomoEnviron(),
            numberOfMpi=1,
        )
コード例 #3
0
 def convertInputStep(self):
     printLicense()
     self.info('Wrinting pytom xml file: ' + self.volXml)
     volsDir = self._getExtraPath('inputVolumes')
     pwutils.makePath(volsDir)
     writeSetOfVolumes(self.inputVolumes.get(), self.volXml, volsDir)
     if self.provideReferences:
         ih = em.ImageHandler()
         self.info('Converting input references')
         for r, vol in enumerate(self.inputReferences.get()):
             refFn = self._getExtraPath('reference_%02d.mrc' % (r+1))
             ih.convert(vol, refFn)
コード例 #4
0
 def convertInputStep(self):
     printLicense()
     self.info('Writing pytom xml file: ' + self.volXml)
     volsDir = self._getExtraPath('inputVolumes')
     pwutils.makePath(volsDir)
     writeSetOfVolumes(self.inputVolumes.get(), self.volXml, volsDir)
     ih = em.ImageHandler()
     
     self.info('Converting input reference to: ' + self.refVol)
     ih.convert(self.inputReference.get(), self.refVol)
     
     self.info('Converting input mask to: ' + self.maskVol)
     ih.convert(self.alignmentMask.get(), self.maskVol)
コード例 #5
0
    def runCLTomo(self):
        fnVols = self._getPath('input_volumes.xmd')
        writeSetOfVolumes(self.inputVolumes.get(), fnVols)
        params= ' -i '            + fnVols + \
                ' --oroot '       + self._getExtraPath("results") + \
                ' --iter '        + str(self.numberOfIterations.get()) + \
                ' --nref '        + str(self.numberOfReferences.get()) + \
                ' --sym '         + self.symmetry.get() + \
                ' --maxFreq '     + str(self.maximumResolution.get()) + \
                ' --sparsity '    + str(self.sparsity.get()/100.0) + \
                ' --DWTsparsity ' + str(self.dwtSparsity.get()/100.0) + \
                ' --maxShiftX '   + str(self.maxShiftX.get()) + \
                ' --maxShiftY '   + str(self.maxShiftY.get()) + \
                ' --maxShiftZ '   + str(self.maxShiftZ.get()) + \
                ' --maxRot '      + str(self.maxRot.get()) + \
                ' --maxTilt '     + str(self.maxTilt.get()) + \
                ' --maxPsi '      + str(self.maxPsi.get())
        if self.doGenerateInitial.get():
            params += ' --nref0 ' + str(self.numberOfReferences0.get())
            if self.randomizeOrientation.get():
                params += ' --randomizeStartingOrientation'
        else:
            fnInitialVols = self._getExtraPath('intial_volumes.xmd')
            writeSetOfVolumes(self.referenceList.get(), fnInitialVols)
            params += ' --ref0 ' + fnInitialVols
        if self.inputMask.hasValue():
            params += ' --mask binary_file ' + self.inputMask.get(
            ).getLocation()
        if self.generateAligned.get():
            params += " --generateAlignedVolumes"
        if not self.align:
            params += " --dontAlign"

        self.runJob('xmipp_mpi_classify_CLTomo',
                    '%d %s' % (self.numberOfMpi.get(), params),
                    env=self.getCLTomoEnviron(),
                    numberOfMpi=1)