Running a single prediction using API


Users can submit an API (Application Programming Interface) job with 'curl' command and PYTHON script as below.

  • pdb file (pdb_file) or pdb code (pdb_code): provide a PDB structure through a file or PDB accession code
  • carbohydrate chain (carbohydrate_chains): provide the chain ID of the carbohydrate
  • carbohydrate residue numbers (carbohydrate_res_numbers): provide the residue numbers of all carbohydrates, seperated by '_'
1. 'curl' commands
# Submitting a job using PDB FILE
curl http://biosig.unimelb.edu.au/csm_carbohydrate/api/SinglePredictionApi -X POST -i -F pdb_file=@/1GX4.pdb -F carbohydrate_chains=X -F carbohydrate_res_numbers=1_2

# Submitting a job using PDB ID
curl http://biosig.unimelb.edu.au/csm_carbohydrate/api/SinglePredictionApi -X POST -i -F pdb_code=1GX4 -F carbohydrate_chains=X -F carbohydrate_res_numbers=1_2

# Retrieving a result with JOB ID
curl http://biosig.unimelb.edu.au/csm_carbohydrate/api/SinglePredictionApi -X GET -F job_id=161201667873
                

2. or running PYTHON scripts
# Submitting a job using PDB FILE
python csm_carbohydrate_single_prediction_post.py --pdb_file 1GX4.pdb --carbohydrate_chains X --carbohydrate_res_numbers 1_2

# Submitting a job using PDB ID
python csm_carbohydrate_single_prediction_post.py --pdb_code 1GX4 --carbohydrate_chains X --carbohydrate_res_numbers 1_2

# Retrieving a result with JOB ID
python csm_carbohydrate_single_prediction_get.py --job_id 161201677094