Mercurial > repos > proteore > proteore_reactome
comparison reactome_analysis.py @ 3:988a6f43acdb draft
planemo upload commit 49c20fec48bcda2dec68fe4b26c9fb1c7554aefe-dirty
| author | proteore |
|---|---|
| date | Tue, 11 Dec 2018 09:20:46 -0500 |
| parents | db63d069b5e6 |
| children | 34097acf457c |
comparison
equal
deleted
inserted
replaced
| 2:db63d069b5e6 | 3:988a6f43acdb |
|---|---|
| 53 if header == "true": | 53 if header == "true": |
| 54 idens = [x.split("\t")[int(identifiers[3].replace("c", ""))-1] for x in mq[1:]] | 54 idens = [x.split("\t")[int(identifiers[3].replace("c", ""))-1] for x in mq[1:]] |
| 55 else: | 55 else: |
| 56 idens = [x.split("\t")[int(identifiers[3].replace("c", ""))-1] for x in mq] | 56 idens = [x.split("\t")[int(identifiers[3].replace("c", ""))-1] for x in mq] |
| 57 ids = "\n".join(id_valid(idens)[0]) | 57 ids = "\n".join(id_valid(idens)[0]) |
| 58 json_string = os.popen("curl -H \"Content-Type: text/plain\" -d \"$(printf '%s')\" -X POST --url www.reactome.org/AnalysisService/identifiers/\?pageSize\=1\&page\=1 2> /dev/null" % ids).read() | 58 json_string = os.popen("curl -H \"Content-Type: text/plain\" -d \"$(printf '%s')\" -X POST --url www.reactome.org/AnalysisService/identifiers/\?pageSize\=1\&page\=1 2> stderr" % ids).read() |
| 59 if len(id_valid(idens)[1]) > 0: | 59 if len(id_valid(idens)[1]) > 0: |
| 60 trash = id_valid(idens)[1] | 60 trash = id_valid(idens)[1] |
| 61 #print(json_string) | 61 #print(json_string) |
| 62 j = json.loads(json_string) | 62 j = json.loads(json_string) |
| 63 print ("Identifiers not found: " + str(j["identifiersNotFound"])) | 63 print ("Identifiers not found: " + str(j["identifiersNotFound"])) |
