PEATSA/Core/Data.py
def ParseMutationList(filename):
	
	'''Parses the mutation lists in filename.
	
	Note: Currently no checking is performed to see if the format or content is valid'''
	
	stream = open(filename)
	#Simple parse
	lines = [line.strip('\n') for line in stream.readlines()]
	stream.close()
	lines = [line.split(",") for line in lines]
	mutationList = []
	for line in lines:
		code = line[0].strip()
		chain, residueIndex = Utilities.ParseResidueCode(code)
		mutations = [element.strip() for element in line[1:]]
		for mutation in mutations:
			listElement = MutationSet()
			listElement.addMutation(chain, residueIndex, mutation)
			mutationList.append(listElement)
		
	return mutationList
Parses the mutation lists in filename.
	
	Note: Currently no checking is performed to see if the format or content is valid
Parses the mutation lists in filename.
Note: Currently no checking is performed to see if the format or content is valid
Parses the mutation lists in filename . Note : Currently no checking is performed to see if the format or content is valid
def ParseMutationList(filename):
	stream = open(filename)
	lines = [line.strip('\n') for line in stream.readlines()]
	stream.close()
	lines = [line.split(",") for line in lines]
	mutationList = []
	for line in lines:
		code = line[0].strip()
		chain, residueIndex = Utilities.ParseResidueCode(code)
		mutations = [element.strip() for element in line[1:]]
		for mutation in mutations:
			listElement = MutationSet()
			listElement.addMutation(chain, residueIndex, mutation)
			mutationList.append(listElement)
	return mutationList
def ParseMutationList ( filename ) : stream = open ( filename ) lines = [ line . strip ( '\n' ) for line in stream . readlines ( ) ] stream . close ( ) lines = [ line . split ( "," ) for line in lines ] mutationList = [ ] for line in lines : code = line [ 0 ] . strip ( ) chain , residueIndex = Utilities . ParseResidueCode ( code ) mutations = [ element . strip ( ) for element in line [ 1 : ] ] for mutation in mutations : listElement = MutationSet ( ) listElement . addMutation ( chain , residueIndex , mutation ) mutationList . append ( listElement ) return mutationList
Parses the mutation lists in filename.
Parses the mutation lists in filename .
'''Parses the mutation lists in filename.
	
	Note: Currently no checking is performed to see if the format or content is valid''' #Simple parse
filename