PEATSA/Core/Data.py
def mutationSetFromFilename(filename):

	'''Factory function for MutationSet class. Creates a mutation set from filename.
	
	Filename should have been created by a call to one of the MutationSet filename methods.'''

	mutationSet = MutationSet()
	codes = os.path.splitext(filename)[0]
	codes = codes.split(MutationSet.mutationSeparator)	
	for code in codes:
		data = Utilities.ParseResidueCode(code)		
		#If the residue code was in 
		if len(data) == 4:
			mutationSet.addMutation(chain=data[0], residueIndex=data[1], mutation=data[3])
		elif len(data) == 3:
			mutationSet.addMutation(chain=data[0], residueIndex=data[1], mutation=data[2])
			
	return mutationSet
Factory function for MutationSet class. Creates a mutation set from filename.
	
	Filename should have been created by a call to one of the MutationSet filename methods.
Factory function for MutationSet class. Creates a mutation set from filename.
Filename should have been created by a call to one of the MutationSet filename methods.
Factory function for MutationSet class . Creates a mutation set from filename . Filename should have been created by a call to one of the MutationSet filename methods .
def mutationSetFromFilename(filename):
	mutationSet = MutationSet()
	codes = os.path.splitext(filename)[0]
	codes = codes.split(MutationSet.mutationSeparator)	
	for code in codes:
		data = Utilities.ParseResidueCode(code)		
		if len(data) == 4:
			mutationSet.addMutation(chain=data[0], residueIndex=data[1], mutation=data[3])
		elif len(data) == 3:
			mutationSet.addMutation(chain=data[0], residueIndex=data[1], mutation=data[2])
	return mutationSet
def mutationSetFromFilename ( filename ) : mutationSet = MutationSet ( ) codes = os . path . splitext ( filename ) [ 0 ] codes = codes . split ( MutationSet . mutationSeparator ) for code in codes : data = Utilities . ParseResidueCode ( code ) if len ( data ) == 4 : mutationSet . addMutation ( chain = data [ 0 ] , residueIndex = data [ 1 ] , mutation = data [ 3 ] ) elif len ( data ) == 3 : mutationSet . addMutation ( chain = data [ 0 ] , residueIndex = data [ 1 ] , mutation = data [ 2 ] ) return mutationSet
Factory function for MutationSet class.
Factory function for MutationSet class .
'''Factory function for MutationSet class. Creates a mutation set from filename.
	
	Filename should have been created by a call to one of the MutationSet filename methods.''' #If the residue code was in 
filename