PEATSA/Core/Data.py
def addMutant(self, mutant, autoUpdate=True, ignoreDuplicates=False):
	
		'''Adds an entry for mutant to the mutation list file.
		
		Parameters: 
			mutant - A MutationSet instance.
			autoUpdate - The underlying file is updated automatically.
			
		Errors: 
			If the file is not writable an IOError is raised.
			If mutant is not a MutationSet instance an Exceptions.MutationListEntryError is raised'
			If the receiver already contains the mutant an Exceptions.MutationListDuplicatEntryError is raised
			'''
		if not ignoreDuplicates:	
			if self.mutants.count(mutant) is not 0:
				raise Exceptions.MutationListDuplicatEntryError, "Mutant %s is already present in the list" % mutant
	
		self.mutants.append(mutant)

		if autoUpdate:
			try:
				self.writeToFile()
			except Exceptions.MutationListEntryError:
				self.mutants.remove(mutant)
				raise
Adds an entry for mutant to the mutation list file.
		
		Parameters: 
			mutant - A MutationSet instance.
			autoUpdate - The underlying file is updated automatically.
			
		Errors: 
			If the file is not writable an IOError is raised.
			If mutant is not a MutationSet instance an Exceptions.MutationListEntryError is raised'
			If the receiver already contains the mutant an Exceptions.MutationListDuplicatEntryError is raised
			
Adds an entry for mutant to the mutation list file.
Parameters:
mutant - A MutationSet instance.
autoUpdate - The underlying file is updated automatically.

If the file is not writable an IOError is raised.
If mutant is not a MutationSet instance an Exceptions.MutationListEntryError is raised'
If the receiver already contains the mutant an Exceptions.MutationListDuplicatEntryError is raised
Adds an entry for mutant to the mutation list file . Parameters : mutant - A MutationSet instance . autoUpdate - The underlying file is updated automatically . If the file is not writable an IOError is raised . If mutant is not a MutationSet instance an Exceptions . MutationListEntryError is raised ' If the receiver already contains the mutant an Exceptions . MutationListDuplicatEntryError is raised
def addMutant(self, mutant, autoUpdate=True, ignoreDuplicates=False):
		if not ignoreDuplicates:	
			if self.mutants.count(mutant) is not 0:
				raise Exceptions.MutationListDuplicatEntryError, "Mutant %s is already present in the list" % mutant
		self.mutants.append(mutant)
		if autoUpdate:
			try:
				self.writeToFile()
			except Exceptions.MutationListEntryError:
				self.mutants.remove(mutant)
				raise
def addMutant ( self , mutant , autoUpdate = True , ignoreDuplicates = False ) : if not ignoreDuplicates : if self . mutants . count ( mutant ) is not 0 : raise Exceptions . MutationListDuplicatEntryError , "Mutant %s is already present in the list" % mutant self . mutants . append ( mutant ) if autoUpdate : try : self . writeToFile ( ) except Exceptions . MutationListEntryError : self . mutants . remove ( mutant ) raise
Adds an entry for mutant to the mutation list file.
Adds an entry for mutant to the mutation list file .
'''Adds an entry for mutant to the mutation list file.
		
		Parameters: 
			mutant - A MutationSet instance.
			autoUpdate - The underlying file is updated automatically.
			
		Errors: 
			If the file is not writable an IOError is raised.
			If mutant is not a MutationSet instance an Exceptions.MutationListEntryError is raised'
			If the receiver already contains the mutant an Exceptions.MutationListDuplicatEntryError is raised
			'''
self
mutant
autoUpdate
ignoreDuplicates