3d-dart/server/plugins/QueryPDB.py
def Evaluate(self):
	 	
		"""First indentify type of chain in sequence"""
	 	chains = self.sequence.keys()
		if len(chains) == 0:
			print "    * ERROR: No chains found in structure, stopping"
			sys.exit(0)
		else:
		 	print("    * Found %i chains in structure" % len(chains))
			self._EvalMolType(chains)
		
		"""Find segments (if any) in chains"""
		for chain in self.moltype.keys():
			if self.moltype[chain] == 'DNA' or self.moltype[chain] == 'RNA':
				self._BackboneTrace(chain)
		
		"""Extract paired chains/segments"""
		for chain in self.chainlib.keys():
			self._FindPairs(chain)
	
		"""TEMPORARY HACK TO MAKE X3DNAANALYZE WORK"""
		if len(self.chainlib) == 1:
			for keys in self.chainlib.keys():
				self.chainlib[keys][1].reverse()
				self.pairs[keys][1].reverse()
		elif len(self.chainlib) == 2:
			chain = {}
			chain[self.chainlib.keys()[0]] = []
			for keys in self.chainlib.keys():
				chain[self.chainlib.keys()[0]].append(self.chainlib[keys][0])
			chain[self.chainlib.keys()[0]][1].reverse()
			pair = {}
			pair[self.chainlib.keys()[0]] = []
			for keys in self.pairs.keys():
				pair[self.chainlib.keys()[0]].append(self.pairs[keys][0])
			pair[self.chainlib.keys()[0]][1].reverse()
			self.chainlib = chain
			self.pairs = pair
First indentify type of chain in sequence
First indentify type of chain in sequence
First indentify type of chain in sequence
def Evaluate(self):
	 	chains = self.sequence.keys()
		if len(chains) == 0:
			print "    * ERROR: No chains found in structure, stopping"
			sys.exit(0)
		else:
		 	print("    * Found %i chains in structure" % len(chains))
			self._EvalMolType(chains)
		for chain in self.moltype.keys():
			if self.moltype[chain] == 'DNA' or self.moltype[chain] == 'RNA':
				self._BackboneTrace(chain)
		for chain in self.chainlib.keys():
			self._FindPairs(chain)
		if len(self.chainlib) == 1:
			for keys in self.chainlib.keys():
				self.chainlib[keys][1].reverse()
				self.pairs[keys][1].reverse()
		elif len(self.chainlib) == 2:
			chain = {}
			chain[self.chainlib.keys()[0]] = []
			for keys in self.chainlib.keys():
				chain[self.chainlib.keys()[0]].append(self.chainlib[keys][0])
			chain[self.chainlib.keys()[0]][1].reverse()
			pair = {}
			pair[self.chainlib.keys()[0]] = []
			for keys in self.pairs.keys():
				pair[self.chainlib.keys()[0]].append(self.pairs[keys][0])
			pair[self.chainlib.keys()[0]][1].reverse()
			self.chainlib = chain
			self.pairs = pair
def Evaluate ( self ) : chains = self . sequence . keys ( ) if len ( chains ) == 0 : print "    * ERROR: No chains found in structure, stopping" sys . exit ( 0 ) else : print ( "    * Found %i chains in structure" % len ( chains ) ) self . _EvalMolType ( chains ) """Find segments (if any) in chains""" for chain in self . moltype . keys ( ) : if self . moltype [ chain ] == 'DNA' or self . moltype [ chain ] == 'RNA' : self . _BackboneTrace ( chain ) """Extract paired chains/segments""" for chain in self . chainlib . keys ( ) : self . _FindPairs ( chain ) """TEMPORARY HACK TO MAKE X3DNAANALYZE WORK""" if len ( self . chainlib ) == 1 : for keys in self . chainlib . keys ( ) : self . chainlib [ keys ] [ 1 ] . reverse ( ) self . pairs [ keys ] [ 1 ] . reverse ( ) elif len ( self . chainlib ) == 2 : chain = { } chain [ self . chainlib . keys ( ) [ 0 ] ] = [ ] for keys in self . chainlib . keys ( ) : chain [ self . chainlib . keys ( ) [ 0 ] ] . append ( self . chainlib [ keys ] [ 0 ] ) chain [ self . chainlib . keys ( ) [ 0 ] ] [ 1 ] . reverse ( ) pair = { } pair [ self . chainlib . keys ( ) [ 0 ] ] = [ ] for keys in self . pairs . keys ( ) : pair [ self . chainlib . keys ( ) [ 0 ] ] . append ( self . pairs [ keys ] [ 0 ] ) pair [ self . chainlib . keys ( ) [ 0 ] ] [ 1 ] . reverse ( ) self . chainlib = chain self . pairs = pair
First indentify type of chain in sequence
First indentify type of chain in sequence
"""First indentify type of chain in sequence""" """Find segments (if any) in chains""" """Extract paired chains/segments""" """TEMPORARY HACK TO MAKE X3DNAANALYZE WORK"""
self