comparison ProteinInteractions.py @ 8:355ad1ce474b draft

Uploaded
author bornea
date Wed, 23 Mar 2016 10:45:39 -0400
parents 5935066604a7
children dd0b4c901d0a
comparison
equal deleted inserted replaced
7:0db15af8d91b 8:355ad1ce474b
94 sys.exit("More than 50 errors. Check your file or try again later.") 94 sys.exit("More than 50 errors. Check your file or try again later.")
95 if err.code == 404: 95 if err.code == 404:
96 error.write(uniprot_accession_in + '\t' + "Invalid URL. Check protein" + '\n') 96 error.write(uniprot_accession_in + '\t' + "Invalid URL. Check protein" + '\n')
97 seqlength = 'NA' 97 seqlength = 'NA'
98 genename = 'NA' 98 genename = 'NA'
99 return ReturnValue1(seqlength, genename) 99 return ReturnValue1(seqlength, genename, genename)
100 elif err.code == 302: 100 elif err.code == 302:
101 sys.exit("Request timed out. Check connection and try again.") 101 sys.exit("Request timed out. Check connection and try again.")
102 else: 102 else:
103 sys.exit("Uniprot had some other error") 103 sys.exit("Uniprot had some other error")
104 lines = data.readlines() 104 lines = data.readlines()