mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 00:12:08 +08:00
Cleaned up codebase for attempting adding api additions to the galaxy main branch
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
#!/usr/bin/env python
|
||||
"""
|
||||
# Author: RPARK
|
||||
API script for deleting workflows
|
||||
# ---------------------------------------------- #
|
||||
# PARKLAB, Author: RPARK
|
||||
API example script for deleting workflows
|
||||
# ---------------------------------------------- #
|
||||
|
||||
Example calls:
|
||||
python workflow_delete.py <api_key> <galaxy_url>/api/workflows/<workflow id> True
|
||||
"""
|
||||
|
||||
import os, sys
|
||||
@@ -1,23 +1,13 @@
|
||||
#!/usr/bin/env python
|
||||
"""
|
||||
# ---------------------------------------------- #
|
||||
# PARKLAB, Author: RPARK
|
||||
# ---------------------------------------------- #
|
||||
|
||||
Execute workflows from the command line.
|
||||
Example calls:
|
||||
python workflow_execute.py <api_key> <galaxy_url>/api/workflows f2db41e1fa331b3e 'Test API History' '38=ldda=0qr350234d2d192f'
|
||||
python workflow_execute.py <api_key> <galaxy_url>/api/workflows f2db41e1fa331b3e 'hist_id=a912e9e5d84530d4' '38=hda=03501d7626bd192f'
|
||||
"""
|
||||
|
||||
"""
|
||||
python workflow_execute.py <api_key> <galaxy_url>/api/workflows f2db41e1fa331b3e 'hist_id=a912e9e5d84530d4' '38=hda=03501d7626bd192f' 'param=tool=name=value'
|
||||
|
||||
'param=tool=name=value'
|
||||
|
||||
Example
|
||||
python workflow_execute_parameters.py 35a24ae2643785ff3d046c98ea362c7f http://localhost:8080/api/workflows 1cd8e2f6b131e891 'Test API' '69=ld=a799d38679e985db' '70=ld=33b43b4e7093c91f' 'param=peakcalling_spp=aligner=bwa'
|
||||
|
||||
python workflow_execute_parameters.py 35a24ae2643785ff3d046c98ea362c7f http://localhost:8080/api/workflows 1cd8e2f6b131e891 'Test API' '69=ld=a799d38679e985db' '70=ld=33b43b4e7093c91f' 'param=peakcalling_spp=aligner=arachne' 'param=bowtie_wrapper=suppressHeader=True'
|
||||
|
||||
python workflow_execute_parameters.py 35a24ae2643785ff3d046c98ea362c7f http://localhost:8080/api/workflows 1cd8e2f6b131e891 'Test API' '69=ld=a799d38679e985db' '70=ld=33b43b4e7093c91f' 'param=peakcalling_spp=aligner=bowtie' 'param=bowtie_wrapper=suppressHeader=True' 'param=peakcalling_spp=window_size=1000'
|
||||
|
||||
python workflow_execute.py <api_key> <galaxy_url>/api/workflows <workflow_id> 'hist_id=<history_id>' '38=hda=<file_id>' 'param=tool=name=value'
|
||||
python workflow_execute_parameters.py <api_key> http://localhost:8080/api/workflows 1cd8e2f6b131e891 'Test API' '69=ld=a799d38679e985db' '70=ld=33b43b4e7093c91f' 'param=peakcalling_spp=aligner=bowtie' 'param=bowtie_wrapper=suppressHeader=True' 'param=peakcalling_spp=window_size=1000'
|
||||
"""
|
||||
|
||||
import os, sys
|
||||
@@ -34,7 +24,6 @@ def main():
|
||||
data['ds_map'] = {}
|
||||
|
||||
#########################################################
|
||||
### MY EDITS ############################################
|
||||
### Trying to pass in parameter for my own dictionary ###
|
||||
data['parameters'] = {};
|
||||
|
||||
@@ -51,14 +40,10 @@ def main():
|
||||
except ValueError:
|
||||
print("VALUE ERROR:");
|
||||
wtype, wtool, wparam, wvalue = v.split('=');
|
||||
data['parameters'][wtool] = {'param':wparam, 'value':wvalue}
|
||||
|
||||
|
||||
#########################################################
|
||||
### MY EDITS ############################################
|
||||
### Trying to pass in parameter for my own dictionary ###
|
||||
#data['parameters']['bowtie'] = {'param':'stepSize', 'value':100}
|
||||
#data['parameters']['sam_to_bam'] = {'param':'genome', 'value':'hg18'}
|
||||
try:
|
||||
data['parameters'][wtool] = {'param':wparam, 'value':wvalue}
|
||||
except ValueError:
|
||||
print("TOOL ID ERROR:");
|
||||
|
||||
except IndexError:
|
||||
print 'usage: %s key url workflow_id history step=src=dataset_id' % os.path.basename(sys.argv[0])
|
||||
|
||||
Reference in New Issue
Block a user