Skip to content

Commit

Permalink
fix remote outdir in NfCoreTemplate.groovy
Browse files Browse the repository at this point in the history
  • Loading branch information
fbdtemme committed Oct 16, 2023
1 parent 6515891 commit 8a2320d
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions lib/NfcoreTemplate.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,16 @@ class NfcoreTemplate {
}

// Write summary e-mail HTML to a file
def output_d = new File("${params.outdir}/pipeline_info/")
if (!output_d.exists()) {
output_d.mkdirs()
}
def output_hf = new File(output_d, "pipeline_report.html")
def output_hf = new File(workflow.launchDir.toString(), ".pipeline_report.html")
output_hf.withWriter { w -> w << email_html }
def output_tf = new File(output_d, "pipeline_report.txt")
FilesEx.copyTo(output_hf.toPath(), "${params.outdir}/pipeline_info/pipeline_report.html");
output_hf.delete()

// Write summary e-mail TXT to a file
def output_tf = new File(workflow.launchDir.toString(), ".pipeline_report.txt")
output_tf.withWriter { w -> w << email_txt }
FilesEx.copyTo(output_tf.toPath(), "${params.outdir}/pipeline_info/pipeline_report.txt");
output_tf.delete()
}

//
Expand Down Expand Up @@ -234,8 +236,7 @@ class NfcoreTemplate {
def jsonStr = JsonOutput.toJson(params)
temp_pf.text = JsonOutput.prettyPrint(jsonStr)

def destination = "${params.outdir}/pipeline_info/params_${timestamp}.json"
FilesEx.copyTo(temp_pf.toPath(), destination)
FilesEx.copyTo(temp_pf.toPath(), "${params.outdir}/pipeline_info/params_${timestamp}.json")
temp_pf.delete()
}

Expand Down

0 comments on commit 8a2320d

Please sign in to comment.