API - Documentation
Here we offer an API (Application Programming Interface) to assist users in integrating CSM-Toxin into their research pipelines.
In summary, all jobs submitted to our server are labelled with a unique ID which is used to query the status (in queue, processing, processed).
Job Submission - (POST) https://biosig.lab.uq.edu.au/csm_toxin/api/predict
Arguments
- fasta_file (required) - file in FASTA format
Return
- job_id - ID used for uniquely identify each job
Examples
-
curl
$ curl https://biosig.lab.uq.edu.au/csm_toxin/api/predict -X POST \ -F fasta_file=@/home/ubuntu/input.fasta
{ "job_id": "api_1666592886652309" }
Retrieve Results - (GET) https://biosig.lab.uq.edu.au/csm_toxin/api/predict
Arguments
- job_id - ID used for uniquely identify each job. Generated upon submission
Return
For jobs still being processed or waiting on queue, the message below will be returned from querying this endpoint:
{
"job_id": "api_1666592886652309",
"status": "RUNNING"
}
For jobs successfully processed by CSM-Toxin, the following data will be returned
Examples
-
curl
$ curl https://biosig.lab.uq.edu.au/csm_toxin/api/predict -X GET \ -F job_id=api_1666592886652309
{ "test1": { "prediction_class": "Toxin", "prediction_probability": 0.516, "length": 283, "aa_aliphatic_count": 103, "aa_aromatic_count": 17, "aa_nonpolar_count": 157, "aa_polar_count": 126, "aa_charged_count": 87, "netCharge": -8.71, "hydrophobicity": -0.118, "molecular_weight": 30422.98 }, "test2": { "prediction_class": "Non-Toxin", "prediction_probability": 0.544, "length": 34, "aa_aliphatic_count": 14, "aa_aromatic_count": 5, "aa_nonpolar_count": 25, "aa_polar_count": 9, "aa_charged_count": 6, "netCharge": -1.099, "hydrophobicity": 0.903, "molecular_weight": 3787.556 }, "test3": { "prediction_class": "Non-Toxin", "prediction_probability": 0.007, "length": 88, "aa_aliphatic_count": 27, "aa_aromatic_count": 7, "aa_nonpolar_count": 47, "aa_polar_count": 41, "aa_charged_count": 23, "netCharge": -7.182, "hydrophobicity": -0.192, "molecular_weight": 9660.826 }, "test4": { "prediction_class": "Toxin", "prediction_probability": 0.908, "length": 71, "aa_aliphatic_count": 12, "aa_aromatic_count": 3, "aa_nonpolar_count": 42, "aa_polar_count": 29, "aa_charged_count": 19, "netCharge": -3.737, "hydrophobicity": -0.496, "molecular_weight": 7517.463 }, "test5": { "prediction_class": "Non-Toxin", "prediction_probability": 0.997, "length": 112, "aa_aliphatic_count": 33, "aa_aromatic_count": 16, "aa_nonpolar_count": 58, "aa_polar_count": 54, "aa_charged_count": 38, "netCharge": 7.877, "hydrophobicity": -0.296, "molecular_weight": 13664.23 } }