Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Freezeman final sync #4

Merged
merged 3 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/email_run_finish.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ html(lang:'en') {
body {
div(style:"font-family: Helvetica, Arial, sans-serif; padding: 30px; max-width: 900px; margin: 0 auto;") {
h3 "Run: ${event.data.run_name} (${run.flowcell})"
h3 "Folder: ${run.analysis_dir}"
h3 "Folder: [${run.analysis_dir}]"
p {
span "Run processing finished. Full report attached to this email, but also available "
a ( href:"https://datahub-297-p25.p.genap.ca/Freezeman_validation/${event.year}/${event.data.run_name}.report.html", "on GenAP" )
Expand Down
4 changes: 2 additions & 2 deletions lib/MultiQC.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class MultiQC {
def file = new File(path)
def jsonSlurper = new JsonSlurper().setType( JsonParserType.LAX )
this.data = jsonSlurper.parseText(file.text)
this.analysis_dir = data?.config_analysis_dir
this.analysis_dir = data?.config_analysis_dir[0]
def config_report_header_info = data?.config_report_header_info
this.flowcell = config_report_header_info.find { it.containsKey("Flowcell") }.Flowcell
this.run = config_report_header_info.find { it.containsKey("Run") }.Run
Expand All @@ -22,7 +22,7 @@ class MultiQC {
MultiQC(Path path) {
def jsonSlurper = new JsonSlurper().setType( JsonParserType.LAX )
this.data = jsonSlurper.parseText(path.getText())
this.analysis_dir = data?.config_analysis_dir
this.analysis_dir = data?.config_analysis_dir[0]
def config_report_header_info = data?.config_report_header_info
this.flowcell = config_report_header_info.find { it.containsKey("Flowcell") }.Flowcell
this.run = config_report_header_info.find { it.containsKey("Run") }.Run
Expand Down
12 changes: 9 additions & 3 deletions workflows/freezeman/monitor.nf
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,17 @@ process FinalSync {
tuple val(multiqc_html), val(multiqc)

script:
def run_dir = multiqc.analysis_dir.toString()
def rundir = multiqc.analysis_dir
def db = new MetadataDB(params.db, log)
def runinf = db.latestRunInfofile(multiqc.flowcell)

"""
rundir=\$( echo $run_dir | sed 's/\\[//' | sed 's/\\]//' )
rsync -av /nb/Research/freezeman-processing/${multiqc.seqtype}/*/\${rundir}/report/multiqc_* /lb/robot/research/freezeman-processing/${multiqc.seqtype}/*/\${rundir}/report
rsync -av /nb/Research/freezeman-processing/${multiqc.seqtype}/${runinf.year}/${rundir}/report/multiqc_* \\
/lb/robot/research/freezeman-processing/${multiqc.seqtype}/${runinf.year}/${rundir}/report
curl -k -X POST https://dashrunr.c3g-app.sd4h.ca/update \\
-H "descrambler-key: \$(cat ~/assets/run-processing-update-headers)" \\
-H "Content-Type: application/json" \\
-d @/nb/Research/freezeman-processing/${multiqc.seqtype}/${runinf.year}/${rundir}/report/multiqc_data/multiqc_data.json
"""
}

Expand Down