PEATSA/Core/Utilities.py
def parseCommandLine(self):

		'''Parses the command line
		
		Execeptions:
			Raises Exceptions.ArgumentError if there was a problem with the arguments supplied'''
	
		try:
			#getopt does not want the "-" or "--" when being called
			self.opt = getopt.getopt(sys.argv[1:], 
					"vw:p:o:hn:", 
					["pKa", "scan", "delta-pKa", "path", "modes", "stability", 
					"mutationList=", "mutation=", "mutants=", "ligand=", "mutationQuality="
					"ionisableGroups=", "configurationFile=", "create-configuration", "keepHeterogens"])
			self.opt = dict(self.opt[0])
		except getopt.GetoptError, data:
			raise Exceptions.ArgumentError, data

		if not self.opt.has_key("-w") and not self.createConfigurationRequested():
			raise Exceptions.ArgumentError, "Working directory (-w) must be specified"
		
		if not self.opt.has_key("-p") and not self.createConfigurationRequested():	
			raise Exceptions.ArgumentError, "PDB (-p) must be specified"
		
		#Check if any of the optional flags were specified		
		counts = [self.opt.keys().count(option) for option in self.optionalArguments]
		value = reduce(lambda x,y: x+y, counts)
		if value == 0 and  not self.createConfigurationRequested():
			self.environment.output('[PEAT-SA] Performing pka scan, stability analysis, ENM analysis and transition path finding')
			#Add the options arguments
			for option in self.optionalArguments:
				if option != '--mutationList':
					self.opt[option] = ""	

		#Add the output directory information if none was supplied	
		if not self.opt.has_key("-o"):
			self.opt["-o"] = os.getcwd()
			self.environment.output('[PEAT-SA] No output directory specified - Defaulting to %s' % self.opt["-o"])
		else:
			self.environment.output('[PEAT-SA] Output directory is %s' % self.opt["-o"])
	
		#Make any supplied paths absolute
		self.__fixPaths__()
Parses the command line
		
		Execeptions:
			Raises Exceptions.ArgumentError if there was a problem with the arguments supplied
Parses the command line
Execeptions:
Raises Exceptions.ArgumentError if there was a problem with the arguments supplied
Parses the command line Execeptions : Raises Exceptions . ArgumentError if there was a problem with the arguments supplied
def parseCommandLine(self):
		try:
			self.opt = getopt.getopt(sys.argv[1:], 
					"vw:p:o:hn:", 
					["pKa", "scan", "delta-pKa", "path", "modes", "stability", 
					"mutationList=", "mutation=", "mutants=", "ligand=", "mutationQuality="
					"ionisableGroups=", "configurationFile=", "create-configuration", "keepHeterogens"])
			self.opt = dict(self.opt[0])
		except getopt.GetoptError, data:
			raise Exceptions.ArgumentError, data
		if not self.opt.has_key("-w") and not self.createConfigurationRequested():
			raise Exceptions.ArgumentError, "Working directory (-w) must be specified"
		if not self.opt.has_key("-p") and not self.createConfigurationRequested():	
			raise Exceptions.ArgumentError, "PDB (-p) must be specified"
		counts = [self.opt.keys().count(option) for option in self.optionalArguments]
		value = reduce(lambda x,y: x+y, counts)
		if value == 0 and  not self.createConfigurationRequested():
			self.environment.output('[PEAT-SA] Performing pka scan, stability analysis, ENM analysis and transition path finding')
			for option in self.optionalArguments:
				if option != '--mutationList':
					self.opt[option] = ""	
		if not self.opt.has_key("-o"):
			self.opt["-o"] = os.getcwd()
			self.environment.output('[PEAT-SA] No output directory specified - Defaulting to %s' % self.opt["-o"])
		else:
			self.environment.output('[PEAT-SA] Output directory is %s' % self.opt["-o"])
		self.__fixPaths__()
def parseCommandLine ( self ) : try : self . opt = getopt . getopt ( sys . argv [ 1 : ] , "vw:p:o:hn:" , [ "pKa" , "scan" , "delta-pKa" , "path" , "modes" , "stability" , "mutationList=" , "mutation=" , "mutants=" , "ligand=" , "mutationQuality=" "ionisableGroups=" , "configurationFile=" , "create-configuration" , "keepHeterogens" ] ) self . opt = dict ( self . opt [ 0 ] ) except getopt . GetoptError , data : raise Exceptions . ArgumentError , data if not self . opt . has_key ( "-w" ) and not self . createConfigurationRequested ( ) : raise Exceptions . ArgumentError , "Working directory (-w) must be specified" if not self . opt . has_key ( "-p" ) and not self . createConfigurationRequested ( ) : raise Exceptions . ArgumentError , "PDB (-p) must be specified" counts = [ self . opt . keys ( ) . count ( option ) for option in self . optionalArguments ] value = reduce ( lambda x , y : x + y , counts ) if value == 0 and not self . createConfigurationRequested ( ) : self . environment . output ( '[PEAT-SA] Performing pka scan, stability analysis, ENM analysis and transition path finding' ) for option in self . optionalArguments : if option != '--mutationList' : self . opt [ option ] = "" if not self . opt . has_key ( "-o" ) : self . opt [ "-o" ] = os . getcwd ( ) self . environment . output ( '[PEAT-SA] No output directory specified - Defaulting to %s' % self . opt [ "-o" ] ) else : self . environment . output ( '[PEAT-SA] Output directory is %s' % self . opt [ "-o" ] ) self . __fixPaths__ ( )
Parses the command line
Execeptions:
Raises Exceptions.ArgumentError if there was a problem with the arguments supplied
Parses the command line Execeptions : Raises Exceptions . ArgumentError if there was a problem with the arguments supplied
'''Parses the command line
		
		Execeptions:
			Raises Exceptions.ArgumentError if there was a problem with the arguments supplied''' #getopt does not want the "-" or "--" when being called #Check if any of the optional flags were specified		 #Add the options arguments #Add the output directory information if none was supplied	 #Make any supplied paths absolute
self