本文整理汇总了Python中SOAPpy.SOAPProxy.getSequence方法的典型用法代码示例。如果您正苦于以下问题:Python SOAPProxy.getSequence方法的具体用法?Python SOAPProxy.getSequence怎么用?Python SOAPProxy.getSequence使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SOAPpy.SOAPProxy
的用法示例。
在下文中一共展示了SOAPProxy.getSequence方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_brenda_info
# 需要导入模块: from SOAPpy import SOAPProxy [as 别名]
# 或者: from SOAPpy.SOAPProxy import getSequence [as 别名]
def get_brenda_info(ecnum):
"""Returns protein sequence and accompanying info from brenda database"""
url = "http://www.brenda-enzymes.info/soap2/brenda_server.php"
client = SOAPProxy(url)
result = client.getSequence("ecNumber*%s" % ecnum)
result_lines = result.split("#")
ecnum = result_lines[0].split("*")
final_info = []
currinfo = {"ecNumber": ecnum[1]}
for info in result_lines[1:-1]:
key, value = info.split("*")
if key == "!ecNumber":
final_info.append(currinfo)
currinfo = {"ecNumber": value}
else:
currinfo[key] = value
final_info.append(currinfo)
return final_info
示例2: str
# 需要导入模块: from SOAPpy import SOAPProxy [as 别名]
# 或者: from SOAPpy.SOAPProxy import getSequence [as 别名]
BRENDA_URL="http://www.brenda-enzymes.org/soap2/brenda_server.php"
CLIENT=SOAPProxy(BRENDA_URL)
EC_NUMBERS=CLIENT.getEcNumbersFromEcNumber().split("!")
print EC_NUMBERS
#Second, get all uniprots per EC
UNIPROT_COFACTOR_IONS_DICT={}
for EC in EC_NUMBERS[5609:]: #if stuck at 4.1.99.18, start at [5236:]
print EC
#Get uniprot list per EC
while True:
try:
BRENDA_URL="http://www.brenda-enzymes.org/soap2/brenda_server.php"
CLIENT=SOAPProxy(BRENDA_URL)
UNIPROT_STRING=CLIENT.getSequence("ecNumber*%s#organism*Homo sapiens"%EC).split("!")
if UNIPROT_STRING==[""]: UNIPROT_STRING=[]
UNIPROTS=[]
if (not UNIPROT_STRING)==False:
UNIPROTS=[X.split("#")[3].split("*")[1] for X in UNIPROT_STRING]
UNIPROTS=filter(lambda x: x!="more", UNIPROTS)
print UNIPROTS
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):
示例3: SOAPProxy
# 需要导入模块: from SOAPpy import SOAPProxy [as 别名]
# 或者: from SOAPpy.SOAPProxy import getSequence [as 别名]
#Learning BRENDA SOAPpy
import string, socket, time
from SOAPpy import SOAPProxy, WSDL
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):