AnnoLnc2 provides 3 JSON-based web service APIs for programmatically uploading sequences and fetch bulk results. You can use the APIs by any language that can handle HTTP request and response. Please don't upload too large files, if you have demand for a large analysis, please try our standalone packages.

Name URL Parameters Return HTTP Method
Upload http://annolnc.gao-lab.org/api_upload.php

file: a file containing lncRNA sequences (less than 500) in FASTA format.

email: your email address used to apply the token. Please see Apply for token.

token: you can find the token in your email box after applying.

species: the species, only suppport mm10 and hg38 now.

The job ID. POST
Info http://annolnc.gao-lab.org/api_info.php Job id: the job ID. The run info of this job, especially the information for each sequence. Note that you can only get the download URL after all analyses are finished. Please check the run status first before fetching the download URL. POST
Fetch http://annolnc.gao-lab.org/api_fetch.php

Job id: the job ID.

The URL of the annotation results in a ZIP package. POST

To avoid the server to be overloaded, now users are required to apply tokens to use the "Upload" service. Please enter your email in the box and click "Apply". The token will be sent to your email address. If you would like to cancel running jobs, please contact [email protected].

Our APIs are very easy to be integrated into your scripts. Following are simple demos in Python 2.7.


import requests
from requests_toolbelt.multipart.encoder import MultipartEncoder
import json

#please install the related package firstly and our test Python version is 2.7, higher may be ok.


#change the input below
upload_file ='test.fa'  #the file name(include path)
email = '[email protected]'    
token = 'your_token_received_in_email' 
species='hg38'  #species, support hg38 and mm10

#upload file and run job
multipart_data = MultipartEncoder(fields={'upload_file': ('upload_file',open(upload_file,'rb')),'email': email,'token': token,'species':species})
response_upload = requests.post('http://annolnc.gao-lab.org/api_upload.php', data=multipart_data, headers={'Content-Type': multipart_data.content_type}).json()
print json.dumps(response_upload, indent = 4)

#search the information about the job and related sequences
job_id = response_upload['job_id'] #you can change the job id to your interested job id
data={'job_id': job_id}
response_info=requests.post('http://annolnc.gao-lab.org/api_info.php',data=data).json()
print json.dumps(response_info, indent = 4)

#fetch the download url of the result, notice you have to wait for the job finished to fetch the result 
job_id = response_upload['job_id'] #you can change the job id to your interested job id
data={'job_id': job_id}
response_fetch=requests.post('http://annolnc.gao-lab.org/api_fetch.php',data=data).json()
print json.dumps(response_info, indent = 4)

#and directly download it
import os 
os.system('wget '+response_fetch['download_url']) #simply unzip the downloaded file then you will get the results