本文整理汇总了Python中SOAPpy.SOAPProxy.getCofactor方法的典型用法代码示例。如果您正苦于以下问题:Python SOAPProxy.getCofactor方法的具体用法?Python SOAPProxy.getCofactor怎么用?Python SOAPProxy.getCofactor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SOAPpy.SOAPProxy
的用法示例。
在下文中一共展示了SOAPProxy.getCofactor方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: str
# 需要导入模块: from SOAPpy import SOAPProxy [as 别名]
# 或者: from SOAPpy.SOAPProxy import getCofactor [as 别名]
continue
else:
raise
except socket.error, t:
if "60" in str(t):
time.sleep(60)
continue
else:
raise
#Get Cofactors per EC
while True:
try:
BRENDA_URL="http://www.brenda-enzymes.org/soap2/brenda_server.php"
CLIENT=SOAPProxy(BRENDA_URL)
COFACTOR_STRING=CLIENT.getCofactor("ecNumber*%s"%EC).split("!") #ADD HOMO_SAPIENS FOR HUMAN ONLY!!!!!!!!
if COFACTOR_STRING==[""]: COFACTOR_STRING=[]
COFACTORS=[]
if (not COFACTOR_STRING)==False:
COFACTORS=list(set([X.split("#")[1].split("*")[1] for X in COFACTOR_STRING]))
COFACTORS=filter(lambda y: y!="more", COFACTORS)
print COFACTORS
break
except Errors.HTTPError, e:
if "502" in str(e):
time.sleep(2)
continue
else:
raise
except socket.error, t:
if "60" in str(t):
示例2: SOAPProxy
# 需要导入模块: from SOAPpy import SOAPProxy [as 别名]
# 或者: from SOAPpy.SOAPProxy import getCofactor [as 别名]
while True:
try:
endpointURL = "http://www.brenda-enzymes.org/soap2/brenda_server.php"
client = SOAPProxy(endpointURL)
print 7
#UNIPROT AC
resultString = client.getSequence("ecNumber*1.1.1.1#organism*Homo sapiens").split("!")
print resultString
for record in resultString:
print record.split("#")
ACCESSIONS=[X.split("#")[3].split("*")[1] for X in resultString]
print ACCESSIONS
print 7
#COFACTOR
print client.getCofactor("ecNumber*4.1.99.18#organism*Homo sapiens")
COFACTOR_STRING=client.getCofactor("ecNumber*4.1.99.18#organism*Homo sapiens").split("!")
print COFACTOR_STRING, len(COFACTOR_STRING)
COFACTORS=[X.split("#")[1].split("*")[1] for X in COFACTOR_STRING]
print COFACTORS
break
except socket.error, t:
if "60" in str(t):
time.sleep(2)
continue
else:
raise