-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from UMCUGenetics/develop
v1.1.0
- Loading branch information
Showing
8 changed files
with
200 additions
and
85 deletions.
There are no files selected for viewing
Submodule NextflowModules
updated
98 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/usr/bin/env nextflow | ||
nextflow.preview.dsl=2 | ||
|
||
include extractBamFromDir from './NextflowModules/Utils/bam.nf' | ||
|
||
// Fingerprint modules | ||
include UnifiedGenotyper as GATK_UnifiedGenotyper from './NextflowModules/GATK/3.8-1-0-gf15c1c3ef/UnifiedGenotyper.nf' params(gatk_path: "$params.gatk_path", genome:"$params.genome", optional: "--intervals $params.dxtracks_path/$params.fingerprint_target --output_mode EMIT_ALL_SITES") | ||
|
||
def bam_files = extractBamFromDir(params.bam_path) | ||
def analysis_id = params.outdir.split('/')[-1] | ||
|
||
workflow { | ||
// GATK UnifiedGenotyper (fingerprint) | ||
GATK_UnifiedGenotyper(bam_files) | ||
} | ||
|
||
// Workflow completion notification | ||
workflow.onComplete { | ||
// HTML Template | ||
def template = new File("$baseDir/assets/workflow_complete.html") | ||
def binding = [ | ||
runName: analysis_id, | ||
workflow: workflow | ||
] | ||
def engine = new groovy.text.GStringTemplateEngine() | ||
def email_html = engine.createTemplate(template).make(binding).toString() | ||
|
||
// Send email | ||
if (workflow.success) { | ||
def subject = "WES Fingerprint Workflow Successful: ${analysis_id}" | ||
sendMail(to: params.email, subject: subject, body: email_html) | ||
} else { | ||
def subject = "WES Fingerprint Workflow Failed: ${analysis_id}" | ||
sendMail(to: params.email, subject: subject, body: email_html) | ||
} | ||
} | ||
|
||
process VersionLog { | ||
// Custom process to log repository versions | ||
tag {"VersionLog ${analysis_id}"} | ||
label 'VersionLog' | ||
shell = ['/bin/bash', '-eo', 'pipefail'] | ||
|
||
output: | ||
path('repository_version.log') | ||
|
||
script: | ||
""" | ||
echo 'DxNextflowWes' > repository_version.log | ||
git --git-dir=${workflow.projectDir}/.git log --pretty=oneline --decorate -n 2 >> repository_version.log | ||
echo 'Dx_tracks' >> repository_version.log | ||
git --git-dir=${params.dxtracks_path}/.git log --pretty=oneline --decorate -n 2 >> repository_version.log | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.