ヒストリーの作成
$ python history_create_history.py 126a89c98a5d1a2c234edf2651024a03
http://192.168.56.10:8080/api/histories
“RNA-seq
01
”
{... , u'id': u'03501d7626bd192f', ... , u'name': u'RNA-seq 01'}
入力ファイルのアップロード
$ python upload_to_history.py 126a89c98a5d1a2c234edf2651024a03
http://192.168.56.10:8080
03501d7626bd192f \
/home/galaxy/galaxy-dist/scripts/api/upload_to_history.py
{u'outputs': [{... , u'id': u'1fad1eaf5f4f1766',}]}
ワークフローの実行
$ python ~/galaxy-dist/scripts/api/workflow_execute.py 126a89c98a5d1a2c234edf2651024a03 \
http://192.168.56.10:8080/api/workflows
ebfb8f50c6abde6d 'hist_id=03501d7626bd192f' '62=hda=1fad1eaf5f4f1766'
$ python ~/galaxy-dist/scripts/api/history_create_history.py
usage: history_create_history.py key url [name]
$ python history_create_history.py 126a89c98a5d1a2c234edf2651024a03
http://192.168.56.10:8080/api/histories
“RNA-seq
01
”
{... , u'id': u'03501d7626bd192f', ... , u'name': u'RNA-seq 01'}
$ python ~/galaxy-dist/scripts/api/upload_to_history.py
history_upload.py
$ python ~/galaxy-dist/scripts/api/upload_to_history.py 126a89c98a5d1a2c234edf2651024a03 \
http://192.168.56.10:8080
0a248a1f62a0cc04 /home/galaxy/galaxy-dist/scripts/api/upload_to_history.py
Galaxy API を使ったワークフローの実行
$ python ~/galaxy-dist/scripts/api/workflow_execute.py
usage: workflow_execute.py key url workflow_id history step=src=dataset_id
SELECT s.id
FROM workflow w, workflow_step s
WHERE w.id = s.workflow_id
AND s.type = 'data_input'
AND w.name = 'ChIP-seq 02 v001'
ORDER BY order_index DESC
例: 新しいヒストリーを作成する場合
$ python ~/galaxy-dist/scripts/api/workflow_execute.py 126a89c98a5d1a2c234edf2651024a03 \
http://192.168.56.10:8080/api/workflows
03501d7626bd192f 'new history'
例: 既存のヒストリーで実行する場合
$ python ~/galaxy-dist/scripts/api/workflow_execute.py 126a89c98a5d1a2c234edf2651024a03 \
http://192.168.56.10:8080/api/workflows
ebfb8f50c6abde6d 'hist_id=df7a1f0c02a5b08e' '1=hda=a799d38679e985db'