Skip to content

Commit

Permalink
parameterize workflow_log_dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Mootor authored and Mootor committed Feb 13, 2024
1 parent 9cdc724 commit 639eae7
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 16 deletions.
21 changes: 14 additions & 7 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ include { call_gSV_Delly; call_gCNV_Delly; regenotype_gSV_Delly; regenotype_gCNV
"${params.sample}",
[:]
),
workflow_output_dir: "${params.output_dir_base}/DELLY-${params.delly_version}"
workflow_output_dir: "${params.output_dir_base}/DELLY-${params.delly_version}",
workflow_log_dir: "DELLY-${params.delly_version}"
)
include { call_gSV_Manta } from './module/manta' addParams(
output_filename: generate_standard_filename(
Expand All @@ -68,22 +69,28 @@ include { call_gSV_Manta } from './module/manta' addParams(
"${params.sample}",
[:]
),
workflow_output_dir: "${params.output_dir_base}/Manta-${params.manta_version}"
workflow_output_dir: "${params.output_dir_base}/Manta-${params.manta_version}",
workflow_log_dir: "Manta-${params.manta_version}"
)
include { convert_BCF2VCF_BCFtools as convert_gSV_BCF2VCF_BCFtools; convert_BCF2VCF_BCFtools as convert_gCNV_BCF2VCF_BCFtools } from './module/bcftools' addParams(
workflow_output_dir: "${params.output_dir_base}/DELLY-${params.delly_version}"
workflow_output_dir: "${params.output_dir_base}/DELLY-${params.delly_version}",
workflow_log_dir: "DELLY-${params.delly_version}"
)
include { run_vcfstats_RTGTools as run_gSV_vcfstats_RTGTools; run_vcfstats_RTGTools as run_gCNV_vcfstats_RTGTools } from './module/rtgtools' addParams(
workflow_output_dir: "${params.output_dir_base}/DELLY-${params.delly_version}"
workflow_output_dir: "${params.output_dir_base}/DELLY-${params.delly_version}",
workflow_log_dir: "DELLY-${params.delly_version}"
)
include { run_vcf_validator_VCFtools as run_gSV_vcf_validator_VCFtools; run_vcf_validator_VCFtools as run_gCNV_vcf_validator_VCFtools } from './module/vcftools' addParams(
workflow_output_dir: "${params.output_dir_base}/DELLY-${params.delly_version}"
workflow_output_dir: "${params.output_dir_base}/DELLY-${params.delly_version}",
workflow_log_dir: "DELLY-${params.delly_version}"
)
include { run_sha512sum as run_sha512sum_gSV_Delly; run_sha512sum as run_sha512sum_gCNV_Delly; run_sha512sum as run_sha512sum_regeno_gSV_Delly; run_sha512sum as run_sha512sum_regeno_gCNV_Delly } from './module/sha512' addParams(
workflow_output_dir: "${params.output_dir_base}/DELLY-${params.delly_version}"
workflow_output_dir: "${params.output_dir_base}/DELLY-${params.delly_version}",
workflow_log_dir: "DELLY-${params.delly_version}"
)
include { run_sha512sum as run_sha512sum_Manta } from './module/sha512' addParams(
workflow_output_dir: "${params.output_dir_base}/Manta-${params.manta_version}"
workflow_output_dir: "${params.output_dir_base}/Manta-${params.manta_version}",
workflow_log_dir: "Manta-${params.manta_version}"
)

// Returns the index file for the given bam
Expand Down
2 changes: 1 addition & 1 deletion module/bcftools.nf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ process convert_BCF2VCF_BCFtools {
pattern: "*.vcf",
mode: "copy"

publishDir "${params.log_output_dir}/process-log",
publishDir "${params.log_output_dir}/process-log/${params.workflow_log_dir}",
pattern: ".command.*",
mode: "copy",
saveAs: { "${task.process.replace(':', '/')}/log${file(it).getName()}" }
Expand Down
8 changes: 4 additions & 4 deletions module/delly.nf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ process call_gSV_Delly {
pattern: "*.bcf*",
mode: "copy"

publishDir "${params.log_output_dir}/process-log",
publishDir "${params.log_output_dir}/process-log/${params.workflow_log_dir}",
pattern: ".command.*",
mode: "copy",
saveAs: { "${task.process.replace(':', '/')}/log${file(it).getName()}" }
Expand Down Expand Up @@ -52,7 +52,7 @@ process regenotype_gSV_Delly {
pattern: "*.bcf*",
mode: "copy"

publishDir "${params.log_output_dir}/process-log",
publishDir "${params.log_output_dir}/process-log/${params.workflow_log_dir}",
pattern: ".command.*",
mode: "copy",
saveAs: { "${task.process.replace(':', '/')}/log${file(it).getName()}" }
Expand Down Expand Up @@ -90,7 +90,7 @@ process call_gCNV_Delly {
pattern: "*.bcf*",
mode: "copy"

publishDir "${params.log_output_dir}/process-log",
publishDir "${params.log_output_dir}/process-log/${params.workflow_log_dir}",
pattern: ".command.*",
mode: "copy",
saveAs: { "${task.process.replace(':', '/')}/log${file(it).getName()}" }
Expand Down Expand Up @@ -128,7 +128,7 @@ process regenotype_gCNV_Delly {
pattern: "*.bcf*",
mode: "copy"

publishDir "${params.log_output_dir}/process-log",
publishDir "${params.log_output_dir}/process-log/${params.workflow_log_dir}",
pattern: ".command.*",
mode: "copy",
saveAs: { "${task.process.replace(':', '/')}/log${file(it).getName()}" }
Expand Down
2 changes: 1 addition & 1 deletion module/manta.nf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ process call_gSV_Manta {
mode: "copy",
saveAs: { "${params.output_filename}_${file(it).getName()}" }

publishDir "${params.log_output_dir}/process-log",
publishDir "${params.log_output_dir}/process-log/${params.workflow_log_dir}",
pattern: ".command.*",
mode: "copy",
saveAs: { "${task.process.replace(':', '/')}/log${file(it).getName()}" }
Expand Down
2 changes: 1 addition & 1 deletion module/rtgtools.nf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ process run_vcfstats_RTGTools {
pattern: "*_stats.txt",
mode: "copy"

publishDir "${params.log_output_dir}/process-log/",
publishDir "${params.log_output_dir}/process-log/${params.workflow_log_dir}",
pattern: ".command.*",
mode: "copy",
saveAs: { "${task.process.replace(':', '/')}/log${file(it).getName()}" }
Expand Down
2 changes: 1 addition & 1 deletion module/sha512.nf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ process run_sha512sum {
pattern: "*.sha512",
mode: "copy"

publishDir "${params.log_output_dir}/process-log",
publishDir "${params.log_output_dir}/process-log/${params.workflow_log_dir}",
pattern: ".command.*",
mode: "copy",
saveAs: { "${task.process}/${task.process}-${task.index}/log${file(it).getName()}" }
Expand Down
2 changes: 1 addition & 1 deletion module/vcftools.nf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ process run_vcf_validator_VCFtools {
pattern: "*_validation.txt",
mode: "copy"

publishDir "${params.log_output_dir}/process-log",
publishDir "${params.log_output_dir}/process-log/${params.workflow_log_dir}",
pattern: ".command.*",
mode: "copy",
saveAs: { "${task.process.replace(':', '/')}/log${file(it).getName()}" }
Expand Down

0 comments on commit 639eae7

Please sign in to comment.