API - Documentation

LEGO-CSM offers an API (Application Programming Interface) to assist users in integrating our predictions into their research pipelines.

In summary, all jobs submitted to our server are labelled with a unique ID which is further used to query the status (in queue, running, finished).

Below we detail the definitions used to query our API and show examples using curl:

Job submissions
POST

Arguments

  • prot_seq (required) - Amino acid sequence of a protein of interest
  • pdb(optional) - 4-character ID code for a structures in the PDB
  • af2 (optional) - Uniprot Accession code for a given protein in the Uniprot database
  • email (optional) - If provided an message will be sent when the results are ready

Return

  • job_id - ID used for uniquely identify each job

Example

  • curl

										
$ curl https://biosig.lab.uq.edu.au/lego_csm/api/predict -X POST \
	-i -F prot_seq="MAALSGGGGGGAEPGQALFNGDMEPEAGAGAGAAASSAADPAIPEEVWNIKQMIKLT\
	QEHIEALLDKFGGEHNPPSIYLEAYEEYTSKLDALQQREQQLLESLGNGTDFSVSSSASMDTVTSSSSSSLSVL\
	PSSLSVFQNPTDVARSNPKSPQKPIVRVFLPNKQRTVVPARCGVTVRDSLKKALMMRGLIPECCAVYRIQDGEK\
	KPIGWDTDISWLTGEELHVEVLENVPLTTHNFVRK"
										
									

Return

										
{
	"job_id": "api_167408724348"
}
										
									
Retrieve job results
GET

Arguments

  • job_id - ID used for uniquely identify each job. Generated upon submission

Example

  • curl

										
$ curl https://biosig.lab.uq.edu.au/lego_csm/api/predict -X GET \
	-F job_id="api_167408724348"
										
									

Return

For jobs still being processed or waiting on queue, the message below will be returned from querying this endpoint:
										
{
	"job_id": "api_167408724348",
	"status": "RUNNING"
}

										
									
For jobs successfully processed by LEGO-CSM, the following data will be returned
										

{
    "job_id": "api_167408724348", 
    "lego_predictions": {
        "ec_prediction": {
            "annotation": "Non-Enzyme", 
            "description": "-"
        }, 
        "subcellular_localisation": "Cytoplasm (0086)"
    }, 
    "protein_details": {
        "isoeletric_point": 4.73, 
        "molar_extinction_coefficient": 22460.0, 
        "molecular_weight": 25.74, 
        "ncharge": 13.0, 
        "npolar": 52.0, 
        "pcharge": 11.0, 
        "polar": 26.0, 
		"sequence": "MAALSGGGGGGAEPGQALFNGDMEPEAGAGAGAAASSAADPAIPEEVWNI \
					KQMIKLTQEHIEALLDKFGGEHNPPSIYLEAYEEYTSKLDALQQREQQLLES \
					LGNGTDFSVSSSASMDTVTSSSSSSLSVLPSSLSVFQNPTDVARSNPKSPQKP \
					IVRVFLPNKQRTVVPARCGVTVRDSLKKALMMRGLIPECCAVYRIQDGEKKPI \
					GWDTDISWLTGEELHVEVLENVPLTTHNFVRK", 
        "uv_absorbance": 872.57
    }
    "go_predictions": {
        "GO:0000003": {
            "description": "Reproduction", 
            "ontology": "Biological process", 
            "probability": 0.713
        }, 
        "GO:0000018": {
            "description": "Regulation of dna recombination", 
            "ontology": "Biological process", 
            "probability": 1.0
        }, 
        "GO:0000041": {
            "description": "Transition metal ion transport", 
            "ontology": "Biological process", 
            "probability": 1.0
        }, 
        "GO:0000075": {
            "description": "Cell cycle checkpoint signaling", 
            "ontology": "Biological process", 
            "probability": 0.997
        }, 

		.
		.
		.

        "GO:2001252": {
            "description": "Positive regulation of chromosome organization", 
            "ontology": "Biological process", 
            "probability": 1.0
        }, 
        "GO:2001257": {
            "description": "Regulation of cation channel activity", 
            "ontology": "Biological process", 
            "probability": 1.0
        }
    }, 
}