3d-dart/server/plugins/QueryPDB.py
def GetSequence(self,pdbxml=None):
	 			
		"""Append sequence and resid nr of all chains in pdb to seqlib"""
		query = Xpath(pdbxml)
		
		query.Evaluate(query={1:{'element':'chain','attr':None}})
		for chain in query.nodeselection[1]:
			query.getAttr(node=chain,selection='ID',export='string')
		chains = query.result
		query.ClearResult()
		
		for chain in chains:
			query.Evaluate(query={1:{'element':'chain','attr':{'ID':chain}},2:{'element':'resid','attr':None}})
			for resid in query.nodeselection[2]:
				query.getAttr(node=resid,selection=['ID','nr'])
			residues = query.result 
			resid = []
			resnr = []
			for residue in residues:
				resid.append(residue[0])
				resnr.append(residue[1])
			self.seqlib[chain] = []	
			self.seqlib[chain].append(resid)
			self.seqlib[chain].append(resnr)
			query.ClearResult()
Append sequence and resid nr of all chains in pdb to seqlib
Append sequence and resid nr of all chains in pdb to seqlib
Append sequence and resid nr of all chains in pdb to seqlib
def GetSequence(self,pdbxml=None):
		query = Xpath(pdbxml)
		query.Evaluate(query={1:{'element':'chain','attr':None}})
		for chain in query.nodeselection[1]:
			query.getAttr(node=chain,selection='ID',export='string')
		chains = query.result
		query.ClearResult()
		for chain in chains:
			query.Evaluate(query={1:{'element':'chain','attr':{'ID':chain}},2:{'element':'resid','attr':None}})
			for resid in query.nodeselection[2]:
				query.getAttr(node=resid,selection=['ID','nr'])
			residues = query.result 
			resid = []
			resnr = []
			for residue in residues:
				resid.append(residue[0])
				resnr.append(residue[1])
			self.seqlib[chain] = []	
			self.seqlib[chain].append(resid)
			self.seqlib[chain].append(resnr)
			query.ClearResult()
def GetSequence ( self , pdbxml = None ) : query = Xpath ( pdbxml ) query . Evaluate ( query = { 1 : { 'element' : 'chain' , 'attr' : None } } ) for chain in query . nodeselection [ 1 ] : query . getAttr ( node = chain , selection = 'ID' , export = 'string' ) chains = query . result query . ClearResult ( ) for chain in chains : query . Evaluate ( query = { 1 : { 'element' : 'chain' , 'attr' : { 'ID' : chain } } , 2 : { 'element' : 'resid' , 'attr' : None } } ) for resid in query . nodeselection [ 2 ] : query . getAttr ( node = resid , selection = [ 'ID' , 'nr' ] ) residues = query . result resid = [ ] resnr = [ ] for residue in residues : resid . append ( residue [ 0 ] ) resnr . append ( residue [ 1 ] ) self . seqlib [ chain ] = [ ] self . seqlib [ chain ] . append ( resid ) self . seqlib [ chain ] . append ( resnr ) query . ClearResult ( )
Append sequence and resid nr of all chains in pdb to seqlib
Append sequence and resid nr of all chains in pdb to seqlib
"""Append sequence and resid nr of all chains in pdb to seqlib"""
self
pdbxml