Cis-regPred

Submitting queries

When submitting queries, please enter UniProt accession numbers (e.g., Q06263 and Q96RR4) and a valid email address. You can submit multiple queries like "Q06263,Q96RR4". When complete, an email will be sent to you. Please note that you can submit up to 10 queries at a time.

Programmatical access to Cis-regPred

You can access Cis-regPred programmatically via URL. Here are examples to submit queries and retrieve results using Python. You can submit up to 100 queries at a time. An email will be sent whenever a query was completed. Please note that queries submitted manually via our web site always have higher priority than those submitted programmatically.


import urllib2
def submit(acc, email):
    email = email.replace('@', '%40')
    url = "http://aimpred.cau.ac.kr/fetchBatch?uniprotid=" + acc + "&email="+email
    req = urllib2.Request(url)
    txt = urllib2.urlopen(req).read()    

    return txt
 

def retrieve(acc, email):
    email = email.replace('@', '%40')
    url = "http://aimpred.cau.ac.kr/fetchResult?uniprotid="+acc+"&email="+email
    req = urllib2.Request(url)
    txt = urllib2.urlopen(req).read()
    
    return txt

A code for submission


proteins=['Q06263', 'Q96RR4']
email = 'test@test.com'

for p in proteins:
    print p, '\t', submit(p, email)
    

List of return messages
Query limit reached- You submitted too many queries. Please wait until your other queries are complete.
Query submitted- Query was successfully submitted, and an email will be sent to you when done.
Already in the queue by you- You already submitted the same query and it is still in the queue.
Already in the queue by someone else - The query was already submitted by someone elase.
Result available- Result is available and you can retrieve it.
Invalid UniProt accession number- Please check the accession number. Note that only reviewed accession numbers are accepted.
Invalid email- Please check your email address.
Unidentified residues included- The protein sequence has unidentified residues, and thus it cannot be predicted.
Sequence is too short or too long- Cis-regPred accepts sequences between 100 and 3000 residues.
Unknown error- Please report to us when you encounter this error message.

A code for result retrieval


proteins=['Q06263', 'Q96RR4']
email = 'test@test.com'

for p in proteins:
    r = retrieve(p, email)

    if len(r.strip()) == 0:
        print p, 'Result is not available'
    else:
        print p, 'saved into a file'
        f=open(p+'.txt','w')
        f.write(r.replace('<br>',''))
        f.close()