Skip to content

Commit

Permalink
Add params export function
Browse files Browse the repository at this point in the history
  • Loading branch information
rernst committed Nov 15, 2021
1 parent e933ad0 commit 43b4d4b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion NextflowModules
13 changes: 12 additions & 1 deletion WES.config
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,17 @@ process {
mode = 'copy'
}
}

withLabel: Workflow_Export_Params {
cpus = 2
memory = '5G'
time = '10m'

publishDir {
path = "$params.outdir/log"
mode = 'copy'
}
}
}

report {
Expand Down Expand Up @@ -371,7 +382,7 @@ profiles {
queueStatInterval = '5min'
submitRatelimit = '10sec'
}

mail {
smtp.host = 'localhost'
}
Expand Down
4 changes: 3 additions & 1 deletion WES.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ nextflow.preview.dsl=2

// Utils modules
include extractFastqPairFromDir from './NextflowModules/Utils/fastq.nf'
include ExportParams as Workflow_ExportParams from './NextflowModules/Utils/workflow.nf'

// Mapping modules
include BWAMapping from './NextflowModules/BWA-Mapping/bwa-0.7.17_samtools-1.9/Mapping.nf' params(
Expand Down Expand Up @@ -161,8 +162,9 @@ workflow {
//SavePedFile
SavePedFile()

// Repository versions
// Create log files: Repository versions and Workflow params
VersionLog()
Workflow_ExportParams()
}

// Workflow completion notification
Expand Down
8 changes: 7 additions & 1 deletion WES_Fingerprint.nf
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/usr/bin/env nextflow
nextflow.preview.dsl=2

// Utils modules
include extractBamFromDir from './NextflowModules/Utils/bam.nf'
include ExportParams as Workflow_ExportParams from './NextflowModules/Utils/workflow.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")
Expand All @@ -10,8 +12,11 @@ def bam_files = extractBamFromDir(params.bam_path)
def analysis_id = params.outdir.split('/')[-1]

workflow {
// GATK UnifiedGenotyper (fingerprint)
GATK_UnifiedGenotyper(bam_files)

// Create log files: Repository versions and Workflow params
VersionLog()
Workflow_ExportParams()
}

// Workflow completion notification
Expand Down Expand Up @@ -40,6 +45,7 @@ process VersionLog {
tag {"VersionLog ${analysis_id}"}
label 'VersionLog'
shell = ['/bin/bash', '-eo', 'pipefail']
cache = false //Disable cache to force a new version log when restarting the workflow.

output:
path('repository_version.log')
Expand Down

0 comments on commit 43b4d4b

Please sign in to comment.