Skip to content

Commit

Permalink
fix getGenotypedCaller issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nvnieuwk committed Mar 1, 2024
1 parent 27f6d0f commit 5764904
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 106 deletions.
12 changes: 2 additions & 10 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,6 @@
----------------------------------------------------------------------------------------
*/

def getGenotypedCaller(caller) {
def output = caller
if(caller == "haplotypecaller") {
output = "gatk4-joint"
}
return output
}

def enableOutput(state) {
"""
This function checks if the output of the given module should be published to the output directory.
Expand All @@ -40,11 +32,11 @@ def final_output = { "${params.outdir}/${params.project ? "${date}_${params.proj
def final_output_reports = { "${params.outdir}/${params.project ? "${date}_${params.project}" : "${date}_${workflow.runName}"}/${meta.family}/reports" }
def individual_output = { "${params.outdir}/${meta.sample}" }
def individual_reports = { "${params.outdir}/${meta.sample}/reports" }
def individual_validation = { "${params.outdir}/${meta.sample}/validation/${getGenotypedCaller(meta.caller)}" }
def individual_validation = { "${params.outdir}/${meta.sample}/validation/${meta.caller}" }

def callers = params.callers.tokenize(",")

def final_prefix = params.output_suffix ? { "${meta.id}${params.output_suffix}" } : { "${meta.id}.${getGenotypedCaller(meta.caller)}" }
def final_prefix = params.output_suffix ? { "${meta.id}${params.output_suffix}" } : { "${meta.id}.${meta.caller}" }

process {

Expand Down
10 changes: 5 additions & 5 deletions tests/annotate_test.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ nextflow_pipeline {
def date = new java.text.SimpleDateFormat("yyyy-MM-dd").format(new Date())
assertAll {
assert workflow.success
assert file("${outputDir}/${date}_test/Proband_12345/reports/Proband_12345.gatk4-joint.bcftools_stats.txt").exists()
assert file("${outputDir}/${date}_test/Proband_12345/reports/Proband_12345.gatk4-joint.somalier.html").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.gatk4-joint.vcf.gz").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.gatk4-joint.vcf.gz.tbi").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.gatk4-joint.ped").exists()
assert file("${outputDir}/${date}_test/Proband_12345/reports/Proband_12345.haplotypecaller.bcftools_stats.txt").exists()
assert file("${outputDir}/${date}_test/Proband_12345/reports/Proband_12345.haplotypecaller.somalier.html").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.haplotypecaller.vcf.gz").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.haplotypecaller.vcf.gz.tbi").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.haplotypecaller.ped").exists()
assert file("${outputDir}/${date}_test/Proband_12345/reports/DNA049572.vardict.bcftools_stats.txt").exists()
assert file("${outputDir}/${date}_test/Proband_12345/reports/NA24385D2_NVQ_034.vardict.bcftools_stats.txt").exists()
assert file("${outputDir}/${date}_test/Proband_12345/reports/DNA049572.vardict.somalier.html").exists()
Expand Down
8 changes: 4 additions & 4 deletions tests/filter_test.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ nextflow_pipeline {
def date = new java.text.SimpleDateFormat("yyyy-MM-dd").format(new Date())
assertAll {
assert workflow.success
assert file("${outputDir}/${date}_test/Proband_12345/reports/Proband_12345.gatk4-joint.bcftools_stats.txt").exists()
assert file("${outputDir}/${date}_test/Proband_12345/reports/Proband_12345.gatk4-joint.somalier.html").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.gatk4-joint.vcf.gz").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.gatk4-joint.ped").exists()
assert file("${outputDir}/${date}_test/Proband_12345/reports/Proband_12345.haplotypecaller.bcftools_stats.txt").exists()
assert file("${outputDir}/${date}_test/Proband_12345/reports/Proband_12345.haplotypecaller.somalier.html").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.haplotypecaller.vcf.gz").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.haplotypecaller.ped").exists()
assert file("${outputDir}/${date}_test/Proband_12345/reports/DNA049572.vardict.bcftools_stats.txt").exists()
assert file("${outputDir}/${date}_test/Proband_12345/reports/NA24385D2_NVQ_034.vardict.bcftools_stats.txt").exists()
assert file("${outputDir}/${date}_test/Proband_12345/reports/DNA049572.vardict.somalier.html").exists()
Expand Down
52 changes: 26 additions & 26 deletions tests/full_gvcf.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -28,34 +28,34 @@ nextflow_pipeline {
def date = new java.text.SimpleDateFormat("yyyy-MM-dd").format(new Date())
assertAll {
assert workflow.success
assert file("${outputDir}/${date}_test/Proband_12345/reports/Proband_12345.gatk4-joint.bcftools_stats.txt").exists()
assert file("${outputDir}/${date}_test/Proband_12345/reports/Proband_12345.gatk4-joint.somalier.html").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.gatk4-joint.vcf.gz").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.gatk4-joint.vcf.gz.tbi").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.gatk4-joint.ped").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.gatk4-joint.ped").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.gatk4-joint.db").exists()
assert file("${outputDir}/${date}_test/Proband_12345/reports/Proband_12345.haplotypecaller.bcftools_stats.txt").exists()
assert file("${outputDir}/${date}_test/Proband_12345/reports/Proband_12345.haplotypecaller.somalier.html").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.haplotypecaller.vcf.gz").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.haplotypecaller.vcf.gz.tbi").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.haplotypecaller.ped").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.haplotypecaller.ped").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.haplotypecaller.db").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.bed").exists()
assert file("${outputDir}/multiqc/multiqc_report.html").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.fn.vcf.gz").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.fn.vcf.gz.tbi").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.fp.vcf.gz").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.fp.vcf.gz.tbi").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.non_snp_roc.tsv.gz").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.phasing.txt").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.non_snp.png").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.non_snp.svg").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.snp.png").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.snp.svg").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.weighted.png").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.weighted.svg").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.snp_roc.tsv.gz").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.summary.txt").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.tp-baseline.vcf.gz").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.tp-baseline.vcf.gz.tbi").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.tp.vcf.gz").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.tp.vcf.gz.tbi").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.weighted_roc.tsv.gz").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.fn.vcf.gz").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.fn.vcf.gz.tbi").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.fp.vcf.gz").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.fp.vcf.gz.tbi").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.non_snp_roc.tsv.gz").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.phasing.txt").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.non_snp.png").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.non_snp.svg").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.snp.png").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.snp.svg").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.weighted.png").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.weighted.svg").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.snp_roc.tsv.gz").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.summary.txt").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.tp-baseline.vcf.gz").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.tp-baseline.vcf.gz.tbi").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.tp.vcf.gz").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.tp.vcf.gz.tbi").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.weighted_roc.tsv.gz").exists()
}
}

Expand Down
50 changes: 25 additions & 25 deletions tests/full_wes.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ nextflow_pipeline {
def date = new java.text.SimpleDateFormat("yyyy-MM-dd").format(new Date())
assertAll {
assert workflow.success
assert file("${outputDir}/${date}_test/Proband_12345/reports/Proband_12345.gatk4-joint.bcftools_stats.txt").exists()
assert file("${outputDir}/${date}_test/Proband_12345/reports/Proband_12345.gatk4-joint.somalier.html").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.gatk4-joint.vcf.gz").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.gatk4-joint.vcf.gz.tbi").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.gatk4-joint.ped").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.gatk4-joint.db").exists()
assert file("${outputDir}/${date}_test/Proband_12345/reports/Proband_12345.haplotypecaller.bcftools_stats.txt").exists()
assert file("${outputDir}/${date}_test/Proband_12345/reports/Proband_12345.haplotypecaller.somalier.html").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.haplotypecaller.vcf.gz").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.haplotypecaller.vcf.gz.tbi").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.haplotypecaller.ped").exists()
assert file("${outputDir}/${date}_test/Proband_12345/Proband_12345.haplotypecaller.db").exists()
assert file("${outputDir}/${date}_test/Proband_12345/reports/DNA049572.vardict.bcftools_stats.txt").exists()
assert file("${outputDir}/${date}_test/Proband_12345/reports/NA24385D2_NVQ_034.vardict.bcftools_stats.txt").exists()
assert file("${outputDir}/${date}_test/Proband_12345/reports/DNA049572.vardict.somalier.html").exists()
Expand All @@ -55,25 +55,25 @@ nextflow_pipeline {
assert file("${outputDir}/DNA049572/DNA049572.haplotypecaller.g.vcf.gz.tbi").exists()
assert file("${outputDir}/DNA049572/DNA049572.bed").exists()
assert file("${outputDir}/multiqc/multiqc_report.html").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.fn.vcf.gz").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.fn.vcf.gz.tbi").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.fp.vcf.gz").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.fp.vcf.gz.tbi").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.non_snp_roc.tsv.gz").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.phasing.txt").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.non_snp.png").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.non_snp.svg").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.snp.png").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.snp.svg").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.weighted.png").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.weighted.svg").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.snp_roc.tsv.gz").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.summary.txt").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.tp-baseline.vcf.gz").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.tp-baseline.vcf.gz.tbi").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.tp.vcf.gz").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.tp.vcf.gz.tbi").exists()
assert file("${outputDir}/DNA049572/validation/gatk4-joint/DNA049572.weighted_roc.tsv.gz").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.fn.vcf.gz").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.fn.vcf.gz.tbi").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.fp.vcf.gz").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.fp.vcf.gz.tbi").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.non_snp_roc.tsv.gz").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.phasing.txt").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.non_snp.png").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.non_snp.svg").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.snp.png").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.snp.svg").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.weighted.png").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.weighted.svg").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.snp_roc.tsv.gz").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.summary.txt").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.tp-baseline.vcf.gz").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.tp-baseline.vcf.gz.tbi").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.tp.vcf.gz").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.tp.vcf.gz.tbi").exists()
assert file("${outputDir}/DNA049572/validation/haplotypecaller/DNA049572.weighted_roc.tsv.gz").exists()
assert file("${outputDir}/DNA049572/validation/vardict/DNA049572.fn.vcf.gz").exists()
assert file("${outputDir}/DNA049572/validation/vardict/DNA049572.fn.vcf.gz.tbi").exists()
assert file("${outputDir}/DNA049572/validation/vardict/DNA049572.fp.vcf.gz").exists()
Expand Down
Loading

0 comments on commit 5764904

Please sign in to comment.