Mercurial > repos > iuc > ena_upload
comparison check_remote.py @ 6:4aab5ae907b6 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ena_upload commit 7eafac9d91b39e43fd3820ab1431cab1c930bb01"
| author | iuc | 
|---|---|
| date | Mon, 15 Nov 2021 11:47:13 +0000 | 
| parents | 26ccb678abc8 | 
| children | 
   comparison
  equal
  deleted
  inserted
  replaced
| 5:e1b3b37aa69f | 6:4aab5ae907b6 | 
|---|---|
| 10 Checks if an entry with that alias exists in the ENA repos | 10 Checks if an entry with that alias exists in the ENA repos | 
| 11 entry_type = [study | sample | experiment | run] | 11 entry_type = [study | sample | experiment | run] | 
| 12 ''' | 12 ''' | 
| 13 assert entry_type in ['study', 'sample', 'experiment', 'run'] | 13 assert entry_type in ['study', 'sample', 'experiment', 'run'] | 
| 14 params_dict = {} | 14 params_dict = {} | 
| 15 query_str = ' AND '.join(['%s=%s' % (key, value) for (key, value) in query_dict.items()]) | 15 query_str = ' AND '.join(['%s="%s"' % (key, value) for (key, value) in query_dict.items()]) | 
| 16 params_dict['query'] = query_str | 16 params_dict['query'] = query_str | 
| 17 params_dict['result'] = 'read_' + entry_type | 17 params_dict['result'] = 'read_' + entry_type | 
| 18 params_dict['fields'] = entry_type + '_alias' | 18 params_dict['fields'] = entry_type + '_alias' | 
| 19 params_dict['format'] = out_format | 19 params_dict['format'] = out_format | 
| 20 response = requests.post(URL, data=params_dict) | 20 response = requests.post(URL, data=params_dict) | 
