diff --git a/.github/include.yaml b/.github/include.yaml new file mode 100644 index 0000000..a3629f4 --- /dev/null +++ b/.github/include.yaml @@ -0,0 +1,10 @@ +".": + - ./.github/workflows/** + - ./nf-test.config + - ./nextflow.config +tests: + - ./assets/* + - ./bin/* + - ./conf/* + - ./main.nf + - ./nextflow_schema.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a81139f..d6f89ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,28 +4,66 @@ on: push: branches: - dev + - master pull_request: release: types: [published] env: NXF_ANSI_LOG: false - + NFTEST_VER: "0.9" + NFT_WORKDIR: "~" + NFT_DIFF: "pdiff" + NFT_DIFF_ARGS: "--line-numbers --expand-tabs=2" +# cancel if a newer run is started concurrency: group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" cancel-in-progress: true jobs: - test: - name: Run pipeline with test data + nftest-changes: + name: Check for changes (nf-test) + runs-on: ubuntu-latest + outputs: + nf_test_files: ${{ steps.list.outputs.components }} + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: List nf-test files + id: list + uses: adamrtalbot/detect-nf-test-changes@v0.0.2 + with: + head: ${{ github.sha }} + base: origin/${{ github.base_ref }} + include: .github/include.yaml + + - name: print list of nf-test files + run: | + echo ${{ steps.list.outputs.components }} + + nftest: + name: ${{ matrix.tags }} ${{ matrix.profile }} NF ${{ matrix.NXF_VER }} # Only run on push if this is the nf-core dev branch (merged PRs) - if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/variantbenchmarking') }}" + if: needs.nftest-changes.outputs.nf_test_files != '[]' runs-on: ubuntu-latest + needs: [nftest-changes] + strategy: + fail-fast: false matrix: + profile: + - "docker" NXF_VER: - "23.04.0" - "latest-everything" + nf_test_files: ["${{ fromJson(needs.nftest-changes.outputs.nf_test_files) }}"] + include: + - tags: "pipeline_variantbenchmarking" + profile: "docker" + steps: - name: Check out pipeline code uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 @@ -35,12 +73,54 @@ jobs: with: version: "${{ matrix.NXF_VER }}" - - name: Disk space cleanup - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 + - uses: actions/setup-python@v4 + with: + python-version: "3.11" + architecture: "x64" + + - name: Install pdiff to see diff between nf-test snapshots + run: | + python -m pip install --upgrade pip + pip install pdiff + + - uses: nf-core/setup-nf-test@v1 + + - name: Run nf-test + run: | + nf-test test --verbose ${{ matrix.nf_test_files }} --profile "+${{ matrix.profile }}" --junitxml=test.xml --tap=test.tap + + - uses: pcolby/tap-summary@v1 + with: + path: >- + test.tap + + - name: Output log on failure + if: failure() + run: | + sudo apt install bat > /dev/null + batcat --decorations=always --color=always ${{ github.workspace }}/.nf-test/tests/*/meta/nextflow.log + + - name: Publish Test Report + uses: mikepenz/action-junit-report@v3 + if: always() # always run even if the previous step fails + with: + report_paths: test.xml + + confirm-pass: + runs-on: ubuntu-latest + needs: + - nftest + if: always() + steps: + - name: All tests ok + if: ${{ success() || !contains(needs.*.result, 'failure') }} + run: exit 0 + - name: One or more tests failed + if: ${{ contains(needs.*.result, 'failure') }} + run: exit 1 - - name: Run pipeline with test data for germline analysis - # TODO nf-core: You can customise CI pipeline run tests as required - # For example: adding multiple test runs with different parameters - # Remember that you can parallelise this by using strategy.matrix + - name: debug-print + if: always() run: | - nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results + echo "toJSON(needs) = ${{ toJSON(needs) }}" + echo "toJSON(needs.*.result) = ${{ toJSON(needs.*.result) }}" diff --git a/.nf-core.yml b/.nf-core.yml index e0b85a7..95c37ef 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -1,2 +1,4 @@ repository_type: pipeline nf_core_version: "2.14.1" +lint: + actions_ci: false diff --git a/conf/modules.config b/conf/modules.config index ae2799b..ab79db3 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -24,6 +24,7 @@ process { mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] + container = "community.wave.seqera.io/library/multiqc:1.22.1--4886de6095538010" } // standardization and normalization tools withName: "BCFTOOLS_NORM" { diff --git a/conf/test_liftover.config b/conf/test_liftover.config index db3dee4..d4b61f1 100644 --- a/conf/test_liftover.config +++ b/conf/test_liftover.config @@ -39,6 +39,6 @@ params { //liftover files chain = "https://raw.githubusercontent.com/broadinstitute/gatk/master/scripts/funcotator/data_sources/gnomAD/b37ToHg38.over.chain" - rename_chr = "assets/rename_contigs/grch37_grch38.txt" + rename_chr = "https://raw.githubusercontent.com/kubranarci/benchmark_datasets/main/SV_testdata/grch37_grch38.txt" liftover = true } diff --git a/conf/truth.config b/conf/truth.config index cda4ac1..c5b6a99 100644 --- a/conf/truth.config +++ b/conf/truth.config @@ -18,7 +18,7 @@ params { truth_sv = "https://ftp-trace.ncbi.nlm.nih.gov/ReferenceSamples/giab/release/AshkenazimTrio/HG002_NA24385_son/CMRG_v1.00/GRCh38/StructuralVariant/HG002_GRCh38_CMRG_SV_v1.00.vcf.gz" high_conf_sv = "https://ftp-trace.ncbi.nlm.nih.gov/ReferenceSamples/giab/release/AshkenazimTrio/HG002_NA24385_son/CMRG_v1.00/GRCh38/StructuralVariant/HG002_GRCh38_CMRG_SV_v1.00.bed" chain = "http://ftp.ensembl.org/pub/assembly_mapping/homo_sapiens/GRCh38_to_GRCh37.chain.gz" - rename_chr = "assets/rename_contigs/grch38_grch37.txt" + rename_chr = "https://raw.githubusercontent.com/kubranarci/benchmark_datasets/main/SV_testdata/grch38_grch37.txt" } } 'GRCh37'{ @@ -28,7 +28,7 @@ params { truth_sv = "https://ftp-trace.ncbi.nlm.nih.gov/ReferenceSamples/giab/release/AshkenazimTrio/HG002_NA24385_son/NIST_SV_v0.6/HG002_SVs_Tier1_v0.6.vcf.gz" high_conf_sv = "https://ftp-trace.ncbi.nlm.nih.gov/ReferenceSamples/giab/release/AshkenazimTrio/HG002_NA24385_son/NIST_SV_v0.6/HG002_SVs_Tier1_v0.6.bed" chain = "https://raw.githubusercontent.com/broadinstitute/gatk/master/scripts/funcotator/data_sources/gnomAD/b37ToHg38.over.chain" - rename_chr = "assets/rename_contigs/grch37_grch38.txt" + rename_chr = "https://raw.githubusercontent.com/kubranarci/benchmark_datasets/main/SV_testdata/grch37_grch38.txt" } } } @@ -39,7 +39,6 @@ params { high_conf_snv = "https://ftp-trace.ncbi.nlm.nih.gov/ReferenceSamples/seqc/Somatic_Mutation_WG/release/latest/High-Confidence_Regions_v1.2.bed" truth_indel = "https://ftp-trace.ncbi.nlm.nih.gov/ReferenceSamples/seqc/Somatic_Mutation_WG/release/latest/high-confidence_sINDEL_in_HC_regions_v1.2.1.vcf.gz" high_conf_indel = "https://ftp-trace.ncbi.nlm.nih.gov/ReferenceSamples/seqc/Somatic_Mutation_WG/release/latest/High-Confidence_Regions_v1.2.bed" - } } } diff --git a/modules.json b/modules.json index a5079cf..e9ba46c 100644 --- a/modules.json +++ b/modules.json @@ -67,7 +67,7 @@ }, "happy/sompy": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "5f5f9f7d5508c320124053448ac365fbafc4d3cb", "installed_by": ["modules"] }, "manta/convertinversion": { diff --git a/modules/nf-core/happy/sompy/main.nf b/modules/nf-core/happy/sompy/main.nf index e0c34e2..ba23fd1 100644 --- a/modules/nf-core/happy/sompy/main.nf +++ b/modules/nf-core/happy/sompy/main.nf @@ -54,7 +54,7 @@ process HAPPY_SOMPY { """ stub: - def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" def VERSION = '0.3.14' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. """ touch ${prefix}.features.csv diff --git a/modules/nf-core/happy/sompy/meta.yml b/modules/nf-core/happy/sompy/meta.yml index 3dd2b91..8a04a60 100644 --- a/modules/nf-core/happy/sompy/meta.yml +++ b/modules/nf-core/happy/sompy/meta.yml @@ -13,8 +13,7 @@ tools: homepage: "https://www.illumina.com/products/by-type/informatics-products/basespace-sequence-hub/apps/hap-py-benchmarking.html" documentation: "https://github.com/Illumina/hap.py/blob/master/doc/sompy.md" tool_dev_url: "https://github.com/Illumina/hap.py" - - licence: "['BSD-2-clause']" + licence: ["BSD-2-clause"] input: - meta: @@ -22,6 +21,31 @@ input: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] + - meta2: + type: map + description: | + Groovy Map containing fasta file information + e.g. [ id:'test2'] + - meta3: + type: map + description: | + Groovy Map containing fai file information + e.g. [ id:'test3'] + - meta4: + type: map + description: | + Groovy Map containing false_positives_bed file information + e.g. [ id:'test4'] + - meta5: + type: map + description: | + Groovy Map containing ambiguous_beds file information + e.g. [ id:'test5'] + - meta6: + type: map + description: | + Groovy Map containing bam file information + e.g. [ id:'test6'] - query_vcf: type: file description: VCF/GVCF file to query diff --git a/modules/nf-core/happy/sompy/tests/main.nf.test b/modules/nf-core/happy/sompy/tests/main.nf.test new file mode 100644 index 0000000..f4919c7 --- /dev/null +++ b/modules/nf-core/happy/sompy/tests/main.nf.test @@ -0,0 +1,127 @@ +nextflow_process { + + name "Test Process HAPPY_SOMPY" + script "../main.nf" + process "HAPPY_SOMPY" + + tag "modules" + tag "modules_nfcore" + tag "happy" + tag "happy/sompy" + + test("homo_sapiens - vcf") { + config './nextflow.config' + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/multi_intervals.bed', checkIfExists: true), + [] + ] + input[1] = [ + [ id:'test2' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) + ] + input[2] = [ + [ id:'test3' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai', checkIfExists: true) + ] + input[3] = [[],[]] + input[4] = [[],[]] + input[5] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.stats, + process.out.versions, + file(process.out.metrics[0][1]).name, + file(process.out.features[0][1]).name).match()} + ) + } + + } + test("homo_sapiens - vcf - bam") { + config './nextflow.config' + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/multi_intervals.bed', checkIfExists: true), + [] + ] + input[1] = [ + [ id:'test2' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) + ] + input[2] = [ + [ id:'test3' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai', checkIfExists: true) + ] + input[3] = [[],[]] + input[4] = [[],[]] + input[5] = [[ id:'test2' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test2.paired_end.sorted.bam', checkIfExists: true)] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.stats, + process.out.versions, + file(process.out.metrics[0][1]).name, + file(process.out.features[0][1]).name).match()} + ) + } + + } + test("homo_sapiens - vcf - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/multi_intervals.bed', checkIfExists: true), + [] + ] + input[1] = [ + [ id:'test2' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) + ] + input[2] = [ + [ id:'test3' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai', checkIfExists: true) + ] + input[3] = [[],[]] + input[4] = [[],[]] + input[5] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/happy/sompy/tests/main.nf.test.snap b/modules/nf-core/happy/sompy/tests/main.nf.test.snap new file mode 100644 index 0000000..b6b25e6 --- /dev/null +++ b/modules/nf-core/happy/sompy/tests/main.nf.test.snap @@ -0,0 +1,111 @@ +{ + "homo_sapiens - vcf": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.stats.csv:md5,8b35dd00bf7b5bd697a05d73fb8c0816" + ] + ], + [ + "versions.yml:md5,dda929752e25faa5e5dc8e82228980fc" + ], + "test.metrics.json", + "test.features.csv" + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T08:56:57.589412212" + }, + "homo_sapiens - vcf - bam": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.stats.csv:md5,5e9aae3e92641f1934c10fe88f250e59" + ] + ], + [ + "versions.yml:md5,dda929752e25faa5e5dc8e82228980fc" + ], + "test.metrics.json", + "test.features.csv" + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T08:57:13.752402851" + }, + "homo_sapiens - vcf - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.features.csv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test" + }, + "test.metrics.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test" + }, + "test.stats.csv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + "versions.yml:md5,dda929752e25faa5e5dc8e82228980fc" + ], + "features": [ + [ + { + "id": "test" + }, + "test.features.csv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "metrics": [ + [ + { + "id": "test" + }, + "test.metrics.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "stats": [ + [ + { + "id": "test" + }, + "test.stats.csv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,dda929752e25faa5e5dc8e82228980fc" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T14:39:09.160343644" + } +} \ No newline at end of file diff --git a/modules/nf-core/happy/sompy/tests/nextflow.config b/modules/nf-core/happy/sompy/tests/nextflow.config new file mode 100644 index 0000000..3a95dc4 --- /dev/null +++ b/modules/nf-core/happy/sompy/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: HAPPY_SOMPY { + ext.args = '--feature-table hcc.mutect.snv' + } +} diff --git a/tests/config/pytesttags.yaml b/tests/config/pytesttags.yaml new file mode 100644 index 0000000..1114e0d --- /dev/null +++ b/tests/config/pytesttags.yaml @@ -0,0 +1,4 @@ +# default +default: + - "**" +# default_extended diff --git a/tests/germline.nf.test b/tests/germline.nf.test new file mode 100644 index 0000000..f57a4ed --- /dev/null +++ b/tests/germline.nf.test @@ -0,0 +1,410 @@ +nextflow_pipeline { + + name "Test pipeline" + script "../main.nf" + tag "pipeline" + tag "pipeline_variantbenchmarking" + + test("Run with profile test") { + + config "../conf/test.config" + when { + params { + max_cpus = 2 + max_memory = '6.GB' + max_time = '6.h' + input = "https://raw.githubusercontent.com/kubranarci/benchmark_datasets/main/SV_testdata/samplesheet_HG002_hg38.csv" + outdir = "$outputDir" + } + } + + then { + // PDFs, SVGs, some PNGs and HTML reports are not stable + assertAll( + { assert workflow.success }, + { assert snapshot( + file("${params.outdir}/HG002/stats/bcftools/HG002.small.bcftools_stats.txt").name, + path("${params.outdir}/HG002/stats/bcftools/HG002.sv.bcftools_stats.txt"), + path("${params.outdir}/HG002/stats/survivor/HG002.sv.stats") + ).match("HG002") }, + { assert snapshot( + path("${params.outdir}/references/rtgtools/genome.sdf/summary.txt") + ).match("sdf") }, + { assert snapshot( + path("${params.outdir}/summary/comparisons/small/rtgtools.small.FN.csv"), + path("${params.outdir}/summary/comparisons/small/rtgtools.small.FP.csv"), + path("${params.outdir}/summary/comparisons/small/rtgtools.small.TP_base.csv"), + path("${params.outdir}/summary/comparisons/small/rtgtools.small.TP_comp.csv"), + path("${params.outdir}/summary/comparisons/sv/truvari.sv.FN.csv"), + path("${params.outdir}/summary/comparisons/sv/truvari.sv.FP.csv"), + path("${params.outdir}/summary/comparisons/sv/truvari.sv.TP_base.csv"), + path("${params.outdir}/summary/comparisons/sv/truvari.sv.TP_comp.csv"), + path("${params.outdir}/summary/comparisons/sv/svbenchmark.sv.FN.csv"), + path("${params.outdir}/summary/comparisons/sv/svbenchmark.sv.FP.csv"), + path("${params.outdir}/summary/plots/sv/svbenchmark/metric_by_tool_svbenchmark.png"), + path("${params.outdir}/summary/plots/sv/svbenchmark/variants_by_tool_svbenchmark.png"), + path("${params.outdir}/summary/plots/sv/truvari/metric_by_tool_truvari.png"), + path("${params.outdir}/summary/plots/sv/truvari/variants_by_tool_truvari.png"), + path("${params.outdir}/summary/plots/sv/wittyer/Base_metric_by_tool_wittyer.png"), + path("${params.outdir}/summary/plots/sv/wittyer/Base_variants_by_tool_wittyer.png"), + path("${params.outdir}/summary/plots/sv/wittyer/Event_metric_by_tool_wittyer.png"), + path("${params.outdir}/summary/plots/sv/wittyer/Event_variants_by_tool_wittyer.png"), + path("${params.outdir}/summary/plots/small/happy/INDEL_ALL_metric_by_tool_happy.png"), + path("${params.outdir}/summary/plots/small/happy/INDEL_ALL_variants_by_tool_happy.png"), + path("${params.outdir}/summary/plots/small/happy/INDEL_PASS_metric_by_tool_happy.png"), + path("${params.outdir}/summary/plots/small/happy/INDEL_PASS_variants_by_tool_happy.png"), + path("${params.outdir}/summary/plots/small/happy/SNP_ALL_metric_by_tool_happy.png"), + path("${params.outdir}/summary/plots/small/happy/SNP_ALL_variants_by_tool_happy.png"), + path("${params.outdir}/summary/plots/small/happy/SNP_PASS_metric_by_tool_happy.png"), + path("${params.outdir}/summary/plots/small/happy/SNP_PASS_variants_by_tool_happy.png"), + path("${params.outdir}/summary/plots/small/rtgtools/metric_by_tool_rtgtools.png"), + path("${params.outdir}/summary/plots/small/rtgtools/variants_by_tool_rtgtools.png"), + file("${params.outdir}/summary/tables/small/rtgtools/rtgtools.small.summary.csv").name, + file("${params.outdir}/summary/tables/small/happy/happy.small.summary.csv").name, + file("${params.outdir}/summary/tables/sv/svbenchmark/svbenchmark.sv.summary.csv").name, + file("${params.outdir}/summary/tables/sv/truvari/truvari.sv.summary.csv").name, + file("${params.outdir}/summary/tables/sv/wittyer/wittyer.sv.summary.csv").name + ).match("summary") }, + { assert snapshot( + path("${params.outdir}/bcftools1/stats/bcftools/bcftools1.small.bcftools.bcftools_stats.txt"), + path("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.extended.csv"), + path("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.summary.csv"), + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.metrics.json.gz").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.roc.all.csv.gz").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.roc.Locations.INDEL.csv.gz").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.roc.Locations.INDEL.PASS.csv.gz").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.roc.Locations.SNP.csv.gz").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.roc.Locations.SNP.PASS.csv.gz").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.runinfo.json").name + ).match("bcftools1_happy") }, + { assert snapshot( + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.summary.txt").name, + path("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.phasing.txt"), + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.fn.vcf.gz").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.fn.vcf.gz.tbi").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.fp.vcf.gz").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.fp.vcf.gz.tbi").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.tp.vcf.gz").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.tp.vcf.gz.tbi").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.tp-baseline.vcf.gz").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.tp-baseline.vcf.gz.tbi").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.non_snp_roc.tsv.gz").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.snp_roc.tsv.gz").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.weighted_roc.tsv.gz").name + ).match("bcftools1_rtgtools") }, + { assert snapshot( + file("${params.outdir}/strelka1/stats/bcftools/strelka1.small.strelka.bcftools_stats.txt").name, + path("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.extended.csv"), + path("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.summary.csv"), + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.metrics.json.gz").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.roc.all.csv.gz").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.roc.Locations.INDEL.csv.gz").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.roc.Locations.INDEL.PASS.csv.gz").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.roc.Locations.SNP.csv.gz").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.roc.Locations.SNP.PASS.csv.gz").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.runinfo.json").name + ).match("strelka_happy") }, + { assert snapshot( + path("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.summary.txt"), + path("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.phasing.txt"), + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.fn.vcf.gz").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.fn.vcf.gz.tbi").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.fp.vcf.gz").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.fp.vcf.gz.tbi").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.tp.vcf.gz").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.tp.vcf.gz.tbi").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.tp-baseline.vcf.gz").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.tp-baseline.vcf.gz.tbi").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.non_snp_roc.tsv.gz").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.snp_roc.tsv.gz").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.weighted_roc.tsv.gz").name + ).match("strelka_rtgtools") }, + { assert snapshot( + path("${params.outdir}/dragen1/stats/bcftools/dragen1.sv.dragen.bcftools_stats.txt"), + path("${params.outdir}/dragen1/stats/survivor/dragen1.sv.dragen.stats"), + path("${params.outdir}/dragen1/svanalyzer_bench/dragen1.HG002.sv.dragen.distances"), + path("${params.outdir}/dragen1/svanalyzer_bench/dragen1.HG002.sv.dragen.log"), + path("${params.outdir}/dragen1/svanalyzer_bench/dragen1.HG002.sv.dragen.report"), + file("${params.outdir}/dragen1/svanalyzer_bench/dragen1.HG002.sv.dragen.falsenegatives.vcf.gz").name, + file("${params.outdir}/dragen1/svanalyzer_bench/dragen1.HG002.sv.dragen.falsepositives.vcf.gz").name + ).match("dragen_svanalyzer") }, + { assert snapshot( + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.fn.vcf.gz").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.fp.vcf.gz").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.tp-base.vcf.gz").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.tp-comp.vcf.gz").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.fn.vcf.gz.tbi").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.fp.vcf.gz.tbi").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.tp-base.vcf.gz.tbi").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.tp-comp.vcf.gz.tbi").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.summary.json").name + ).match("dragen_truvari") }, + { assert snapshot( + file("${params.outdir}/dragen1/wittyer_bench/dragen1.HG002.sv.dragen.vcf.gz").name, + file("${params.outdir}/dragen1/wittyer_bench/dragen1.HG002.sv.dragen.vcf.gz.tbi").name, + file("${params.outdir}/dragen1/wittyer_bench/dragen1.HG002.sv.dragen.json").name + ).match("dragen_wittyer") }, + { assert snapshot( + path("${params.outdir}/manta1/stats/bcftools/manta1.sv.manta.bcftools_stats.txt"), + path("${params.outdir}/manta1/stats/survivor/manta1.sv.manta.stats"), + path("${params.outdir}/manta1/svanalyzer_bench/manta1.HG002.sv.manta.distances"), + path("${params.outdir}/manta1/svanalyzer_bench/manta1.HG002.sv.manta.log"), + path("${params.outdir}/manta1/svanalyzer_bench/manta1.HG002.sv.manta.report"), + file("${params.outdir}/manta1/svanalyzer_bench/manta1.HG002.sv.manta.falsenegatives.vcf.gz").name, + file("${params.outdir}/manta1/svanalyzer_bench/manta1.HG002.sv.manta.falsepositives.vcf.gz").name + ).match("manta_svanalyzer") }, + { assert snapshot( + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.fn.vcf.gz").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.fp.vcf.gz").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.tp-base.vcf.gz").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.tp-comp.vcf.gz").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.fn.vcf.gz.tbi").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.fp.vcf.gz.tbi").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.tp-base.vcf.gz.tbi").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.tp-comp.vcf.gz.tbi").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.summary.json").name + ).match("manta_truvari") }, + { assert snapshot( + file("${params.outdir}/manta1/wittyer_bench/manta1.HG002.sv.manta.vcf.gz").name, + file("${params.outdir}/manta1/wittyer_bench/manta1.HG002.sv.manta.vcf.gz.tbi").name, + file("${params.outdir}/manta1/wittyer_bench/manta1.HG002.sv.manta.json").name + ).match("manta_wittyer") }, + { assert snapshot( + path("${params.outdir}/merged1/stats/bcftools/merged1.sv.merged.bcftools_stats.txt"), + path("${params.outdir}/merged1/stats/survivor/merged1.sv.merged.stats"), + path("${params.outdir}/merged1/svanalyzer_bench/merged1.HG002.sv.merged.distances"), + path("${params.outdir}/merged1/svanalyzer_bench/merged1.HG002.sv.merged.log"), + path("${params.outdir}/merged1/svanalyzer_bench/merged1.HG002.sv.merged.report"), + file("${params.outdir}/merged1/svanalyzer_bench/merged1.HG002.sv.merged.falsenegatives.vcf.gz").name, + file("${params.outdir}/merged1/svanalyzer_bench/merged1.HG002.sv.merged.falsepositives.vcf.gz").name + ).match("merged_svanalyzer") }, + { assert snapshot( + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.fn.vcf.gz").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.fp.vcf.gz").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.tp-base.vcf.gz").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.tp-comp.vcf.gz").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.fn.vcf.gz.tbi").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.fp.vcf.gz.tbi").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.tp-base.vcf.gz.tbi").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.tp-comp.vcf.gz.tbi").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.summary.json").name + ).match("merged_truvari") }, + { assert snapshot( + file("${params.outdir}/merged1/wittyer_bench/merged1.HG002.sv.merged.vcf.gz").name, + file("${params.outdir}/merged1/wittyer_bench/merged1.HG002.sv.merged.vcf.gz.tbi").name, + file("${params.outdir}/merged1/wittyer_bench/merged1.HG002.sv.merged.json").name + ).match("merged_wittyer") }, + { assert snapshot( + file("${params.outdir}/multiqc/multiqc_data/multiqc_citations.txt").name, + file("${params.outdir}/multiqc/multiqc_data/multiqc_data.json").name, + file("${params.outdir}/multiqc/multiqc_data/multiqc_sources.txt").name, + file("${params.outdir}/multiqc/multiqc_data/multiqc.log").name, + file("${params.outdir}/multiqc/multiqc_report.html").name + ).match("multiqc") }, + { assert snapshot( + UTILS.removeNextflowVersion("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml") + ).match("versions") } + ) + } + } + + test("Run with profile test stub") { + options "-stub" + config "../conf/test.config" + when { + params { + max_cpus = 2 + max_memory = '6.GB' + max_time = '6.h' + input = "https://raw.githubusercontent.com/kubranarci/benchmark_datasets/main/SV_testdata/samplesheet_HG002_hg38.csv" + outdir = 'results' + } + } + + then { + // PDFs, SVGs, some PNGs and HTML reports are not stable + assertAll( + { assert workflow.success }, + { assert snapshot( + file("${params.outdir}/HG002/stats/bcftools/HG002.small.bcftools_stats.txt").name, + file("${params.outdir}/HG002/stats/bcftools/HG002.sv.bcftools_stats.txt").name, + file("${params.outdir}/HG002/stats/survivor/HG002.sv.stats").name + ).match("HG002_stub") }, + { assert snapshot( + file("${params.outdir}/references/rtgtools/genome.sdf").name + ).match("sdf_stub") }, + { assert snapshot( + file("${params.outdir}/summary/comparisons/small/rtgtools.small.FN.csv").name, + file("${params.outdir}/summary/comparisons/small/rtgtools.small.FP.csv").name, + file("${params.outdir}/summary/comparisons/small/rtgtools.small.TP_base.csv").name, + file("${params.outdir}/summary/comparisons/small/rtgtools.small.TP_comp.csv").name, + file("${params.outdir}/summary/comparisons/sv/truvari.sv.FN.csv").name, + file("${params.outdir}/summary/comparisons/sv/truvari.sv.FP.csv").name, + file("${params.outdir}/summary/comparisons/sv/truvari.sv.TP_base.csv").name, + file("${params.outdir}/summary/comparisons/sv/truvari.sv.TP_comp.csv").name, + file("${params.outdir}/summary/comparisons/sv/svbenchmark.sv.FN.csv").name, + file("${params.outdir}/summary/comparisons/sv/svbenchmark.sv.FP.csv").name, + file("${params.outdir}/summary/plots/sv/svbenchmark/metric_by_tool_svbenchmark.png").name, + file("${params.outdir}/summary/plots/sv/svbenchmark/variants_by_tool_svbenchmark.png").name, + file("${params.outdir}/summary/plots/sv/truvari/metric_by_tool_truvari.png").name, + file("${params.outdir}/summary/plots/sv/truvari/variants_by_tool_truvari.png").name, + file("${params.outdir}/summary/plots/sv/wittyer/Base_metric_by_tool_wittyer.png").name, + file("${params.outdir}/summary/plots/sv/wittyer/Base_variants_by_tool_wittyer.png").name, + file("${params.outdir}/summary/plots/sv/wittyer/Event_metric_by_tool_wittyer.png").name, + file("${params.outdir}/summary/plots/sv/wittyer/Event_variants_by_tool_wittyer.png").name, + file("${params.outdir}/summary/plots/small/happy/INDEL_ALL_metric_by_tool_happy.png").name, + file("${params.outdir}/summary/plots/small/happy/INDEL_ALL_variants_by_tool_happy.png").name, + file("${params.outdir}/summary/plots/small/happy/INDEL_PASS_metric_by_tool_happy.png").name, + file("${params.outdir}/summary/plots/small/happy/INDEL_PASS_variants_by_tool_happy.png").name, + file("${params.outdir}/summary/plots/small/happy/SNP_ALL_metric_by_tool_happy.png").name, + file("${params.outdir}/summary/plots/small/happy/SNP_ALL_variants_by_tool_happy.png").name, + file("${params.outdir}/summary/plots/small/happy/SNP_PASS_metric_by_tool_happy.png").name, + file("${params.outdir}/summary/plots/small/happy/SNP_PASS_variants_by_tool_happy.png").name, + file("${params.outdir}/summary/plots/small/rtgtools/metric_by_tool_rtgtools.png").name, + file("${params.outdir}/summary/plots/small/rtgtools/variants_by_tool_rtgtools.png").name, + file("${params.outdir}/summary/tables/small/rtgtools/rtgtools.small.summary.csv").name, + file("${params.outdir}/summary/tables/small/happy/happy.small.summary.csv").name, + file("${params.outdir}/summary/tables/sv/svbenchmark/svbenchmark.sv.summary.csv").name, + file("${params.outdir}/summary/tables/sv/truvari/truvari.sv.summary.csv").name, + file("${params.outdir}/summary/tables/sv/wittyer/wittyer.sv.summary.csv").name + ).match("summary_stub") }, + { assert snapshot( + file("${params.outdir}/bcftools1/stats/bcftools/bcftools1.small.bcftools.bcftools_stats.txt").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.extended.csv").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.summary.csv").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.metrics.json.gz").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.roc.all.csv.gz").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.roc.Locations.INDEL.csv.gz").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.roc.Locations.INDEL.PASS.csv.gz").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.roc.Locations.SNP.csv.gz").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.roc.Locations.SNP.PASS.csv.gz").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.runinfo.json").name + ).match("bcftools1_happy_stub") }, + { assert snapshot( + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.summary.txt").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.phasing.txt").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.fn.vcf.gz").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.fn.vcf.gz.tbi").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.fp.vcf.gz").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.fp.vcf.gz.tbi").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.tp.vcf.gz").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.tp.vcf.gz.tbi").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.tp-baseline.vcf.gz").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.tp-baseline.vcf.gz.tbi").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.non_snp_roc.tsv.gz").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.snp_roc.tsv.gz").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.weighted_roc.tsv.gz").name + ).match("bcftools1_rtgtools_stub") }, + { assert snapshot( + file("${params.outdir}/strelka1/stats/bcftools/strelka1.small.strelka.bcftools_stats.txt").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.extended.csv").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.summary.csv").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.metrics.json.gz").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.roc.all.csv.gz").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.roc.Locations.INDEL.csv.gz").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.roc.Locations.INDEL.PASS.csv.gz").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.roc.Locations.SNP.csv.gz").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.roc.Locations.SNP.PASS.csv.gz").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.runinfo.json").name + ).match("strelka_happy_stub") }, + { assert snapshot( + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.summary.txt").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.phasing.txt").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.fn.vcf.gz").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.fn.vcf.gz.tbi").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.fp.vcf.gz").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.fp.vcf.gz.tbi").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.tp.vcf.gz").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.tp.vcf.gz.tbi").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.tp-baseline.vcf.gz").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.tp-baseline.vcf.gz.tbi").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.non_snp_roc.tsv.gz").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.snp_roc.tsv.gz").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.weighted_roc.tsv.gz").name + ).match("strelka_rtgtools_stub") }, + { assert snapshot( + file("${params.outdir}/dragen1/stats/bcftools/dragen1.sv.dragen.bcftools_stats.txt").name, + file("${params.outdir}/dragen1/stats/survivor/dragen1.sv.dragen.stats").name, + file("${params.outdir}/dragen1/svanalyzer_bench/dragen1.HG002.sv.dragen.distances").name, + file("${params.outdir}/dragen1/svanalyzer_bench/dragen1.HG002.sv.dragen.log").name, + file("${params.outdir}/dragen1/svanalyzer_bench/dragen1.HG002.sv.dragen.report").name, + file("${params.outdir}/dragen1/svanalyzer_bench/dragen1.HG002.sv.dragen.falsenegatives.vcf.gz").name, + file("${params.outdir}/dragen1/svanalyzer_bench/dragen1.HG002.sv.dragen.falsepositives.vcf.gz").name + ).match("dragen_svanalyzer_stub") }, + { assert snapshot( + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.fn.vcf.gz").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.fp.vcf.gz").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.tp-base.vcf.gz").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.tp-comp.vcf.gz").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.fn.vcf.gz.tbi").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.fp.vcf.gz.tbi").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.tp-base.vcf.gz.tbi").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.tp-comp.vcf.gz.tbi").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.summary.json").name + ).match("dragen_truvari_stub") }, + { assert snapshot( + file("${params.outdir}/dragen1/wittyer_bench/dragen1.HG002.sv.dragen.vcf.gz").name, + file("${params.outdir}/dragen1/wittyer_bench/dragen1.HG002.sv.dragen.vcf.gz.tbi").name, + file("${params.outdir}/dragen1/wittyer_bench/dragen1.HG002.sv.dragen.json").name + ).match("dragen_wittyer_stub") }, + { assert snapshot( + file("${params.outdir}/manta1/stats/bcftools/manta1.sv.manta.bcftools_stats.txt").name, + file("${params.outdir}/manta1/stats/survivor/manta1.sv.manta.stats").name, + file("${params.outdir}/manta1/svanalyzer_bench/manta1.HG002.sv.manta.distances").name, + file("${params.outdir}/manta1/svanalyzer_bench/manta1.HG002.sv.manta.log").name, + file("${params.outdir}/manta1/svanalyzer_bench/manta1.HG002.sv.manta.report").name, + file("${params.outdir}/manta1/svanalyzer_bench/manta1.HG002.sv.manta.falsenegatives.vcf.gz").name, + file("${params.outdir}/manta1/svanalyzer_bench/manta1.HG002.sv.manta.falsepositives.vcf.gz").name + ).match("manta_svanalyzer_stub") }, + { assert snapshot( + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.fn.vcf.gz").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.fp.vcf.gz").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.tp-base.vcf.gz").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.tp-comp.vcf.gz").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.fn.vcf.gz.tbi").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.fp.vcf.gz.tbi").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.tp-base.vcf.gz.tbi").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.tp-comp.vcf.gz.tbi").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.summary.json").name + ).match("manta_truvari_stub") }, + { assert snapshot( + file("${params.outdir}/manta1/wittyer_bench/manta1.HG002.sv.manta.vcf.gz").name, + file("${params.outdir}/manta1/wittyer_bench/manta1.HG002.sv.manta.vcf.gz.tbi").name, + file("${params.outdir}/manta1/wittyer_bench/manta1.HG002.sv.manta.json").name + ).match("manta_wittyer_stub") }, + { assert snapshot( + file("${params.outdir}/merged1/stats/bcftools/merged1.sv.merged.bcftools_stats.txt").name, + file("${params.outdir}/merged1/stats/survivor/merged1.sv.merged.stats").name, + file("${params.outdir}/merged1/svanalyzer_bench/merged1.HG002.sv.merged.distances").name, + file("${params.outdir}/merged1/svanalyzer_bench/merged1.HG002.sv.merged.log").name, + file("${params.outdir}/merged1/svanalyzer_bench/merged1.HG002.sv.merged.report").name, + file("${params.outdir}/merged1/svanalyzer_bench/merged1.HG002.sv.merged.falsenegatives.vcf.gz").name, + file("${params.outdir}/merged1/svanalyzer_bench/merged1.HG002.sv.merged.falsepositives.vcf.gz").name + ).match("merged_svanalyzer_stub") }, + { assert snapshot( + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.fn.vcf.gz").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.fp.vcf.gz").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.tp-base.vcf.gz").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.tp-comp.vcf.gz").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.fn.vcf.gz.tbi").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.fp.vcf.gz.tbi").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.tp-base.vcf.gz.tbi").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.tp-comp.vcf.gz.tbi").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.summary.json").name + ).match("merged_truvari_stub") }, + { assert snapshot( + file("${params.outdir}/merged1/wittyer_bench/merged1.HG002.sv.merged.vcf.gz").name, + file("${params.outdir}/merged1/wittyer_bench/merged1.HG002.sv.merged.vcf.gz.tbi").name, + file("${params.outdir}/merged1/wittyer_bench/merged1.HG002.sv.merged.json").name + ).match("merged_wittyer_stub") }, + { assert snapshot( + file("${params.outdir}/multiqc/multiqc_data/multiqc_citations.txt").name, + file("${params.outdir}/multiqc/multiqc_data/multiqc_data.json").name, + file("${params.outdir}/multiqc/multiqc_data/multiqc_sources.txt").name, + file("${params.outdir}/multiqc/multiqc_data/multiqc.log").name, + file("${params.outdir}/multiqc/multiqc_report.html").name + ).match("multiqc_stub") } + ) + } + } +} diff --git a/tests/germline.nf.test.snap b/tests/germline.nf.test.snap new file mode 100644 index 0000000..934d72e --- /dev/null +++ b/tests/germline.nf.test.snap @@ -0,0 +1,608 @@ +{ + "merged_truvari": { + "content": [ + "merged1.HG002.sv.merged.fn.vcf.gz", + "merged1.HG002.sv.merged.fp.vcf.gz", + "merged1.HG002.sv.merged.tp-base.vcf.gz", + "merged1.HG002.sv.merged.tp-comp.vcf.gz", + "merged1.HG002.sv.merged.fn.vcf.gz.tbi", + "merged1.HG002.sv.merged.fp.vcf.gz.tbi", + "merged1.HG002.sv.merged.tp-base.vcf.gz.tbi", + "merged1.HG002.sv.merged.tp-comp.vcf.gz.tbi", + "merged1.HG002.sv.merged.summary.json" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T12:32:58.785857688" + }, + "dragen_truvari_stub": { + "content": [ + "dragen1.HG002.sv.dragen.fn.vcf.gz", + "dragen1.HG002.sv.dragen.fp.vcf.gz", + "dragen1.HG002.sv.dragen.tp-base.vcf.gz", + "dragen1.HG002.sv.dragen.tp-comp.vcf.gz", + "dragen1.HG002.sv.dragen.fn.vcf.gz.tbi", + "dragen1.HG002.sv.dragen.fp.vcf.gz.tbi", + "dragen1.HG002.sv.dragen.tp-base.vcf.gz.tbi", + "dragen1.HG002.sv.dragen.tp-comp.vcf.gz.tbi", + "dragen1.HG002.sv.dragen.summary.json" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T13:58:39.464344201" + }, + "merged_svanalyzer": { + "content": [ + "merged1.sv.merged.bcftools_stats.txt:md5,a888a71dbe716f2d914a3ba55351801d", + "merged1.sv.merged.stats:md5,36d80468e13b583d0761b434d095312d", + "merged1.HG002.sv.merged.distances:md5,346f18a5cbeece98716951c8fc2aaea4", + "merged1.HG002.sv.merged.log:md5,1826bc8865f7e42a5d1108796f7458f3", + "merged1.HG002.sv.merged.report:md5,6466d73155f88084efc69cad3628eb8c", + "merged1.HG002.sv.merged.falsenegatives.vcf.gz", + "merged1.HG002.sv.merged.falsepositives.vcf.gz" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T13:55:48.412304183" + }, + "merged_svanalyzer_stub": { + "content": [ + "merged1.sv.merged.bcftools_stats.txt", + "merged1.sv.merged.stats", + "merged1.HG002.sv.merged.distances", + "merged1.HG002.sv.merged.log", + "merged1.HG002.sv.merged.report", + "merged1.HG002.sv.merged.falsenegatives.vcf.gz", + "merged1.HG002.sv.merged.falsepositives.vcf.gz" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T13:58:39.699885443" + }, + "HG002": { + "content": [ + "HG002.small.bcftools_stats.txt", + "HG002.sv.bcftools_stats.txt:md5,8294f172a72ca7219a32db9c27e2524c", + "HG002.sv.stats:md5,68681df47b35e3193be03610f5c6e3d6" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T13:10:31.153596733" + }, + "dragen_svanalyzer_stub": { + "content": [ + "dragen1.sv.dragen.bcftools_stats.txt", + "dragen1.sv.dragen.stats", + "dragen1.HG002.sv.dragen.distances", + "dragen1.HG002.sv.dragen.log", + "dragen1.HG002.sv.dragen.report", + "dragen1.HG002.sv.dragen.falsenegatives.vcf.gz", + "dragen1.HG002.sv.dragen.falsepositives.vcf.gz" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T13:58:39.348065379" + }, + "merged_wittyer_stub": { + "content": [ + "merged1.HG002.sv.merged.vcf.gz", + "merged1.HG002.sv.merged.vcf.gz.tbi", + "merged1.HG002.sv.merged.json" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T13:58:39.785933857" + }, + "manta_truvari": { + "content": [ + "manta1.HG002.sv.manta.fn.vcf.gz", + "manta1.HG002.sv.manta.fp.vcf.gz", + "manta1.HG002.sv.manta.tp-base.vcf.gz", + "manta1.HG002.sv.manta.tp-comp.vcf.gz", + "manta1.HG002.sv.manta.fn.vcf.gz.tbi", + "manta1.HG002.sv.manta.fp.vcf.gz.tbi", + "manta1.HG002.sv.manta.tp-base.vcf.gz.tbi", + "manta1.HG002.sv.manta.tp-comp.vcf.gz.tbi", + "manta1.HG002.sv.manta.summary.json" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T12:32:58.678266878" + }, + "manta_svanalyzer_stub": { + "content": [ + "manta1.sv.manta.bcftools_stats.txt", + "manta1.sv.manta.stats", + "manta1.HG002.sv.manta.distances", + "manta1.HG002.sv.manta.log", + "manta1.HG002.sv.manta.report", + "manta1.HG002.sv.manta.falsenegatives.vcf.gz", + "manta1.HG002.sv.manta.falsepositives.vcf.gz" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T13:58:39.570872162" + }, + "bcftools1_happy": { + "content": [ + "bcftools1.small.bcftools.bcftools_stats.txt:md5,8b74feed95dfa4e904744afaf9466dd5", + "bcftools1.HG002.small.bcftools.extended.csv:md5,e0ad65bab2daad5189ac02b818a4d8bc", + "bcftools1.HG002.small.bcftools.summary.csv:md5,3815ea18e8fc11f198a5821dee79a3c7", + "bcftools1.HG002.small.bcftools.metrics.json.gz", + "bcftools1.HG002.small.bcftools.roc.all.csv.gz", + "bcftools1.HG002.small.bcftools.roc.Locations.INDEL.csv.gz", + "bcftools1.HG002.small.bcftools.roc.Locations.INDEL.PASS.csv.gz", + "bcftools1.HG002.small.bcftools.roc.Locations.SNP.csv.gz", + "bcftools1.HG002.small.bcftools.roc.Locations.SNP.PASS.csv.gz", + "bcftools1.HG002.small.bcftools.runinfo.json" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T12:32:58.395610624" + }, + "manta_svanalyzer": { + "content": [ + "manta1.sv.manta.bcftools_stats.txt:md5,642148fe6b86fe667878661d1bffbd1f", + "manta1.sv.manta.stats:md5,6f25a9372095052218110390e8e75c54", + "manta1.HG002.sv.manta.distances:md5,33dcbe29f7129dc30c184b564803ec63", + "manta1.HG002.sv.manta.log:md5,fa9a04b46faca12f9f2eee23182ec2f8", + "manta1.HG002.sv.manta.report:md5,91b0fbfd6fcdf45b85290f92c5a470fb", + "manta1.HG002.sv.manta.falsenegatives.vcf.gz", + "manta1.HG002.sv.manta.falsepositives.vcf.gz" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T13:55:48.33197289" + }, + "merged_wittyer": { + "content": [ + "merged1.HG002.sv.merged.vcf.gz", + "merged1.HG002.sv.merged.vcf.gz.tbi", + "merged1.HG002.sv.merged.json" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T12:32:58.821761715" + }, + "HG002_stub": { + "content": [ + "HG002.small.bcftools_stats.txt", + "HG002.sv.bcftools_stats.txt", + "HG002.sv.stats" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T13:46:38.29313164" + }, + "manta_wittyer_stub": { + "content": [ + "manta1.HG002.sv.manta.vcf.gz", + "manta1.HG002.sv.manta.vcf.gz.tbi", + "manta1.HG002.sv.manta.json" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T13:58:39.653996096" + }, + "summary_stub": { + "content": [ + "rtgtools.small.FN.csv", + "rtgtools.small.FP.csv", + "rtgtools.small.TP_base.csv", + "rtgtools.small.TP_comp.csv", + "truvari.sv.FN.csv", + "truvari.sv.FP.csv", + "truvari.sv.TP_base.csv", + "truvari.sv.TP_comp.csv", + "svbenchmark.sv.FN.csv", + "svbenchmark.sv.FP.csv", + "metric_by_tool_svbenchmark.png", + "variants_by_tool_svbenchmark.png", + "metric_by_tool_truvari.png", + "variants_by_tool_truvari.png", + "Base_metric_by_tool_wittyer.png", + "Base_variants_by_tool_wittyer.png", + "Event_metric_by_tool_wittyer.png", + "Event_variants_by_tool_wittyer.png", + "INDEL_ALL_metric_by_tool_happy.png", + "INDEL_ALL_variants_by_tool_happy.png", + "INDEL_PASS_metric_by_tool_happy.png", + "INDEL_PASS_variants_by_tool_happy.png", + "SNP_ALL_metric_by_tool_happy.png", + "SNP_ALL_variants_by_tool_happy.png", + "SNP_PASS_metric_by_tool_happy.png", + "SNP_PASS_variants_by_tool_happy.png", + "metric_by_tool_rtgtools.png", + "variants_by_tool_rtgtools.png", + "rtgtools.small.summary.csv", + "happy.small.summary.csv", + "svbenchmark.sv.summary.csv", + "truvari.sv.summary.csv", + "wittyer.sv.summary.csv" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T13:58:39.052000632" + }, + "strelka_rtgtools": { + "content": [ + "strelka1.HG002.small.strelka.summary.txt:md5,e045d6a048bdec24cb55f9dd1b55ffe7", + "strelka1.HG002.small.strelka.phasing.txt:md5,5ab9ffbd7c18a5512851086b6e7ecf59", + "strelka1.HG002.small.strelka.fn.vcf.gz", + "strelka1.HG002.small.strelka.fn.vcf.gz.tbi", + "strelka1.HG002.small.strelka.fp.vcf.gz", + "strelka1.HG002.small.strelka.fp.vcf.gz.tbi", + "strelka1.HG002.small.strelka.tp.vcf.gz", + "strelka1.HG002.small.strelka.tp.vcf.gz.tbi", + "strelka1.HG002.small.strelka.tp-baseline.vcf.gz", + "strelka1.HG002.small.strelka.tp-baseline.vcf.gz.tbi", + "strelka1.HG002.small.strelka.non_snp_roc.tsv.gz", + "strelka1.HG002.small.strelka.snp_roc.tsv.gz", + "strelka1.HG002.small.strelka.weighted_roc.tsv.gz" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T12:32:58.508300343" + }, + "multiqc": { + "content": [ + "multiqc_citations.txt", + "multiqc_data.json", + "multiqc_sources.txt", + "multiqc.log", + "multiqc_report.html" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T12:32:58.859184051" + }, + "summary": { + "content": [ + "rtgtools.small.FN.csv:md5,41aa39c72e4fe4735a4d07eacb23a85c", + "rtgtools.small.FP.csv:md5,0985536ba9349cd5f6262a56faa058c2", + "rtgtools.small.TP_base.csv:md5,c2818da81afd61b2600f27be1b60b16a", + "rtgtools.small.TP_comp.csv:md5,8b7ab6d3ea9b94e967b743dc69a865d5", + "truvari.sv.FN.csv:md5,ee1a91be919daf1dfae9d1a35bbe0084", + "truvari.sv.FP.csv:md5,b34f4f5d8f0d36c3c5b8d422f08fbade", + "truvari.sv.TP_base.csv:md5,ffa51e4c9e5b2292fa7c1cec30f5e9f6", + "truvari.sv.TP_comp.csv:md5,04732ed72ca5ba94c2cb9b2aeff834e6", + "svbenchmark.sv.FN.csv:md5,5b2234a0df6a323cbca66d54772af6a6", + "svbenchmark.sv.FP.csv:md5,455afc3d791e8d6f31aae63a6d6a7727", + "metric_by_tool_svbenchmark.png:md5,5e44ce09d4ae07f1dd98618bca5fada4", + "variants_by_tool_svbenchmark.png:md5,3b6e9b91d2af70b95d4522261b830866", + "metric_by_tool_truvari.png:md5,758c60a4aec95e4d7ad3fe72e356f5d0", + "variants_by_tool_truvari.png:md5,4c2ca962b9deaa6e2d5b2a3639e65514", + "Base_metric_by_tool_wittyer.png:md5,e72e99638c4cc5b0372c67d9e00a810f", + "Base_variants_by_tool_wittyer.png:md5,095d648a38bf3f9df26e35001143bc77", + "Event_metric_by_tool_wittyer.png:md5,31e65ab89f44553b38b3d71878958631", + "Event_variants_by_tool_wittyer.png:md5,93d407e02cbe17ff3f2e1aef426889c8", + "INDEL_ALL_metric_by_tool_happy.png:md5,5e8a3f3eb60917175729313b2cc643ab", + "INDEL_ALL_variants_by_tool_happy.png:md5,20f2e96c33f39d09904ed365a16423ce", + "INDEL_PASS_metric_by_tool_happy.png:md5,6c3061d54752e5163660af47ccf51dc3", + "INDEL_PASS_variants_by_tool_happy.png:md5,01c64ab4831f60eba01bb862c89fa7b2", + "SNP_ALL_metric_by_tool_happy.png:md5,6e475bc274726af13fb367c64b6e2f5e", + "SNP_ALL_variants_by_tool_happy.png:md5,aaae324d87c86058e66c1a74905012af", + "SNP_PASS_metric_by_tool_happy.png:md5,91c652155386174766805f13e7b47a80", + "SNP_PASS_variants_by_tool_happy.png:md5,bea096813d4b252fab0a4a3b1b4aad5e", + "metric_by_tool_rtgtools.png:md5,a1a56a27d0bcd2dc0524be61dfce7bb3", + "variants_by_tool_rtgtools.png:md5,00131d77aa1b27f06e31de0ab7d58bb8", + "rtgtools.small.summary.csv", + "happy.small.summary.csv", + "svbenchmark.sv.summary.csv", + "truvari.sv.summary.csv", + "wittyer.sv.summary.csv" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T13:55:48.152951103" + }, + "multiqc_stub": { + "content": [ + "multiqc_citations.txt", + "multiqc_data.json", + "multiqc_sources.txt", + "multiqc.log", + "multiqc_report.html" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T13:58:39.824668243" + }, + "dragen_svanalyzer": { + "content": [ + "dragen1.sv.dragen.bcftools_stats.txt:md5,00efc545abcb5be0ab83d82bff6cd45e", + "dragen1.sv.dragen.stats:md5,5c59cceb2e7d909d91074bb8e5804abc", + "dragen1.HG002.sv.dragen.distances:md5,346f18a5cbeece98716951c8fc2aaea4", + "dragen1.HG002.sv.dragen.log:md5,e789f7b9cc900df499a38ed633ea818d", + "dragen1.HG002.sv.dragen.report:md5,b295d4867b7a96f0ca0bb5e8bb45eb68", + "dragen1.HG002.sv.dragen.falsenegatives.vcf.gz", + "dragen1.HG002.sv.dragen.falsepositives.vcf.gz" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T13:55:48.249463176" + }, + "strelka_happy": { + "content": [ + "strelka1.small.strelka.bcftools_stats.txt", + "strelka1.HG002.small.strelka.extended.csv:md5,93863c2b950df411c01c698f8afcda58", + "strelka1.HG002.small.strelka.summary.csv:md5,c14117d825b861657b38c058644896f9", + "strelka1.HG002.small.strelka.metrics.json.gz", + "strelka1.HG002.small.strelka.roc.all.csv.gz", + "strelka1.HG002.small.strelka.roc.Locations.INDEL.csv.gz", + "strelka1.HG002.small.strelka.roc.Locations.INDEL.PASS.csv.gz", + "strelka1.HG002.small.strelka.roc.Locations.SNP.csv.gz", + "strelka1.HG002.small.strelka.roc.Locations.SNP.PASS.csv.gz", + "strelka1.HG002.small.strelka.runinfo.json" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T13:10:31.481077416" + }, + "strelka_happy_stub": { + "content": [ + "strelka1.small.strelka.bcftools_stats.txt", + "strelka1.HG002.small.strelka.extended.csv", + "strelka1.HG002.small.strelka.summary.csv", + "strelka1.HG002.small.strelka.metrics.json.gz", + "strelka1.HG002.small.strelka.roc.all.csv.gz", + "strelka1.HG002.small.strelka.roc.Locations.INDEL.csv.gz", + "strelka1.HG002.small.strelka.roc.Locations.INDEL.PASS.csv.gz", + "strelka1.HG002.small.strelka.roc.Locations.SNP.csv.gz", + "strelka1.HG002.small.strelka.roc.Locations.SNP.PASS.csv.gz", + "strelka1.HG002.small.strelka.runinfo.json" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T13:58:39.215870319" + }, + "bcftools1_rtgtools_stub": { + "content": [ + "bcftools1.HG002.small.bcftools.summary.txt", + "bcftools1.HG002.small.bcftools.phasing.txt", + "bcftools1.HG002.small.bcftools.fn.vcf.gz", + "bcftools1.HG002.small.bcftools.fn.vcf.gz.tbi", + "bcftools1.HG002.small.bcftools.fp.vcf.gz", + "bcftools1.HG002.small.bcftools.fp.vcf.gz.tbi", + "bcftools1.HG002.small.bcftools.tp.vcf.gz", + "bcftools1.HG002.small.bcftools.tp.vcf.gz.tbi", + "bcftools1.HG002.small.bcftools.tp-baseline.vcf.gz", + "bcftools1.HG002.small.bcftools.tp-baseline.vcf.gz.tbi", + "bcftools1.HG002.small.bcftools.non_snp_roc.tsv.gz", + "bcftools1.HG002.small.bcftools.snp_roc.tsv.gz", + "bcftools1.HG002.small.bcftools.weighted_roc.tsv.gz" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T13:58:39.160897263" + }, + "manta_truvari_stub": { + "content": [ + "manta1.HG002.sv.manta.fn.vcf.gz", + "manta1.HG002.sv.manta.fp.vcf.gz", + "manta1.HG002.sv.manta.tp-base.vcf.gz", + "manta1.HG002.sv.manta.tp-comp.vcf.gz", + "manta1.HG002.sv.manta.fn.vcf.gz.tbi", + "manta1.HG002.sv.manta.fp.vcf.gz.tbi", + "manta1.HG002.sv.manta.tp-base.vcf.gz.tbi", + "manta1.HG002.sv.manta.tp-comp.vcf.gz.tbi", + "manta1.HG002.sv.manta.summary.json" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T13:58:39.60939247" + }, + "strelka_rtgtools_stub": { + "content": [ + "strelka1.HG002.small.strelka.summary.txt", + "strelka1.HG002.small.strelka.phasing.txt", + "strelka1.HG002.small.strelka.fn.vcf.gz", + "strelka1.HG002.small.strelka.fn.vcf.gz.tbi", + "strelka1.HG002.small.strelka.fp.vcf.gz", + "strelka1.HG002.small.strelka.fp.vcf.gz.tbi", + "strelka1.HG002.small.strelka.tp.vcf.gz", + "strelka1.HG002.small.strelka.tp.vcf.gz.tbi", + "strelka1.HG002.small.strelka.tp-baseline.vcf.gz", + "strelka1.HG002.small.strelka.tp-baseline.vcf.gz.tbi", + "strelka1.HG002.small.strelka.non_snp_roc.tsv.gz", + "strelka1.HG002.small.strelka.snp_roc.tsv.gz", + "strelka1.HG002.small.strelka.weighted_roc.tsv.gz" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T13:58:39.270211145" + }, + "sdf_stub": { + "content": [ + "genome.sdf" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T13:46:38.334721107" + }, + "dragen_wittyer_stub": { + "content": [ + "dragen1.HG002.sv.dragen.vcf.gz", + "dragen1.HG002.sv.dragen.vcf.gz.tbi", + "dragen1.HG002.sv.dragen.json" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T13:58:39.512488187" + }, + "merged_truvari_stub": { + "content": [ + "merged1.HG002.sv.merged.fn.vcf.gz", + "merged1.HG002.sv.merged.fp.vcf.gz", + "merged1.HG002.sv.merged.tp-base.vcf.gz", + "merged1.HG002.sv.merged.tp-comp.vcf.gz", + "merged1.HG002.sv.merged.fn.vcf.gz.tbi", + "merged1.HG002.sv.merged.fp.vcf.gz.tbi", + "merged1.HG002.sv.merged.tp-base.vcf.gz.tbi", + "merged1.HG002.sv.merged.tp-comp.vcf.gz.tbi", + "merged1.HG002.sv.merged.summary.json" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T13:58:39.746919049" + }, + "manta_wittyer": { + "content": [ + "manta1.HG002.sv.manta.vcf.gz", + "manta1.HG002.sv.manta.vcf.gz.tbi", + "manta1.HG002.sv.manta.json" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T12:32:58.714364235" + }, + "sdf": { + "content": [ + "summary.txt:md5,0bcf792797bbcda59f7269a7136fee01" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T13:55:48.029751622" + }, + "dragen_truvari": { + "content": [ + "dragen1.HG002.sv.dragen.fn.vcf.gz", + "dragen1.HG002.sv.dragen.fp.vcf.gz", + "dragen1.HG002.sv.dragen.tp-base.vcf.gz", + "dragen1.HG002.sv.dragen.tp-comp.vcf.gz", + "dragen1.HG002.sv.dragen.fn.vcf.gz.tbi", + "dragen1.HG002.sv.dragen.fp.vcf.gz.tbi", + "dragen1.HG002.sv.dragen.tp-base.vcf.gz.tbi", + "dragen1.HG002.sv.dragen.tp-comp.vcf.gz.tbi", + "dragen1.HG002.sv.dragen.summary.json" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T12:32:58.577543577" + }, + "versions": { + "content": [ + "{BCFTOOLS_DEDUP={bcftools=1.18}, BCFTOOLS_MERGE={bcftools=1.2}, BCFTOOLS_NORM={bcftools=1.18}, BCFTOOLS_REHEADER={bcftools=1.18}, BCFTOOLS_SORT={bcftools=1.18}, BCFTOOLS_STATS={bcftools=1.18}, BGZIP_TABIX={tabix=1.12}, HAPPY_HAPPY={hap.py=0.3.14}, HAPPY_PREPY={pre.py=0.3.14}, MERGE_REPORTS={python=3.8.6}, PLOTS={r-base=4.3.1}, REFORMAT_HEADER={tabix=1.12}, RTGTOOLS_FORMAT={rtg-tools=3.12.1}, RTGTOOLS_VCFEVAL={rtg-tools=3.12.1}, SURVIVOR_MERGE={survivor=1.0.7}, SURVIVOR_STATS={survivor=1.0.7}, SVANALYZER_SVBENCHMARK={svanalyzer=0.36}, SVYNC={svync=0.1.2}, TABIX_BGZIP={tabix=1.19.1}, TABIX_BGZIP_QUERY={tabix=1.19.1}, TABIX_BGZIP_TRUTH={tabix=1.19.1}, TABIX_TABIX={tabix=1.19.1}, TRUVARI_BENCH={truvari=4.1.0)}, VARIANT_EXTRACTOR={python=3.12.4}, VCF_TO_CSV={python=3.12.4}, WITTYER={wittyer=0.5.2.0}, Workflow={nf-core/variantbenchmarking=v1.0dev}}" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T12:32:59.099347689" + }, + "bcftools1_rtgtools": { + "content": [ + "bcftools1.HG002.small.bcftools.summary.txt", + "bcftools1.HG002.small.bcftools.phasing.txt:md5,38920536b8c3e241e873c07ba61762e6", + "bcftools1.HG002.small.bcftools.fn.vcf.gz", + "bcftools1.HG002.small.bcftools.fn.vcf.gz.tbi", + "bcftools1.HG002.small.bcftools.fp.vcf.gz", + "bcftools1.HG002.small.bcftools.fp.vcf.gz.tbi", + "bcftools1.HG002.small.bcftools.tp.vcf.gz", + "bcftools1.HG002.small.bcftools.tp.vcf.gz.tbi", + "bcftools1.HG002.small.bcftools.tp-baseline.vcf.gz", + "bcftools1.HG002.small.bcftools.tp-baseline.vcf.gz.tbi", + "bcftools1.HG002.small.bcftools.non_snp_roc.tsv.gz", + "bcftools1.HG002.small.bcftools.snp_roc.tsv.gz", + "bcftools1.HG002.small.bcftools.weighted_roc.tsv.gz" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T13:10:31.396162993" + }, + "dragen_wittyer": { + "content": [ + "dragen1.HG002.sv.dragen.vcf.gz", + "dragen1.HG002.sv.dragen.vcf.gz.tbi", + "dragen1.HG002.sv.dragen.json" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T12:32:58.606505774" + }, + "bcftools1_happy_stub": { + "content": [ + "bcftools1.small.bcftools.bcftools_stats.txt", + "bcftools1.HG002.small.bcftools.extended.csv", + "bcftools1.HG002.small.bcftools.summary.csv", + "bcftools1.HG002.small.bcftools.metrics.json.gz", + "bcftools1.HG002.small.bcftools.roc.all.csv.gz", + "bcftools1.HG002.small.bcftools.roc.Locations.INDEL.csv.gz", + "bcftools1.HG002.small.bcftools.roc.Locations.INDEL.PASS.csv.gz", + "bcftools1.HG002.small.bcftools.roc.Locations.SNP.csv.gz", + "bcftools1.HG002.small.bcftools.roc.Locations.SNP.PASS.csv.gz", + "bcftools1.HG002.small.bcftools.runinfo.json" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T13:58:39.107382537" + } +} \ No newline at end of file diff --git a/tests/lib/UTILS.groovy b/tests/lib/UTILS.groovy new file mode 100644 index 0000000..1bd58a4 --- /dev/null +++ b/tests/lib/UTILS.groovy @@ -0,0 +1,11 @@ +// Function to remove Nextflow version from pipeline_software_mqc_versions.yml + +class UTILS { + public static String removeNextflowVersion(pipeline_software_mqc_versions) { + def softwareVersions = path(pipeline_software_mqc_versions).yaml + if (softwareVersions.containsKey("Workflow")) { + softwareVersions.Workflow.remove("Nextflow") + } + return softwareVersions + } +} diff --git a/tests/liftover.nf.test b/tests/liftover.nf.test new file mode 100644 index 0000000..3dabeb6 --- /dev/null +++ b/tests/liftover.nf.test @@ -0,0 +1,413 @@ +nextflow_pipeline { + + name "Test pipeline" + script "../main.nf" + tag "pipeline" + tag "pipeline_variantbenchmarking" + + test("Run with profile test liftover") { + config "../conf/test_liftover.config" + when { + params { + max_cpus = 2 + max_memory = '6.GB' + max_time = '6.h' + input = 'https://raw.githubusercontent.com/kubranarci/benchmark_datasets/main/SV_testdata/samplesheet_HG002_hg38.csv' + outdir = 'results' + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot( + file("${params.outdir}/HG002/liftover/HG002.sv.sort.merged.bed").name, + file("${params.outdir}/HG002/liftover/HG002.sv.renamechr.vcf.gz").name, + file("${params.outdir}/HG002/liftover/HG002.small.renamechr.vcf.gz").name, + file("${params.outdir}/HG002/stats/survivor/HG002.sv.stats").name + ).match("HG002") } + { assert snapshot( + path("${params.outdir}/references/rtgtools/genome.sdf/summary.txt"), + path("${params.outdir}/references/dictionary/genome.dict") + ).match("reference") }, + { assert snapshot( + path("${params.outdir}/summary/comparisons/small/rtgtools.small.FN.csv"), + path("${params.outdir}/summary/comparisons/small/rtgtools.small.FP.csv"), + path("${params.outdir}/summary/comparisons/small/rtgtools.small.TP_base.csv"), + path("${params.outdir}/summary/comparisons/small/rtgtools.small.TP_comp.csv"), + path("${params.outdir}/summary/comparisons/sv/truvari.sv.FN.csv"), + path("${params.outdir}/summary/comparisons/sv/truvari.sv.FP.csv"), + path("${params.outdir}/summary/comparisons/sv/truvari.sv.TP_base.csv"), + path("${params.outdir}/summary/comparisons/sv/truvari.sv.TP_comp.csv"), + path("${params.outdir}/summary/comparisons/sv/svbenchmark.sv.FN.csv"), + path("${params.outdir}/summary/comparisons/sv/svbenchmark.sv.FP.csv"), + path("${params.outdir}/summary/plots/sv/svbenchmark/metric_by_tool_svbenchmark.png"), + path("${params.outdir}/summary/plots/sv/svbenchmark/variants_by_tool_svbenchmark.png"), + path("${params.outdir}/summary/plots/sv/truvari/metric_by_tool_truvari.png"), + path("${params.outdir}/summary/plots/sv/truvari/variants_by_tool_truvari.png"), + path("${params.outdir}/summary/plots/sv/wittyer/Base_metric_by_tool_wittyer.png"), + path("${params.outdir}/summary/plots/sv/wittyer/Base_variants_by_tool_wittyer.png"), + path("${params.outdir}/summary/plots/sv/wittyer/Event_metric_by_tool_wittyer.png"), + path("${params.outdir}/summary/plots/sv/wittyer/Event_variants_by_tool_wittyer.png"), + path("${params.outdir}/summary/plots/small/happy/INDEL_ALL_metric_by_tool_happy.png"), + path("${params.outdir}/summary/plots/small/happy/INDEL_ALL_variants_by_tool_happy.png"), + path("${params.outdir}/summary/plots/small/happy/INDEL_PASS_metric_by_tool_happy.png"), + path("${params.outdir}/summary/plots/small/happy/INDEL_PASS_variants_by_tool_happy.png"), + path("${params.outdir}/summary/plots/small/happy/SNP_ALL_metric_by_tool_happy.png"), + path("${params.outdir}/summary/plots/small/happy/SNP_ALL_variants_by_tool_happy.png"), + path("${params.outdir}/summary/plots/small/happy/SNP_PASS_metric_by_tool_happy.png"), + path("${params.outdir}/summary/plots/small/happy/SNP_PASS_variants_by_tool_happy.png"), + path("${params.outdir}/summary/plots/small/rtgtools/metric_by_tool_rtgtools.png"), + path("${params.outdir}/summary/plots/small/rtgtools/variants_by_tool_rtgtools.png"), + path("${params.outdir}/summary/tables/small/rtgtools/rtgtools.small.summary.csv"), + path("${params.outdir}/summary/tables/small/happy/happy.small.summary.csv"), + path("${params.outdir}/summary/tables/sv/svbenchmark/svbenchmark.sv.summary.csv"), + path("${params.outdir}/summary/tables/sv/truvari/truvari.sv.summary.csv"), + path("${params.outdir}/summary/tables/sv/wittyer/wittyer.sv.summary.csv") + ).match("summary") }, + { assert snapshot( + path("${params.outdir}/bcftools1/stats/bcftools/bcftools1.small.bcftools.bcftools_stats.txt"), + path("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.extended.csv"), + path("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.summary.csv"), + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.metrics.json.gz").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.roc.all.csv.gz").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.roc.Locations.INDEL.csv.gz").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.roc.Locations.INDEL.PASS.csv.gz").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.roc.Locations.SNP.csv.gz").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.roc.Locations.SNP.PASS.csv.gz").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.runinfo.json").name + ).match("bcftools1_happy") }, + { assert snapshot( + path("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.summary.txt"), + path("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.phasing.txt"), + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.fn.vcf.gz").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.fn.vcf.gz.tbi").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.fp.vcf.gz").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.fp.vcf.gz.tbi").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.tp.vcf.gz").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.tp.vcf.gz.tbi").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.tp-baseline.vcf.gz").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.tp-baseline.vcf.gz.tbi").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.non_snp_roc.tsv.gz").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.snp_roc.tsv.gz").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.weighted_roc.tsv.gz").name + ).match("bcftools1_rtgtools") }, + { assert snapshot( + path("${params.outdir}/strelka1/stats/bcftools/strelka1.small.strelka.bcftools_stats.txt"), + path("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.extended.csv"), + path("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.summary.csv"), + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.metrics.json.gz").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.roc.all.csv.gz").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.roc.Locations.INDEL.csv.gz").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.roc.Locations.INDEL.PASS.csv.gz").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.roc.Locations.SNP.csv.gz").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.roc.Locations.SNP.PASS.csv.gz").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.runinfo.json").name + ).match("strelka_happy") }, + { assert snapshot( + path("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.summary.txt"), + path("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.phasing.txt"), + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.fn.vcf.gz").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.fn.vcf.gz.tbi").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.fp.vcf.gz").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.fp.vcf.gz.tbi").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.tp.vcf.gz").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.tp.vcf.gz.tbi").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.tp-baseline.vcf.gz").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.tp-baseline.vcf.gz.tbi").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.non_snp_roc.tsv.gz").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.snp_roc.tsv.gz").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.weighted_roc.tsv.gz").name + ).match("strelka_rtgtools") }, + { assert snapshot( + path("${params.outdir}/dragen1/stats/bcftools/dragen1.sv.dragen.bcftools_stats.txt"), + path("${params.outdir}/dragen1/stats/survivor/dragen1.sv.dragen.stats"), + path("${params.outdir}/dragen1/svanalyzer_bench/dragen1.HG002.sv.dragen.distances"), + path("${params.outdir}/dragen1/svanalyzer_bench/dragen1.HG002.sv.dragen.log"), + path("${params.outdir}/dragen1/svanalyzer_bench/dragen1.HG002.sv.dragen.report"), + file("${params.outdir}/dragen1/svanalyzer_bench/dragen1.HG002.sv.dragen.falsenegatives.vcf.gz").name, + file("${params.outdir}/dragen1/svanalyzer_bench/dragen1.HG002.sv.dragen.falsepositives.vcf.gz").name + ).match("dragen_svanalyzer") }, + { assert snapshot( + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.fn.vcf.gz").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.fp.vcf.gz").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.tp-base.vcf.gz").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.tp-comp.vcf.gz").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.fn.vcf.gz.tbi").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.fp.vcf.gz.tbi").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.tp-base.vcf.gz.tbi").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.tp-comp.vcf.gz.tbi").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.summary.json").name + ).match("dragen_truvari") }, + { assert snapshot( + file("${params.outdir}/dragen1/wittyer_bench/dragen1.HG002.sv.dragen.vcf.gz").name, + file("${params.outdir}/dragen1/wittyer_bench/dragen1.HG002.sv.dragen.vcf.gz.tbi").name, + file("${params.outdir}/dragen1/wittyer_bench/dragen1.HG002.sv.dragen.json").name + ).match("dragen_wittyer") }, + { assert snapshot( + path("${params.outdir}/manta1/stats/bcftools/manta1.sv.manta.bcftools_stats.txt"), + path("${params.outdir}/manta1/stats/survivor/manta1.sv.manta.stats"), + path("${params.outdir}/manta1/svanalyzer_bench/manta1.HG002.sv.manta.distances"), + path("${params.outdir}/manta1/svanalyzer_bench/manta1.HG002.sv.manta.log"), + path("${params.outdir}/manta1/svanalyzer_bench/manta1.HG002.sv.manta.report"), + file("${params.outdir}/manta1/svanalyzer_bench/manta1.HG002.sv.manta.falsenegatives.vcf.gz").name, + file("${params.outdir}/manta1/svanalyzer_bench/manta1.HG002.sv.manta.falsepositives.vcf.gz").name + ).match("manta_svanalyzerr") }, + { assert snapshot( + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.fn.vcf.gz").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.fp.vcf.gz").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.tp-base.vcf.gz").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.tp-comp.vcf.gz").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.fn.vcf.gz.tbi").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.fp.vcf.gz.tbi").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.tp-base.vcf.gz.tbi").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.tp-comp.vcf.gz.tbi").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.summary.json").name + ).match("manta_truvari") }, + { assert snapshot( + file("${params.outdir}/manta1/wittyer_bench/manta1.HG002.sv.manta.vcf.gz").name, + file("${params.outdir}/manta1/wittyer_bench/manta1.HG002.sv.manta.vcf.gz.tbi").name, + file("${params.outdir}/manta1/wittyer_bench/manta1.HG002.sv.manta.json").name + ).match("manta_wittyer") }, + { assert snapshot( + path("${params.outdir}/merged1/stats/bcftools/merged1.sv.merged.bcftools_stats.txt"), + path("${params.outdir}/merged1/stats/survivor/merged1.sv.merged.stats"), + path("${params.outdir}/merged1/svanalyzer_bench/merged1.HG002.sv.merged.distances"), + path("${params.outdir}/merged1/svanalyzer_bench/merged1.HG002.sv.merged.log"), + path("${params.outdir}/merged1/svanalyzer_bench/merged1.HG002.sv.merged.report"), + file("${params.outdir}/merged1/svanalyzer_bench/merged1.HG002.sv.merged.falsenegatives.vcf.gz").name, + file("${params.outdir}/merged1/svanalyzer_bench/merged1.HG002.sv.merged.falsepositives.vcf.gz").name + ).match("merged_svanalyzer") }, + { assert snapshot( + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.fn.vcf.gz").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.fp.vcf.gz").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.tp-base.vcf.gz").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.tp-comp.vcf.gz").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.fn.vcf.gz.tbi").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.fp.vcf.gz.tbi").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.tp-base.vcf.gz.tbi").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.tp-comp.vcf.gz.tbi").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.summary.json").name + ).match("merged_truvari") }, + { assert snapshot( + file("${params.outdir}/merged1/wittyer_bench/merged1.HG002.sv.merged.vcf.gz").name, + file("${params.outdir}/merged1/wittyer_bench/merged1.HG002.sv.merged.vcf.gz.tbi").name, + file("${params.outdir}/merged1/wittyer_bench/merged1.HG002.sv.merged.json").name + ).match("merged_wittyerr") }, + { assert snapshot( + file("${params.outdir}/multiqc/multiqc_data/multiqc_citations.txt").name, + file("${params.outdir}/multiqc/multiqc_data/multiqc_data.json").name, + file("${params.outdir}/multiqc/multiqc_data/multiqc_sources.txt").name, + file("${params.outdir}/multiqc/multiqc_data/multiqc.log").name, + file("${params.outdir}/multiqc/multiqc_report.html").name + ).match("multiqc") }, + { assert snapshot( + UTILS.removeNextflowVersion("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml") + ).match("version") } + ) + } + } + test("Run with profile test stub") { + options "-stub" + config "../conf/test_liftover.config" + when { + params { + max_cpus = 2 + max_memory = '6.GB' + max_time = '6.h' + input = 'https://raw.githubusercontent.com/kubranarci/benchmark_datasets/main/SV_testdata/samplesheet_HG002_hg38.csv' + outdir = 'results' + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot( + file("${params.outdir}/HG002/liftover/HG002.sv.sort.merged.bed").name, + file("${params.outdir}/HG002/liftover/HG002.sv.renamechr.vcf.gz").name, + file("${params.outdir}/HG002/liftover/HG002.small.renamechr.vcf.gz").name, + file("${params.outdir}/HG002/stats/survivor/HG002.sv.stats").name + ).match("HG002_stub") } + { assert snapshot( + file("${params.outdir}/references/rtgtools/genome.sdf/summary.txt").name, + file("${params.outdir}/references/dictionary/genome.dict").name + ).match("reference_stub") }, + { assert snapshot( + file("${params.outdir}/summary/comparisons/small/rtgtools.small.FN.csv").name, + file("${params.outdir}/summary/comparisons/small/rtgtools.small.FP.csv").name, + file("${params.outdir}/summary/comparisons/small/rtgtools.small.TP_base.csv").name, + file("${params.outdir}/summary/comparisons/small/rtgtools.small.TP_comp.csv").name, + file("${params.outdir}/summary/comparisons/sv/truvari.sv.FN.csv").name, + file("${params.outdir}/summary/comparisons/sv/truvari.sv.FP.csv").name, + file("${params.outdir}/summary/comparisons/sv/truvari.sv.TP_base.csv").name, + file("${params.outdir}/summary/comparisons/sv/truvari.sv.TP_comp.csv").name, + file("${params.outdir}/summary/comparisons/sv/svbenchmark.sv.FN.csv").name, + file("${params.outdir}/summary/comparisons/sv/svbenchmark.sv.FP.csv").name, + file("${params.outdir}/summary/plots/sv/svbenchmark/metric_by_tool_svbenchmark.png").name, + file("${params.outdir}/summary/plots/sv/svbenchmark/variants_by_tool_svbenchmark.png").name, + file("${params.outdir}/summary/plots/sv/truvari/metric_by_tool_truvari.png").name, + file("${params.outdir}/summary/plots/sv/truvari/variants_by_tool_truvari.png").name, + file("${params.outdir}/summary/plots/sv/wittyer/Base_metric_by_tool_wittyer.png").name, + file("${params.outdir}/summary/plots/sv/wittyer/Base_variants_by_tool_wittyer.png").name, + file("${params.outdir}/summary/plots/sv/wittyer/Event_metric_by_tool_wittyer.png").name, + file("${params.outdir}/summary/plots/sv/wittyer/Event_variants_by_tool_wittyer.png").name, + file("${params.outdir}/summary/plots/small/happy/INDEL_ALL_metric_by_tool_happy.png").name, + file("${params.outdir}/summary/plots/small/happy/INDEL_ALL_variants_by_tool_happy.png").name, + file("${params.outdir}/summary/plots/small/happy/INDEL_PASS_metric_by_tool_happy.png").name, + file("${params.outdir}/summary/plots/small/happy/INDEL_PASS_variants_by_tool_happy.png").name, + file("${params.outdir}/summary/plots/small/happy/SNP_ALL_metric_by_tool_happy.png").name, + file("${params.outdir}/summary/plots/small/happy/SNP_ALL_variants_by_tool_happy.png").name, + file("${params.outdir}/summary/plots/small/happy/SNP_PASS_metric_by_tool_happy.png").name, + file("${params.outdir}/summary/plots/small/happy/SNP_PASS_variants_by_tool_happy.png").name, + file("${params.outdir}/summary/plots/small/rtgtools/metric_by_tool_rtgtools.png").name, + file("${params.outdir}/summary/plots/small/rtgtools/variants_by_tool_rtgtools.png").name, + file("${params.outdir}/summary/tables/small/rtgtools/rtgtools.small.summary.csv").name, + file("${params.outdir}/summary/tables/small/happy/happy.small.summary.csv").name, + file("${params.outdir}/summary/tables/sv/svbenchmark/svbenchmark.sv.summary.csv").name, + file("${params.outdir}/summary/tables/sv/truvari/truvari.sv.summary.csv").name, + file("${params.outdir}/summary/tables/sv/wittyer/wittyer.sv.summary.csv").name + ).match("summary_stub") }, + { assert snapshot( + file("${params.outdir}/bcftools1/stats/bcftools/bcftools1.small.bcftools.bcftools_stats.txt").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.extended.csv").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.summary.csv").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.metrics.json.gz").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.roc.all.csv.gz").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.roc.Locations.INDEL.csv.gz").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.roc.Locations.INDEL.PASS.csv.gz").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.roc.Locations.SNP.csv.gz").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.roc.Locations.SNP.PASS.csv.gz").name, + file("${params.outdir}/bcftools1/happy_bench/bcftools1.HG002.small.bcftools.runinfo.json").name + ).match("bcftools1_happy_stub") }, + { assert snapshot( + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.summary.txt").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.phasing.txt").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.fn.vcf.gz").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.fn.vcf.gz.tbi").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.fp.vcf.gz").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.fp.vcf.gz.tbi").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.tp.vcf.gz").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.tp.vcf.gz.tbi").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.tp-baseline.vcf.gz").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.tp-baseline.vcf.gz.tbi").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.non_snp_roc.tsv.gz").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.snp_roc.tsv.gz").name, + file("${params.outdir}/bcftools1/rtgtools_bench/bcftools1.HG002.small.bcftools.weighted_roc.tsv.gz").name + ).match("bcftools1_rtgtools_stub") }, + { assert snapshot( + file("${params.outdir}/strelka1/stats/bcftools/strelka1.small.strelka.bcftools_stats.txt").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.extended.csv").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.summary.csv").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.metrics.json.gz").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.roc.all.csv.gz").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.roc.Locations.INDEL.csv.gz").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.roc.Locations.INDEL.PASS.csv.gz").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.roc.Locations.SNP.csv.gz").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.roc.Locations.SNP.PASS.csv.gz").name, + file("${params.outdir}/strelka1/happy_bench/strelka1.HG002.small.strelka.runinfo.json").name + ).match("strelka_happy_stub") }, + { assert snapshot( + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.summary.txt").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.phasing.txt").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.fn.vcf.gz").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.fn.vcf.gz.tbi").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.fp.vcf.gz").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.fp.vcf.gz.tbi").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.tp.vcf.gz").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.tp.vcf.gz.tbi").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.tp-baseline.vcf.gz").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.tp-baseline.vcf.gz.tbi").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.non_snp_roc.tsv.gz").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.snp_roc.tsv.gz").name, + file("${params.outdir}/strelka1/rtgtools_bench/strelka1.HG002.small.strelka.weighted_roc.tsv.gz").name + ).match("strelka_rtgtools_stub") }, + { assert snapshot( + file("${params.outdir}/dragen1/stats/bcftools/dragen1.sv.dragen.bcftools_stats.txt").name, + file("${params.outdir}/dragen1/stats/survivor/dragen1.sv.dragen.stats").name, + file("${params.outdir}/dragen1/svanalyzer_bench/dragen1.HG002.sv.dragen.distances").name, + file("${params.outdir}/dragen1/svanalyzer_bench/dragen1.HG002.sv.dragen.log").name, + file("${params.outdir}/dragen1/svanalyzer_bench/dragen1.HG002.sv.dragen.report").name, + file("${params.outdir}/dragen1/svanalyzer_bench/dragen1.HG002.sv.dragen.falsenegatives.vcf.gz").name, + file("${params.outdir}/dragen1/svanalyzer_bench/dragen1.HG002.sv.dragen.falsepositives.vcf.gz").name + ).match("dragen_svanalyzer_stub") }, + { assert snapshot( + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.fn.vcf.gz").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.fp.vcf.gz").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.tp-base.vcf.gz").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.tp-comp.vcf.gz").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.fn.vcf.gz.tbi").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.fp.vcf.gz.tbi").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.tp-base.vcf.gz.tbi").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.tp-comp.vcf.gz.tbi").name, + file("${params.outdir}/dragen1/truvari_bench/dragen1.HG002.sv.dragen.summary.json").name + ).match("dragen_truvari_stub") }, + { assert snapshot( + file("${params.outdir}/dragen1/wittyer_bench/dragen1.HG002.sv.dragen.vcf.gz").name, + file("${params.outdir}/dragen1/wittyer_bench/dragen1.HG002.sv.dragen.vcf.gz.tbi").name, + file("${params.outdir}/dragen1/wittyer_bench/dragen1.HG002.sv.dragen.json").name + ).match("dragen_wittyer_stub") }, + { assert snapshot( + file("${params.outdir}/manta1/stats/bcftools/manta1.sv.manta.bcftools_stats.txt").name, + file("${params.outdir}/manta1/stats/survivor/manta1.sv.manta.stats").name, + file("${params.outdir}/manta1/svanalyzer_bench/manta1.HG002.sv.manta.distances").name, + file("${params.outdir}/manta1/svanalyzer_bench/manta1.HG002.sv.manta.log").name, + file("${params.outdir}/manta1/svanalyzer_bench/manta1.HG002.sv.manta.report").name, + file("${params.outdir}/manta1/svanalyzer_bench/manta1.HG002.sv.manta.falsenegatives.vcf.gz").name, + file("${params.outdir}/manta1/svanalyzer_bench/manta1.HG002.sv.manta.falsepositives.vcf.gz").name + ).match("manta_svanalyzer_stub") }, + { assert snapshot( + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.fn.vcf.gz").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.fp.vcf.gz").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.tp-base.vcf.gz").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.tp-comp.vcf.gz").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.fn.vcf.gz.tbi").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.fp.vcf.gz.tbi").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.tp-base.vcf.gz.tbi").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.tp-comp.vcf.gz.tbi").name, + file("${params.outdir}/manta1/truvari_bench/manta1.HG002.sv.manta.summary.json").name + ).match("manta_truvari_stub") }, + { assert snapshot( + file("${params.outdir}/manta1/wittyer_bench/manta1.HG002.sv.manta.vcf.gz").name, + file("${params.outdir}/manta1/wittyer_bench/manta1.HG002.sv.manta.vcf.gz.tbi").name, + file("${params.outdir}/manta1/wittyer_bench/manta1.HG002.sv.manta.json").name + ).match("manta_wittyer_stub") }, + { assert snapshot( + file("${params.outdir}/merged1/stats/bcftools/merged1.sv.merged.bcftools_stats.txt").name, + file("${params.outdir}/merged1/stats/survivor/merged1.sv.merged.stats").name, + file("${params.outdir}/merged1/svanalyzer_bench/merged1.HG002.sv.merged.distances").name, + file("${params.outdir}/merged1/svanalyzer_bench/merged1.HG002.sv.merged.log").name, + file("${params.outdir}/merged1/svanalyzer_bench/merged1.HG002.sv.merged.report").name, + file("${params.outdir}/merged1/svanalyzer_bench/merged1.HG002.sv.merged.falsenegatives.vcf.gz").name, + file("${params.outdir}/merged1/svanalyzer_bench/merged1.HG002.sv.merged.falsepositives.vcf.gz").name + ).match("merged_svanalyzer_stub") }, + { assert snapshot( + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.fn.vcf.gz").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.fp.vcf.gz").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.tp-base.vcf.gz").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.tp-comp.vcf.gz").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.fn.vcf.gz.tbi").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.fp.vcf.gz.tbi").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.tp-base.vcf.gz.tbi").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.tp-comp.vcf.gz.tbi").name, + file("${params.outdir}/merged1/truvari_bench/merged1.HG002.sv.merged.summary.json").name + ).match("merged_truvari_stub") }, + { assert snapshot( + file("${params.outdir}/merged1/wittyer_bench/merged1.HG002.sv.merged.vcf.gz").name, + file("${params.outdir}/merged1/wittyer_bench/merged1.HG002.sv.merged.vcf.gz.tbi").name, + file("${params.outdir}/merged1/wittyer_bench/merged1.HG002.sv.merged.json").name + ).match("merged_wittyer_stub") }, + { assert snapshot( + file("${params.outdir}/multiqc/multiqc_data/multiqc_citations.txt").name, + file("${params.outdir}/multiqc/multiqc_data/multiqc_data.json").name, + file("${params.outdir}/multiqc/multiqc_data/multiqc_sources.txt").name, + file("${params.outdir}/multiqc/multiqc_data/multiqc.log").name, + file("${params.outdir}/multiqc/multiqc_report.html").name + ).match("multiqc_stub") }, + { assert snapshot( + UTILS.removeNextflowVersion("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml") + ).match("version_stub") } + ) + } + } +} diff --git a/tests/liftover.nf.test.snap b/tests/liftover.nf.test.snap new file mode 100644 index 0000000..0818991 --- /dev/null +++ b/tests/liftover.nf.test.snap @@ -0,0 +1,15 @@ +{ + "HG002": { + "content": [ + "HG002.sv.sort.merged.bed", + "HG002.sv.renamechr.vcf.gz", + "HG002.small.renamechr.vcf.gz", + "HG002.sv.stats" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T14:41:42.187016562" + } +} \ No newline at end of file diff --git a/tests/main.nf.test b/tests/main.nf.test deleted file mode 100644 index ce70bbe..0000000 --- a/tests/main.nf.test +++ /dev/null @@ -1,38 +0,0 @@ -nextflow_pipeline { - - name "Test pipeline" - script "../main.nf" - tag "PIPELINE" - - test("Run with profile test") { - - when { - params { - max_cpus = 2 - max_memory = '6.GB' - max_time = '6.h' - sample = "HG002" - input = "https://raw.githubusercontent.com/kubranarci/benchmark_datasets/main/SV_testdata/samplesheet_HG002_hg38.csv" - outdir = "$outputDir" - genome = 'GRCh38' - analysis = 'germline' - method = 'happy,truvari,svanalyzer,wittyer,rtgtools' // - preprocess = "normalization,deduplication,prepy" - sv_standardization = "svync,homogenize" - include_expression = 'FILTER="."' - min_sv_size = 30 - truth_small = "https://raw.githubusercontent.com/kubranarci/benchmark_datasets/main/CRMG_benchmark_dataset/HG002_GRCh38_CMRG_smallvar_v1.00.vcf.gz" - high_conf_small = "https://raw.githubusercontent.com/kubranarci/benchmark_datasets/main/CRMG_benchmark_dataset/HG002_GRCh38_CMRG_smallvar_v1.00.bed" - truth_sv = "https://raw.githubusercontent.com/kubranarci/benchmark_datasets/main/SV_testdata/hg38/truth/HG002_GRCh38_difficult_medical_gene_SV_benchmark_v0.01.chr21.vcf.gz" - high_conf_sv = "https://raw.githubusercontent.com/kubranarci/benchmark_datasets/main/SV_testdata/hg38/truth/HG002_GRCh38_difficult_medical_gene_SV_benchmark_v01.ch21.bed" - itruth_ignore = true - } - } - - then { - assertAll( - { assert workflow.success } - ) - } - } -} diff --git a/tests/somatic.nf.test b/tests/somatic.nf.test new file mode 100644 index 0000000..b222fea --- /dev/null +++ b/tests/somatic.nf.test @@ -0,0 +1,218 @@ +nextflow_pipeline { + + name "Test pipeline" + script "../main.nf" + tag "pipeline" + tag "pipeline_variantbenchmarking" + + test("Run with profile test somatic") { + config "../conf/test_somatic.config" + when { + params { + max_cpus = 2 + max_memory = '6.GB' + max_time = '6.h' + input = 'https://raw.githubusercontent.com/kubranarci/benchmark_datasets/main/sarek_full_test_somatic_v3.4.2/samplesheet_somatic.csv' + outdir = 'results' + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot( + file("${params.outdir}/SEQC2/stats/bcftools/SEQC2.indel.bcftools_stats.txt").name, + file("${params.outdir}/SEQC2/stats/bcftools/SEQC2.snv.bcftools_stats.txt").name, + file("${params.outdir}/SEQC2/stats/bcftools/SEQC2.sv.bcftools_stats.txt").name, + path("${params.outdir}/SEQC2/stats/survivor/SEQC2.sv.stats") + ).match("SEQC2") }, + { assert snapshot( + file("${params.outdir}/multiqc/multiqc_data/multiqc_citations.txt").name, + file("${params.outdir}/multiqc/multiqc_data/multiqc_data.json").name, + file("${params.outdir}/multiqc/multiqc_data/multiqc_sources.txt").name, + file("${params.outdir}/multiqc/multiqc_data/multiqc.log").name, + file("${params.outdir}/multiqc/multiqc_report.html").name + ).match("multiqc_somatic") }, + { assert snapshot( + UTILS.removeNextflowVersion("${params.outdir}/pipeline_info/nf_core_pipeline_software_mqc_versions.yml") + ).match("version_somatic") }, + { assert snapshot( + file("${params.outdir}/manta2/stats/bcftools/manta2.sv.manta.bcftools_stats.txt").name, + file("${params.outdir}/manta2/stats/survivor/manta2.sv.manta.stats").name, + file("${params.outdir}/manta2/truvari_bench/manta2.SEQC2.sv.manta.fn.vcf.gz").name, + file("${params.outdir}/manta2/truvari_bench/manta2.SEQC2.sv.manta.fp.vcf.gz").name, + file("${params.outdir}/manta2/truvari_bench/manta2.SEQC2.sv.manta.tp-base.vcf.gz").name, + file("${params.outdir}/manta2/truvari_bench/manta2.SEQC2.sv.manta.tp-comp.vcf.gz").name, + file("${params.outdir}/manta2/truvari_bench/manta2.SEQC2.sv.manta.fn.vcf.gz.tbi").name, + file("${params.outdir}/manta2/truvari_bench/manta2.SEQC2.sv.manta.fp.vcf.gz.tbi").name, + file("${params.outdir}/manta2/truvari_bench/manta2.SEQC2.sv.manta.tp-base.vcf.gz.tbi").name, + file("${params.outdir}/manta2/truvari_bench/manta2.SEQC2.sv.manta.tp-comp.vcf.gz.tbi").name, + file("${params.outdir}/manta2/truvari_bench/manta2.SEQC2.sv.manta.summary.json").name + ).match("manta2_truvari") }, + { assert snapshot( + file("${params.outdir}/manta1/stats/bcftools/manta1.snv.manta.bcftools_stats.txt").name, + path("${params.outdir}/manta1/sompy_bench/manta1.SEQC2.snv.manta.features.csv"), + path("${params.outdir}/manta1/sompy_bench/manta1.SEQC2.snv.manta.stats.csv"), + file("${params.outdir}/manta1/sompy_bench/manta1.SEQC2.snv.manta.metrics.json").name + ).match("manta_sompy") }, + { assert snapshot( + path("${params.outdir}/freebayes/stats/bcftools/freebayes.snv.freebayes.bcftools_stats.txt"), + path("${params.outdir}/freebayes/sompy_bench/freebayes.SEQC2.snv.freebayes.features.csv"), + path("${params.outdir}/freebayes/sompy_bench/freebayes.SEQC2.snv.freebayes.stats.csv"), + file("${params.outdir}/freebayes/sompy_bench/freebayes.SEQC2.snv.freebayes.metrics.json").name, + path("${params.outdir}/freebayes/stats/bcftools/freebayes.indel.freebayes.bcftools_stats.txt"), + path("${params.outdir}/freebayes/sompy_bench/freebayes.SEQC2.indel.freebayes.features.csv"), + path("${params.outdir}/freebayes/sompy_bench/freebayes.SEQC2.indel.freebayes.stats.csv"), + file("${params.outdir}/freebayes/sompy_bench/freebayes.SEQC2.indel.freebayes.metrics.json").name + ).match("freebayes_sompy") }, + { assert snapshot( + path("${params.outdir}/strelka1/stats/bcftools/strelka1.indel.strelka.bcftools_stats.txt"), + path("${params.outdir}/strelka1/sompy_bench/strelka1.SEQC2.indel.strelka.features.csv"), + path("${params.outdir}/strelka1/sompy_bench/strelka1.SEQC2.indel.strelka.stats.csv"), + file("${params.outdir}/strelka1/sompy_bench/strelka1.SEQC2.indel.strelka.metrics.json").name + ).match("strelka1_sompy") }, + { assert snapshot( + file("${params.outdir}/strelka2/stats/bcftools/strelka2.snv.strelka.bcftools_stats.txt").name, + path("${params.outdir}/strelka2/sompy_bench/strelka2.SEQC2.snv.strelka.stats.csv"), + file("${params.outdir}/strelka2/sompy_bench/strelka2.SEQC2.snv.strelka.metrics.json").name + ).match("strelka2_sompy") }, + { assert snapshot( + file("${params.outdir}/tiddit2/stats/bcftools/tiddit2.sv.tiddit.bcftools_stats.txt").name, + file("${params.outdir}/tiddit2/stats/survivor/tiddit2.sv.tiddit.stats").name, + file("${params.outdir}/tiddit2/truvari_bench/tiddit2.SEQC2.sv.tiddit.fn.vcf.gz").name, + file("${params.outdir}/tiddit2/truvari_bench/tiddit2.SEQC2.sv.tiddit.fp.vcf.gz").name, + file("${params.outdir}/tiddit2/truvari_bench/tiddit2.SEQC2.sv.tiddit.tp-base.vcf.gz").name, + file("${params.outdir}/tiddit2/truvari_bench/tiddit2.SEQC2.sv.tiddit.tp-comp.vcf.gz").name, + file("${params.outdir}/tiddit2/truvari_bench/tiddit2.SEQC2.sv.tiddit.fn.vcf.gz.tbi").name, + file("${params.outdir}/tiddit2/truvari_bench/tiddit2.SEQC2.sv.tiddit.fp.vcf.gz.tbi").name, + file("${params.outdir}/tiddit2/truvari_bench/tiddit2.SEQC2.sv.tiddit.tp-base.vcf.gz.tbi").name, + file("${params.outdir}/tiddit2/truvari_bench/tiddit2.SEQC2.sv.tiddit.tp-comp.vcf.gz.tbi").name, + file("${params.outdir}/tiddit2/truvari_bench/tiddit2.SEQC2.sv.tiddit.summary.json").name + ).match("tiddit2_truvari") }, + { assert snapshot( + path("${params.outdir}/summary/comparisons/sv/truvari.sv.FN.csv"), + path("${params.outdir}/summary/comparisons/sv/truvari.sv.FP.csv"), + path("${params.outdir}/summary/comparisons/sv/truvari.sv.TP_base.csv"), + path("${params.outdir}/summary/comparisons/sv/truvari.sv.TP_comp.csv"), + path("${params.outdir}/summary/plots/sv/truvari/metric_by_tool_truvari.png"), + path("${params.outdir}/summary/plots/sv/truvari/variants_by_tool_truvari.png"), + path("${params.outdir}/summary/plots/snv/sompy/metric_by_tool_rtgtools.png"), + path("${params.outdir}/summary/plots/indel/sompy/variants_by_tool_rtgtools.png"), + path("${params.outdir}/summary/plots/indel/sompy/metric_by_tool_rtgtools.png"), + path("${params.outdir}/summary/plots/snv/sompy/variants_by_tool_rtgtools.png"), + path("${params.outdir}/summary/tables/indel/sompy/sompy.small.summary.csv"), + path("${params.outdir}/summary/tables/indel/sompy/sompy.small.regions.csv"), + path("${params.outdir}/summary/tables/snv/sompy/sompy.small.summary.csv"), + path("${params.outdir}/summary/tables/snv/sompy/sompy.small.regions.csv"), + path("${params.outdir}/summary/tables/sv/truvari/truvari.sv.summary.csv") + ).match("summary_somatic") } + ) + } + } + + test("Run with profile test somatic -stub") { + options "-stub" + config "../conf/test_somatic.config" + when { + params { + max_cpus = 2 + max_memory = '6.GB' + max_time = '6.h' + input = 'https://raw.githubusercontent.com/kubranarci/benchmark_datasets/main/sarek_full_test_somatic_v3.4.2/samplesheet_somatic.csv' + outdir = 'results' + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot( + file("${params.outdir}/SEQC2/stats/bcftools/SEQC2.indel.bcftools_stats.txt").name, + file("${params.outdir}/SEQC2/stats/bcftools/SEQC2.snv.bcftools_stats.txt").name, + file("${params.outdir}/SEQC2/stats/bcftools/SEQC2.sv.bcftools_stats.txt").name, + file("${params.outdir}/SEQC2/stats/survivor/SEQC2.sv.stats").name + ).match("SEQC2_stub") }, + { assert snapshot( + file("${params.outdir}/multiqc/multiqc_data/multiqc_citations.txt").name, + file("${params.outdir}/multiqc/multiqc_data/multiqc_data.json").name, + file("${params.outdir}/multiqc/multiqc_data/multiqc_sources.txt").name, + file("${params.outdir}/multiqc/multiqc_data/multiqc.log").name, + file("${params.outdir}/multiqc/multiqc_report.html").name + ).match("multiqc_stub") }, + { assert snapshot( + UTILS.removeNextflowVersion("${params.outdir}/pipeline_info/nf_core_pipeline_software_mqc_versions.yml") + ).match("version_stub") }, + { assert snapshot( + file("${params.outdir}/manta2/stats/bcftools/manta2.sv.manta.bcftools_stats.txt").name, + file("${params.outdir}/manta2/stats/survivor/manta2.sv.manta.stats").name, + file("${params.outdir}/manta2/truvari_bench/manta2.SEQC2.sv.manta.fn.vcf.gz").name, + file("${params.outdir}/manta2/truvari_bench/manta2.SEQC2.sv.manta.fp.vcf.gz").name, + file("${params.outdir}/manta2/truvari_bench/manta2.SEQC2.sv.manta.tp-base.vcf.gz").name, + file("${params.outdir}/manta2/truvari_bench/manta2.SEQC2.sv.manta.tp-comp.vcf.gz").name, + file("${params.outdir}/manta2/truvari_bench/manta2.SEQC2.sv.manta.fn.vcf.gz.tbi").name, + file("${params.outdir}/manta2/truvari_bench/manta2.SEQC2.sv.manta.fp.vcf.gz.tbi").name, + file("${params.outdir}/manta2/truvari_bench/manta2.SEQC2.sv.manta.tp-base.vcf.gz.tbi").name, + file("${params.outdir}/manta2/truvari_bench/manta2.SEQC2.sv.manta.tp-comp.vcf.gz.tbi").name, + file("${params.outdir}/manta2/truvari_bench/manta2.SEQC2.sv.manta.summary.json").name + ).match("manta2_truvari_stub") }, + { assert snapshot( + file("${params.outdir}/manta1/stats/bcftools/manta1.snv.manta.bcftools_stats.txt").name, + file("${params.outdir}/manta1/sompy_bench/manta1.SEQC2.snv.manta.features.csv").name, + file("${params.outdir}/manta1/sompy_bench/manta1.SEQC2.snv.manta.stats.csv").name, + file("${params.outdir}/manta1/sompy_bench/manta1.SEQC2.snv.manta.metrics.json").name + ).match("manta_sompy_stub") }, + { assert snapshot( + file("${params.outdir}/freebayes/stats/bcftools/freebayes.snv.freebayes.bcftools_stats.txt").name, + file("${params.outdir}/freebayes/sompy_bench/freebayes.SEQC2.snv.freebayes.features.csv").name, + file("${params.outdir}/freebayes/sompy_bench/freebayes.SEQC2.snv.freebayes.stats.csv").name, + file("${params.outdir}/freebayes/sompy_bench/freebayes.SEQC2.snv.freebayes.metrics.json").name, + file("${params.outdir}/freebayes/stats/bcftools/freebayes.indel.freebayes.bcftools_stats.txt").name, + file("${params.outdir}/freebayes/sompy_bench/freebayes.SEQC2.indel.freebayes.features.csv").name, + file("${params.outdir}/freebayes/sompy_bench/freebayes.SEQC2.indel.freebayes.stats.csv").name, + file("${params.outdir}/freebayes/sompy_bench/freebayes.SEQC2.indel.freebayes.metrics.json").name + ).match("freebayes_sompy_stub") }, + { assert snapshot( + file("${params.outdir}/strelka1/stats/bcftools/strelka1.indel.strelka.bcftools_stats.txt").name, + file("${params.outdir}/strelka1/sompy_bench/strelka1.SEQC2.indel.strelka.features.csv").name, + file("${params.outdir}/strelka1/sompy_bench/strelka1.SEQC2.indel.strelka.stats.csv").name, + file("${params.outdir}/strelka1/sompy_bench/strelka1.SEQC2.indel.strelka.metrics.json").name + ).match("strelka1_sompy_stub") }, + { assert snapshot( + file("${params.outdir}/strelka2/stats/bcftools/strelka2.snv.strelka.bcftools_stats.txt").name, + file("${params.outdir}/strelka2/sompy_bench/strelka2.SEQC2.snv.strelka.stats.csv").name, + file("${params.outdir}/strelka2/sompy_bench/strelka2.SEQC2.snv.strelka.metrics.json").name + ).match("strelka2_sompy_stub") }, + { assert snapshot( + file("${params.outdir}/tiddit2/stats/bcftools/tiddit2.sv.tiddit.bcftools_stats.txt").name, + file("${params.outdir}/tiddit2/stats/survivor/tiddit2.sv.tiddit.stats").name, + file("${params.outdir}/tiddit2/truvari_bench/tiddit2.SEQC2.sv.tiddit.fn.vcf.gz").name, + file("${params.outdir}/tiddit2/truvari_bench/tiddit2.SEQC2.sv.tiddit.fp.vcf.gz").name, + file("${params.outdir}/tiddit2/truvari_bench/tiddit2.SEQC2.sv.tiddit.tp-base.vcf.gz").name, + file("${params.outdir}/tiddit2/truvari_bench/tiddit2.SEQC2.sv.tiddit.tp-comp.vcf.gz").name, + file("${params.outdir}/tiddit2/truvari_bench/tiddit2.SEQC2.sv.tiddit.fn.vcf.gz.tbi").name, + file("${params.outdir}/tiddit2/truvari_bench/tiddit2.SEQC2.sv.tiddit.fp.vcf.gz.tbi").name, + file("${params.outdir}/tiddit2/truvari_bench/tiddit2.SEQC2.sv.tiddit.tp-base.vcf.gz.tbi").name, + file("${params.outdir}/tiddit2/truvari_bench/tiddit2.SEQC2.sv.tiddit.tp-comp.vcf.gz.tbi").name, + file("${params.outdir}/tiddit2/truvari_bench/tiddit2.SEQC2.sv.tiddit.summary.json").name + ).match("tiddit2_truvari_stub") }, + { assert snapshot( + file("${params.outdir}/summary/comparisons/sv/truvari.sv.FN.csv").name, + file("${params.outdir}/summary/comparisons/sv/truvari.sv.FP.csv").name, + file("${params.outdir}/summary/comparisons/sv/truvari.sv.TP_base.csv").name, + file("${params.outdir}/summary/comparisons/sv/truvari.sv.TP_comp.csv").name, + file("${params.outdir}/summary/plots/sv/truvari/metric_by_tool_truvari.png").name, + file("${params.outdir}/summary/plots/sv/truvari/variants_by_tool_truvari.png").name, + file("${params.outdir}/summary/plots/snv/sompy/metric_by_tool_rtgtools.png").name, + file("${params.outdir}/summary/plots/indel/sompy/variants_by_tool_rtgtools.png").name, + file("${params.outdir}/summary/plots/indel/sompy/metric_by_tool_rtgtools.png").name, + file("${params.outdir}/summary/plots/snv/sompy/variants_by_tool_rtgtools.png").name, + file("${params.outdir}/summary/tables/indel/sompy/sompy.small.summary.csv").name, + file("${params.outdir}/summary/tables/indel/sompy/sompy.small.regions.csv").name, + file("${params.outdir}/summary/tables/snv/sompy/sompy.small.summary.csv").name, + file("${params.outdir}/summary/tables/snv/sompy/sompy.small.regions.csv").name, + file("${params.outdir}/summary/tables/sv/truvari/truvari.sv.summary.csv").name + ).match("summary_somatic_stub") } + ) + } + } +} diff --git a/tests/somatic.nf.test.snap b/tests/somatic.nf.test.snap new file mode 100644 index 0000000..f499a6c --- /dev/null +++ b/tests/somatic.nf.test.snap @@ -0,0 +1,36 @@ +{ + "multiqc_somatic": { + "content": [ + "multiqc_citations.txt", + "multiqc_data.json", + "multiqc_sources.txt", + "multiqc.log", + "multiqc_report.html" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T09:58:12.631557274" + }, + "manta2_truvari": { + "content": [ + "manta2.sv.manta.bcftools_stats.txt", + "manta2.sv.manta.stats", + "manta2.SEQC2.sv.manta.fn.vcf.gz", + "manta2.SEQC2.sv.manta.fp.vcf.gz", + "manta2.SEQC2.sv.manta.tp-base.vcf.gz", + "manta2.SEQC2.sv.manta.tp-comp.vcf.gz", + "manta2.SEQC2.sv.manta.fn.vcf.gz.tbi", + "manta2.SEQC2.sv.manta.fp.vcf.gz.tbi", + "manta2.SEQC2.sv.manta.tp-base.vcf.gz.tbi", + "manta2.SEQC2.sv.manta.tp-comp.vcf.gz.tbi", + "manta2.SEQC2.sv.manta.summary.json" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T09:58:12.649808793" + } +} \ No newline at end of file diff --git a/tests/tags.yml b/tests/tags.yml new file mode 100644 index 0000000..dd92af9 --- /dev/null +++ b/tests/tags.yml @@ -0,0 +1,5 @@ +pipeline_variantbenchmarking: + - "**.nf" + - "**.config" + - "**.nf.test" + - "**.json"