def setParams(self, optargs, useglobalparams=True):
     self.parser = OptionParser()
     if useglobalparams is True:
         self.setupGlobalParserOptions()
     self.setupParserOptions()
     self.params = apParam.convertParserToParams(self.parser)
     self.checkForDuplicateCommandLineInputs(optargs)
	def setParams(self,optargs,useglobalparams=True):
		self.parser = OptionParser()
		if useglobalparams is True:
			self.setupGlobalParserOptions()
		self.setupParserOptions()
		self.params = apParam.convertParserToParams(self.parser)
		self.checkForDuplicateCommandLineInputs(optargs)
def parseOptions():
	parser=OptionParser()
	parser.add_option('--tiltid', dest='tiltid', help= 'Primary key for a tilt series from appion database')
	parser.add_option('--outtiltfile', dest='tiltfile', help='PROTOMO tilt file to output')
	parser.add_option('--seriesname', dest='seriesname', help='Prefix to use as the name of the tilt series for processing')
	parser.add_option('--tar', action="store_true", dest='tar', default=False, help="Create a tarball containing files and directories")
	params=apParam.convertParserToParams(parser)
	return params
def parseOptions():
    parser = OptionParser()
    parser.add_option(
        '--tiltid',
        dest='tiltid',
        help='Primary key for a tilt series from appion database')
    parser.add_option('--outtiltfile',
                      dest='tiltfile',
                      help='PROTOMO tilt file to output')
    parser.add_option(
        '--seriesname',
        dest='seriesname',
        help='Prefix to use as the name of the tilt series for processing')
    parser.add_option('--tar',
                      action="store_true",
                      dest='tar',
                      default=False,
                      help="Create a tarball containing files and directories")
    params = apParam.convertParserToParams(parser)
    return params
	def setParams(self,optargs=sys.argv[1:]):
		self.parser = OptionParser()
		self.setupParserOptions()
		self.params = apParam.convertParserToParams(self.parser)
		self.checkForDuplicateCommandLineInputs(optargs)
		help="Second input image", metavar="FILE")
	parser.add_option("--p1", "--pickfile1", dest="pickfile1",
		help="First particle pick file", metavar="FILE")
	parser.add_option("--p2", "--pickfile2", dest="pickfile2",
		help="Second particle pick file", metavar="FILE")
	parser.add_option("-t", "--tiltangle", dest="tiltangle", type="float",
		help="Absolute tilt angle,"
		+" negative, image 1 is more compressed (tilted), "
		+" positive, image 2 is more compressed (tilted)", metavar="#")
	parser.add_option("-o", "--outfile", dest="outfile",
		help="Particle picks and tilt parameters output file", metavar="FILE")
	parser.add_option("-d", "--diam", "--pixdiam", dest="pixdiam", type="float",
		help="Approximate diameter of particle in pixels", metavar="#")
	parser.add_option("-x", "--tiltaxis", dest="tiltaxis", type="float",
		help="Approximate tilt axis angle", metavar="#")
	params = apParam.convertParserToParams(parser)
	checkConflicts(params)


	### set important parameters
	imgfile1 = params['imgfile1']
	imgfile2 = params['imgfile2']
	picks1 = readPickFile(params['pickfile1'])
	picks2 = readPickFile(params['pickfile2'])
	theta = params['tiltangle']
	outfile = params['outfile']
	pixdiam = params['pixdiam']
	tiltaxis = params['tiltaxis']

	### run tilt automation
	autotilter = autotilt.autoTilt()
        ### floats
        parser.add_option("-c", "--cc-cut", dest="cccut", type="float", default=0.5,
                help="Cross-correlation cutoff", metavar="#")
        ### strings
        parser.add_option("-s", "--sym", dest="sym",
                help="EMAN symmetry", metavar=".")
        ### true/false
        parser.add_option("-e", "--eotest", dest="eotest", default=False,
                        action="store_true", help="Determine resolution by even/odd FSC")
        ### choices
        prefvalues = ( "median", "minimum", "minlessrange" )
        parser.add_option("--preftype", "--preference-type", dest="preftype",
                help="Set preference value type", metavar="TYPE",
                type="choice", choices=prefvalues, default="minlessrange" )

        params = apParam.convertParserToParams(parser)
        if params['iter'] is None:
                apDisplay.printError("Please provide a EMAN iteration number")
        if params['hard'] is None:
                apDisplay.printError("Please provide a EMAN hard value")
        if params['sym'] is None:
                apDisplay.printError("Please provide a EMAN sym value")
        if params['mask'] is None:
                apDisplay.printError("Please provide a EMAN mask value")
        params['emandir'] = os.path.abspath(os.getcwd())
        params['rundir'] = os.path.join(params['emandir'], ("affprop%d"%(params['iter'])))
        if not os.path.isdir(params['rundir']):
                os.mkdir(params['rundir'])

        start(params)
Пример #8
0
 def setParams(self,optargs=sys.argv[1:]):
         self.parser = OptionParser()
         self.setupParserOptions()
         self.params = apParam.convertParserToParams(self.parser)
         self.checkForDuplicateCommandLineInputs(optargs)