Skip to content
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
1 change: 1 addition & 0 deletions cloudgene.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ workflow:
contact: "${CLOUDGENE_CONTACT_NAME}"
email: "${CLOUDGENE_CONTACT_EMAIL}"
url: "${CLOUDGENE_SERVICE_URL}"
frontend: "${CLOUDGENE_SERVICE_FRONTEND}"
groups:
- id: validation
label: "Input Validation"
Expand Down
8 changes: 6 additions & 2 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,17 @@ workflow.onComplete {
println "::set-value-and-submit name=genome_build::${params.build}"
}

def downloads_url = (params.service.frontend == 'vue')
? "${params.service.url}/jobs/${params.project_id}"
: "${params.service.url}/index.html#!jobs/${params.project_id}"

// imputation job
if (params.merge_results == true && params.encryption.enabled == true) {
if (params.send_mail && params.user.email != null) {
sendMail {
to "${params.user.email}"
subject "[${params.service.name}] Job ${params.project} is complete"
body "Dear ${params.user.name},\n\nYour imputation job has finished succesfully. The password for the imputation results is: ${params.encryption_password}\n\nYou can download the results from the following link: ${params.service.url}/index.html#!jobs/${params.project_id}"
body "Dear ${params.user.name},\n\nYour imputation job has finished succesfully. The password for the imputation results is: ${params.encryption_password}\n\nYou can download the results from the following link: ${downloads_url}"
}
println "::message:: Data have been exported successfully. We have sent a notification email to <b>${params.user.email}</b>"
} else {
Expand All @@ -186,7 +190,7 @@ workflow.onComplete {
sendMail {
to "${params.user.email}"
subject "[${params.service.name}] Job ${params.project} is complete"
body "Dear ${params.user.name},\n\nYour PGS job has finished successfully.\n\nYou can download the results from the following link: ${params.service.url}/index.html#!jobs/${params.project_id}"
body "Dear ${params.user.name},\n\nYour PGS job has finished successfully.\n\nYou can download the results from the following link: ${downloads_url}"
}
println "::message:: Data have been exported successfully. We have sent a notification email to <b>${params.user.email}</b>"
} else {
Expand Down
1 change: 1 addition & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ params {
email : null,
url : null,
threads : -1,
frontend: "canjs",
]

user = [
Expand Down
Loading