PEATSA/Core/Data.py
def mutationSetFromSequences(initialSequence, targetSequence, offset=0, chain='A', name=None):

	'''Returns a MutationSet representing the mutations necessary to change initialSequence to targetSequence
	
	Parameters:
		initialSequence - "WildType"
		targetSequence - "Mutant"
		offset - The difference between the index of the first aa in the initial sequence and 1
			e.g. if the first amino-acid in initialSequence string is actually the 5th
			in the real sequence then the offset is 4.
		chain - The chain the sequence corresponds to - defaults to A
		name - A name to associate with the created mutation set	  
	
	Note: If this requires insertions or deletions this method returns None'''
	
	if len(initialSequence) != len(targetSequence):
		raise Exceptions.ProteinDesignToolException, 'Sequences are not the same length'

	if initialSequence.find('-') != -1:
		return None
	elif targetSequence.find('-') != -1:
		return None	

	set = MutationSet(name=name)
	for count in range(len(initialSequence)):
		initialAA=initialSequence[count]
		targetAA=targetSequence[count]
		if initialAA != targetAA:
			set.addMutation(chain, count + offset + 1, targetAA) 
	
	return set
Returns a MutationSet representing the mutations necessary to change initialSequence to targetSequence
	
	Parameters:
		initialSequence - "WildType"
		targetSequence - "Mutant"
		offset - The difference between the index of the first aa in the initial sequence and 1
			e.g. if the first amino-acid in initialSequence string is actually the 5th
			in the real sequence then the offset is 4.
		chain - The chain the sequence corresponds to - defaults to A
		name - A name to associate with the created mutation set	  
	
	Note: If this requires insertions or deletions this method returns None
Returns a MutationSet representing the mutations necessary to change initialSequence to targetSequence
Parameters:
initialSequence - "WildType"
targetSequence - "Mutant"
offset - The difference between the index of the first aa in the initial sequence and 1
e.g. if the first amino-acid in initialSequence string is actually the 5th
in the real sequence then the offset is 4.
chain - The chain the sequence corresponds to - defaults to A
name - A name to associate with the created mutation set

If this requires insertions or deletions this method returns None
Returns a MutationSet representing the mutations necessary to change initialSequence to targetSequence Parameters : initialSequence - " WildType " targetSequence - " Mutant " offset - The difference between the index of the first aa in the initial sequence and 1 e . g . if the first amino - acid in initialSequence string is actually the 5th in the real sequence then the offset is 4 . chain - The chain the sequence corresponds to - defaults to A name - A name to associate with the created mutation set If this requires insertions or deletions this method returns None
def mutationSetFromSequences(initialSequence, targetSequence, offset=0, chain='A', name=None):
	if len(initialSequence) != len(targetSequence):
		raise Exceptions.ProteinDesignToolException, 'Sequences are not the same length'
	if initialSequence.find('-') != -1:
		return None
	elif targetSequence.find('-') != -1:
		return None	
	set = MutationSet(name=name)
	for count in range(len(initialSequence)):
		initialAA=initialSequence[count]
		targetAA=targetSequence[count]
		if initialAA != targetAA:
			set.addMutation(chain, count + offset + 1, targetAA) 
	return set
def mutationSetFromSequences ( initialSequence , targetSequence , offset = 0 , chain = 'A' , name = None ) : if len ( initialSequence ) != len ( targetSequence ) : raise Exceptions . ProteinDesignToolException , 'Sequences are not the same length' if initialSequence . find ( '-' ) != - 1 : return None elif targetSequence . find ( '-' ) != - 1 : return None set = MutationSet ( name = name ) for count in range ( len ( initialSequence ) ) : initialAA = initialSequence [ count ] targetAA = targetSequence [ count ] if initialAA != targetAA : set . addMutation ( chain , count + offset + 1 , targetAA ) return set
Returns a MutationSet representing the mutations necessary to change initialSequence to targetSequence
Parameters:
initialSequence - "WildType"
targetSequence - "Mutant"
offset - The difference between the index of the first aa in the initial sequence and 1
e.g.
Returns a MutationSet representing the mutations necessary to change initialSequence to targetSequence Parameters : initialSequence - " WildType " targetSequence - " Mutant " offset - The difference between the index of the first aa in the initial sequence and 1 e . g .
'''Returns a MutationSet representing the mutations necessary to change initialSequence to targetSequence
	
	Parameters:
		initialSequence - "WildType"
		targetSequence - "Mutant"
		offset - The difference between the index of the first aa in the initial sequence and 1
			e.g. if the first amino-acid in initialSequence string is actually the 5th
			in the real sequence then the offset is 4.
		chain - The chain the sequence corresponds to - defaults to A
		name - A name to associate with the created mutation set	  
	
	Note: If this requires insertions or deletions this method returns None'''
initialSequence
targetSequence
offset
chain
name