PEATSA/Core/Data.py
def addMutant(self, mutant, mutationSet, quality=0.0, operations=None):
	
		'''Adds a mutant (represented by a Protool instance) to the collection. 
		
		Note: Its is assumed that mutant is an mutant of the pdb provided on initialisation
		
		Parameters:
			mutant - A protool instance representing the mutant pdb.
			mutationSet - Describes the mutations in mutant relative the receivers pdb
			quality - The bump score of the mutant. Defaults to 0.0
			operations - The operations used to create the mutant'''
			
		mutant.remove_atoms_with_tag('LIGAND')
		self.mutationList.append(copy.deepcopy(mutationSet))	
		self._updateMutationList()	
		
		#Get the mutationCode used to refer to this entry
		mutationSet.reducedDefault = self.useReducedNaming
		filename = mutationSet.defaultFilename(pdb=self.pdb)
		
		#Write out the mutant pdb to the mutants directory
		mutantDirectory = os.path.join(self.location, 'Mutants')
		filename = os.path.join(mutantDirectory, filename)
		mutant.writepdb(filename)	
		
		#Add the filename to the collection ivar.
		self.collection.append(filename)
		
		#Update the operations dict
		name = mutationSet.codeString(pdb=self.pdb, reduced=False)
		if operations is not None:
			self.mutationOperations[name] = operations
			self._updateMutationOperations()
			
		#Update scores matrix
		if self.mutationScores is None:
			self.mutationScores = Matrix.PEATSAMatrix(rows=[[name, 'Created', quality]],
						 headers=['Mutations', 'Score', 'Result'])
		else:				 
			self.mutationScores.addRow([name, 'Created', quality])
		
		#Write scores
		f = open(os.path.join(self.location, 'Scores.csv'), 'w+')		
		f.write(self.mutationScores.csvRepresentation())
		f.close()
Adds a mutant (represented by a Protool instance) to the collection. 
		
		Note: Its is assumed that mutant is an mutant of the pdb provided on initialisation
		
		Parameters:
			mutant - A protool instance representing the mutant pdb.
			mutationSet - Describes the mutations in mutant relative the receivers pdb
			quality - The bump score of the mutant. Defaults to 0.0
			operations - The operations used to create the mutant
Adds a mutant (represented by a Protool instance) to the collection.
Note: Its is assumed that mutant is an mutant of the pdb provided on initialisation

A protool instance representing the mutant pdb.
mutationSet - Describes the mutations in mutant relative the receivers pdb
quality - The bump score of the mutant. Defaults to 0.0
operations - The operations used to create the mutant
Adds a mutant ( represented by a Protool instance ) to the collection . Note : Its is assumed that mutant is an mutant of the pdb provided on initialisation A protool instance representing the mutant pdb . mutationSet - Describes the mutations in mutant relative the receivers pdb quality - The bump score of the mutant . Defaults to 0 . 0 operations - The operations used to create the mutant
def addMutant(self, mutant, mutationSet, quality=0.0, operations=None):
		mutant.remove_atoms_with_tag('LIGAND')
		self.mutationList.append(copy.deepcopy(mutationSet))	
		self._updateMutationList()	
		mutationSet.reducedDefault = self.useReducedNaming
		filename = mutationSet.defaultFilename(pdb=self.pdb)
		mutantDirectory = os.path.join(self.location, 'Mutants')
		filename = os.path.join(mutantDirectory, filename)
		mutant.writepdb(filename)	
		self.collection.append(filename)
		name = mutationSet.codeString(pdb=self.pdb, reduced=False)
		if operations is not None:
			self.mutationOperations[name] = operations
			self._updateMutationOperations()
		if self.mutationScores is None:
			self.mutationScores = Matrix.PEATSAMatrix(rows=[[name, 'Created', quality]],
						 headers=['Mutations', 'Score', 'Result'])
		else:				 
			self.mutationScores.addRow([name, 'Created', quality])
		f = open(os.path.join(self.location, 'Scores.csv'), 'w+')		
		f.write(self.mutationScores.csvRepresentation())
		f.close()
def addMutant ( self , mutant , mutationSet , quality = 0.0 , operations = None ) : mutant . remove_atoms_with_tag ( 'LIGAND' ) self . mutationList . append ( copy . deepcopy ( mutationSet ) ) self . _updateMutationList ( ) mutationSet . reducedDefault = self . useReducedNaming filename = mutationSet . defaultFilename ( pdb = self . pdb ) mutantDirectory = os . path . join ( self . location , 'Mutants' ) filename = os . path . join ( mutantDirectory , filename ) mutant . writepdb ( filename ) self . collection . append ( filename ) name = mutationSet . codeString ( pdb = self . pdb , reduced = False ) if operations is not None : self . mutationOperations [ name ] = operations self . _updateMutationOperations ( ) if self . mutationScores is None : self . mutationScores = Matrix . PEATSAMatrix ( rows = [ [ name , 'Created' , quality ] ] , headers = [ 'Mutations' , 'Score' , 'Result' ] ) else : self . mutationScores . addRow ( [ name , 'Created' , quality ] ) f = open ( os . path . join ( self . location , 'Scores.csv' ) , 'w+' ) f . write ( self . mutationScores . csvRepresentation ( ) ) f . close ( )
Adds a mutant (represented by a Protool instance) to the collection.
Adds a mutant ( represented by a Protool instance ) to the collection .
'''Adds a mutant (represented by a Protool instance) to the collection. 
		
		Note: Its is assumed that mutant is an mutant of the pdb provided on initialisation
		
		Parameters:
			mutant - A protool instance representing the mutant pdb.
			mutationSet - Describes the mutations in mutant relative the receivers pdb
			quality - The bump score of the mutant. Defaults to 0.0
			operations - The operations used to create the mutant''' #Get the mutationCode used to refer to this entry #Write out the mutant pdb to the mutants directory #Add the filename to the collection ivar. #Update the operations dict #Update scores matrix #Write scores
self
mutant
mutationSet
quality
operations