Commit bf196bb1 authored by lmueller's avatar lmueller
Browse files

fixed pfam bug in resolve_dbxrefs.py

parent 5ea07f52
......@@ -18,11 +18,11 @@ j = json.loads(json_file)
def sort_refs(ref_list):
refs = {}
for ref in ref_list:
ble = ref.split(':')
if ble[0] in refs:
refs[ble[0]].append(ble[0] + ":" + ble[1])
sp = ref.split(':')
if sp[0] in refs:
refs[sp[0]].append(sp[0] + ":" + sp[1])
else:
refs[ble[0]] = [ble[0] + ":" + ble[1]]
refs[sp[0]] = [sp[0] + ":" + sp[1]]
return (refs)
script_dir = args.scripts
......@@ -35,8 +35,8 @@ for c in j['computations']:
di.append(json.loads(str(subprocess.check_output(script_dir + "retrieve_enzyme.py " + " ".join(refs['EC']), shell=True).rstrip())[2:-1]))
if 'GO' in refs:
di.append(json.loads(str(subprocess.check_output(script_dir + "retrieve_gene_ontology.py " + " ".join(refs['GO']), shell=True).rstrip())[2:-1]))
# if 'PFAM' in refs:
# di = json.loads(str(subprocess.check_output(script_dir + "retrieve_pfam.py " + " ".join(refs['PFAM']), shell=True).rstrip())[2:-1])
if 'PFAM' in refs:
di.append(json.loads(str(subprocess.check_output(script_dir + "retrieve_pfam.py " + " ".join(refs['PFAM']), shell=True).rstrip())[2:-1]))
if 'SO' in refs:
di.append(json.loads(str(subprocess.check_output(script_dir + "retrieve_sequence_ontology.py " + " ".join(refs['SO']), shell=True).rstrip())[2:-1]))
if 'UniProtKB/Swiss-Prot' in refs:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment