PEATSA/Core/Data.py
def addMutation(self, chain, residueIndex, mutation):
	
		'''Adds the change of residue at position residueIndex in chain to mutation
		
		Errors:
			Raises an Exceptions.MutationCodeFormatError if there is a problem with any of the parameters'''
		
		if len(mutation) == 1:
			try:
				mutation = Utilities.InvertedCodeDictionary()[mutation]
			except KeyError:
				raise Exceptions.MutationCodeFormatError, "Unknown single letter residue code %s" % mutation	
	
		if Utilities.allResidues.count(mutation.upper()) is not 1:
			raise Exceptions.MutationCodeFormatError, "Unknown residue code %s" % mutation
	
		if len(chain) > 1:
			raise Exceptions.MutationCodeFormatError, "Invalid value for chain id (%s) - must be a single letter, number of blank" % chain
	
		residueCode = Utilities.CreateResidueCode(chain, int(residueIndex))
		self.mutationCodeList.append(residueCode + ':' + mutation)
Adds the change of residue at position residueIndex in chain to mutation
		
		Errors:
			Raises an Exceptions.MutationCodeFormatError if there is a problem with any of the parameters
Adds the change of residue at position residueIndex in chain to mutation
Errors:
Raises an Exceptions.MutationCodeFormatError if there is a problem with any of the parameters
Adds the change of residue at position residueIndex in chain to mutation Errors : Raises an Exceptions . MutationCodeFormatError if there is a problem with any of the parameters
def addMutation(self, chain, residueIndex, mutation):
		if len(mutation) == 1:
			try:
				mutation = Utilities.InvertedCodeDictionary()[mutation]
			except KeyError:
				raise Exceptions.MutationCodeFormatError, "Unknown single letter residue code %s" % mutation	
		if Utilities.allResidues.count(mutation.upper()) is not 1:
			raise Exceptions.MutationCodeFormatError, "Unknown residue code %s" % mutation
		if len(chain) > 1:
			raise Exceptions.MutationCodeFormatError, "Invalid value for chain id (%s) - must be a single letter, number of blank" % chain
		residueCode = Utilities.CreateResidueCode(chain, int(residueIndex))
		self.mutationCodeList.append(residueCode + ':' + mutation)
def addMutation ( self , chain , residueIndex , mutation ) : if len ( mutation ) == 1 : try : mutation = Utilities . InvertedCodeDictionary ( ) [ mutation ] except KeyError : raise Exceptions . MutationCodeFormatError , "Unknown single letter residue code %s" % mutation if Utilities . allResidues . count ( mutation . upper ( ) ) is not 1 : raise Exceptions . MutationCodeFormatError , "Unknown residue code %s" % mutation if len ( chain ) > 1 : raise Exceptions . MutationCodeFormatError , "Invalid value for chain id (%s) - must be a single letter, number of blank" % chain residueCode = Utilities . CreateResidueCode ( chain , int ( residueIndex ) ) self . mutationCodeList . append ( residueCode + ':' + mutation )
Adds the change of residue at position residueIndex in chain to mutation
Errors:
Raises an Exceptions.MutationCodeFormatError if there is a problem with any of the parameters
Adds the change of residue at position residueIndex in chain to mutation Errors : Raises an Exceptions . MutationCodeFormatError if there is a problem with any of the parameters
'''Adds the change of residue at position residueIndex in chain to mutation
		
		Errors:
			Raises an Exceptions.MutationCodeFormatError if there is a problem with any of the parameters'''
self
chain
residueIndex
mutation