PEATSA/Core/Utilities.py
def IsExtendedResidueFormat(code):

	'''Returns True if code is in extended format.
	
	That is, it contains both the residue number and the residue name
	
	Parameters:
		code: A residue code - can be normal or reduced'''
		
	isExtended = True	
	if IsReducedCode(code):
		#Check if the last element is a string or a number
		element = code[-1]
		try:
			int(element)
			isExtended = False
		except ValueError:
			pass
	else:
		#Check if there are three components separated by colons
		components = code.split(':')
		if len(components) == 2:
			isExtended = False
	
	return isExtended
Returns True if code is in extended format.
	
	That is, it contains both the residue number and the residue name
	
	Parameters:
		code: A residue code - can be normal or reduced
Returns True if code is in extended format.
That is, it contains both the residue number and the residue name
Returns True if code is in extended format . That is it contains both the residue number and the residue name
def IsExtendedResidueFormat(code):
	isExtended = True	
	if IsReducedCode(code):
		element = code[-1]
		try:
			int(element)
			isExtended = False
		except ValueError:
			pass
	else:
		components = code.split(':')
		if len(components) == 2:
			isExtended = False
	return isExtended
def IsExtendedResidueFormat ( code ) : isExtended = True if IsReducedCode ( code ) : element = code [ - 1 ] try : int ( element ) isExtended = False except ValueError : pass else : components = code . split ( ':' ) if len ( components ) == 2 : isExtended = False return isExtended
Returns True if code is in extended format.
Returns True if code is in extended format .
'''Returns True if code is in extended format.
	
	That is, it contains both the residue number and the residue name
	
	Parameters:
		code: A residue code - can be normal or reduced''' #Check if the last element is a string or a number #Check if there are three components separated by colons
code
A residue code - can be normal or reduced
A residue code - can be normal or reduced