PEATSA/Core/Data.py
def validateOnPDB(self, pdbFile, errors={}):
	
		'''Validates the mutants defined by the list on a pdb file
		
		Returns NO if there are problems and the dictionary errors contains the following keys
		errorString - A string describing the validation problems.
		errorList - A list continaing the mutation codes that failed validation
		
		Raises Exceptions.FileFormatError if there is a problem with the pdb'''
		
		import Protool
		
		try:
			pdb = Protool.structureIO()
			pdb.readpdb(pdbFile)
		except Exception, data:	
			raise Exceptions.FileFormatError, 'Format of specified PDB file %s not valid.\nUnderlying error - %s' % (pdbFile, data)
		
		errorList = []
		invalid = 0
		reason = ""
		retval = True
		for set in self.mutantList():
			try: 
				set.codeString(pdb=pdb)
			except Exceptions.MutationCodeApplicationError, data:
				if invalid == 0:
					first = data.mutationCode
					retval = False
					reason = data.errorString
				invalid = invalid + 1
				errorList.append(data.mutationCode)
		
		if len(errorList) != 0:
			errors["errorList"] = errorList
			errors["errorString"] = "There were %d failures in total - the first failure was with %s.\n\n%s" % (len(errorList), first, reason)
			
		return retval
Validates the mutants defined by the list on a pdb file
		
		Returns NO if there are problems and the dictionary errors contains the following keys
		errorString - A string describing the validation problems.
		errorList - A list continaing the mutation codes that failed validation
		
		Raises Exceptions.FileFormatError if there is a problem with the pdb
Validates the mutants defined by the list on a pdb file
Returns NO if there are problems and the dictionary errors contains the following keys
errorString - A string describing the validation problems.
errorList - A list continaing the mutation codes that failed validation

Raises Exceptions.FileFormatError if there is a problem with the pdb
Validates the mutants defined by the list on a pdb file Returns NO if there are problems and the dictionary errors contains the following keys errorString - A string describing the validation problems . errorList - A list continaing the mutation codes that failed validation Raises Exceptions . FileFormatError if there is a problem with the pdb
def validateOnPDB(self, pdbFile, errors={}):
		import Protool
		try:
			pdb = Protool.structureIO()
			pdb.readpdb(pdbFile)
		except Exception, data:	
			raise Exceptions.FileFormatError, 'Format of specified PDB file %s not valid.\nUnderlying error - %s' % (pdbFile, data)
		errorList = []
		invalid = 0
		reason = ""
		retval = True
		for set in self.mutantList():
			try: 
				set.codeString(pdb=pdb)
			except Exceptions.MutationCodeApplicationError, data:
				if invalid == 0:
					first = data.mutationCode
					retval = False
					reason = data.errorString
				invalid = invalid + 1
				errorList.append(data.mutationCode)
		if len(errorList) != 0:
			errors["errorList"] = errorList
			errors["errorString"] = "There were %d failures in total - the first failure was with %s.\n\n%s" % (len(errorList), first, reason)
		return retval
def validateOnPDB ( self , pdbFile , errors = { } ) : import Protool try : pdb = Protool . structureIO ( ) pdb . readpdb ( pdbFile ) except Exception , data : raise Exceptions . FileFormatError , 'Format of specified PDB file %s not valid.\nUnderlying error - %s' % ( pdbFile , data ) errorList = [ ] invalid = 0 reason = "" retval = True for set in self . mutantList ( ) : try : set . codeString ( pdb = pdb ) except Exceptions . MutationCodeApplicationError , data : if invalid == 0 : first = data . mutationCode retval = False reason = data . errorString invalid = invalid + 1 errorList . append ( data . mutationCode ) if len ( errorList ) != 0 : errors [ "errorList" ] = errorList errors [ "errorString" ] = "There were %d failures in total - the first failure was with %s.\n\n%s" % ( len ( errorList ) , first , reason ) return retval
Validates the mutants defined by the list on a pdb file
Returns NO if there are problems and the dictionary errors contains the following keys
errorString - A string describing the validation problems.
Validates the mutants defined by the list on a pdb file Returns NO if there are problems and the dictionary errors contains the following keys errorString - A string describing the validation problems .
'''Validates the mutants defined by the list on a pdb file
		
		Returns NO if there are problems and the dictionary errors contains the following keys
		errorString - A string describing the validation problems.
		errorList - A list continaing the mutation codes that failed validation
		
		Raises Exceptions.FileFormatError if there is a problem with the pdb'''
self
pdbFile
errors