Skip to content

Commit

Permalink
Merge pull request #8 from johanherman/inject-siswrap-confs
Browse files Browse the repository at this point in the history
Fetch conf from Hermes and inject into Siswrap
  • Loading branch information
johandahlberg committed Sep 28, 2015
2 parents 6ab758e + 8d25769 commit 038e919
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 6 deletions.
22 changes: 22 additions & 0 deletions actions/parse_siswrap_args.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: parse_siswrap_args
runner_type: python-script
description: Parses siswrap args to json
enabled: true
entry_point: lib/parse_arguments_to_json.py
parameters:

sisyphus_conf:
default: ""
type: string
description: "String containing the entire config file for Sisyphus (not just a path to it)."

qc_conf:
default: ""
type: string
description: "String containing the entire QC criteria config file (not just a path to it)."

runfolder:
default: ""
type: string
description: "Name of the runfolder to process"
51 changes: 45 additions & 6 deletions actions/workflows/ngi_uu_workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,37 @@ workflows:
input:
url: <% $.bcl2fastq_status_url %>
on-success:
- run_sisyphus_quick_report
- download_sisyphus_config
### DEMULTIPLEX END ###


### QUICK REPORT START ###
download_sisyphus_config:
action: core.http
input:
url: <% $.hermes_base_url %>/<% $.flowcell_name %>/configfile
headers: USER=<% $.hermes_user %>&X-XSRF-TOKEN=<% $.hermes_token %>
publish:
sisyphus_conf_string: <% $.download_sisyphus_config.body.config %>
on-success:
- construct_report_body

construct_report_body:
action: arteria-packs.parse_siswrap_args
input:
runfolder: "<% $.runfolder_name %>"
sisyphus_conf: "<% $.sisyphus_conf_string %>"
publish:
report_body: <% $.construct_report_body.stdout %>
on-success:
- run_sisyphus_quick_report

run_sisyphus_quick_report:
action: core.http
input:
url: "http://<% $.host %>:<% $.siswrap_service_port %>/api/1.0/report/run/<% $.runfolder_name %>"
method: "POST"
headers: "Content-Type=application/json"
body: '{"runfolder": "<% $.runfolder_name %>"}'
body: <% $.report_body %>
publish:
report_status_url: "<% $.run_sisyphus_quick_report.body.link %>"
on-success:
Expand All @@ -124,17 +143,37 @@ workflows:
input:
url: "<% $.report_status_url %>"
on-success:
- run_sisyphus_qc
- download_qc_config
### QUICK REPORT END ###

### QUALITY CONTROL START ###
download_qc_config:
action: core.http
input:
url: <% $.hermes_base_url %>/<% $.flowcell_name %>/qcfile
headers: USER=<% $.hermes_user %>&X-XSRF-TOKEN=<% $.hermes_token %>
publish:
qc_conf_string: <% $.download_qc_config.body.qc %>
on-success:
- construct_qc_body

construct_qc_body:
action: arteria-packs.parse_siswrap_args
input:
runfolder: "<% $.runfolder_name %>"
qc_conf: "<% $.qc_conf_string %>"
publish:
qc_body: <% $.construct_qc_body.stdout %>
on-success:
- run_sisyphus_qc

run_sisyphus_qc:
action: core.http
input:
url: "http://<% $.host %>:<% $.siswrap_service_port %>/api/1.0/qc/run/<% $.runfolder_name %>"
method: "POST"
headers: "Content-Type=application/json"
body: '{"runfolder": "<% $.runfolder_name %>"}'
body: <% $.qc_body %>
publish:
qc_status_url: "<% $.run_sisyphus_qc.body.link %>"
on-success:
Expand Down Expand Up @@ -200,4 +239,4 @@ workflows:
body: "An oh shit error occurred while processing <% $.runfolder_name %> on host <% $.host %>. Please investigate!"
on-complete:
- fail
### NOTIFIER END ###
### NOTIFIER END ###

0 comments on commit 038e919

Please sign in to comment.