Snippets

Biosig Lab toxCSM API for single SMILES - POST

Updated by Alex de Sá

File toxcsm_api_smiles_post.py Modified

  • Ignore whitespace
  • Hide word diff
 import requests
 import sys
 
-URL = "http://biosig.unimelb.edu.au/tox_csm/api/predict"
+URL = "https://biosig.lab.uq.edu.au/toxcsm/api/predict"
 
 def main(args):   
     params = {
Updated by Alex de Sá

File toxcsm_api_smiles_post.py Modified

  • Ignore whitespace
  • Hide word diff
 
 if __name__ == "__main__":
     parser = argparse.ArgumentParser(description='Job submission for a single SMILES\n')
-    parser.add_argument('--smiles_string',  dest='smiles_string', type=str, help='Single SMILES String', required=False, default=None)    
+    parser.add_argument('--smiles_string',  dest='smiles_string', type=str, help='Single SMILES string', required=False, default=None)    
     parser.add_argument('--pred_type',  dest='pred_type', type=str, help='prediction mode: all (default), organic, environmental, human_dose_response, nuclear_response, stress_response', required=False, default="all") 
-    parser.add_argument('--email_address',  dest='email_address', type=str, help='Single SMILES String', required=False, default="")
+    parser.add_argument('--email_address',  dest='email_address', type=str, help='E-mail address string', required=False, default="")
 
     args = parser.parse_args()
     if args.smiles_string == None:
Updated by Alex de Sá

File toxcsm_api_smiles_post.py Modified

  • Ignore whitespace
  • Hide word diff
 import requests
 import sys
 
-URL = "http://http://biosig.unimelb.edu.au/tox_csm/api/predict"
+URL = "http://biosig.unimelb.edu.au/tox_csm/api/predict"
 
 def main(args):   
     params = {
Updated by Alex de Sá

File toxcsm_api_smiles_post.py Modified

  • Ignore whitespace
  • Hide word diff
 
     args = parser.parse_args()
     if args.smiles_string == None:
-        print('usage: python toxcsm_api_get.py --smiles_string SMILES_STRING [--pred_type PREDICTION_TYPE] [--email_address YOUR_EMAIL]')
+        print('usage: python toxcsm_api_smiles_post.py --smiles_string SMILES_STRING [--pred_type PREDICTION_TYPE] [--email_address YOUR_EMAIL]')
         sys.exit(1)
 
     main(args)
Updated by Alex de Sá

File toxcsm_api_smiles_post.py Modified

  • Ignore whitespace
  • Hide word diff
 
     args = parser.parse_args()
     if args.smiles_string == None:
-        print('usage: python toxcsm_api_smiles_post.py --smiles_string SMILES_STRING [--pred_type PREDICTION_TYPE] [--email_address YOUR_EMAIL]')
+        print('usage: python toxcsm_api_get.py --smiles_string SMILES_STRING [--pred_type PREDICTION_TYPE] [--email_address YOUR_EMAIL]')
         sys.exit(1)
 
     main(args)
  1. 1
  2. 2
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.