diff --git a/.gitattributes b/.gitattributes index 7a2dabc2..c1c17000 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,5 @@ *.config linguist-language=nextflow *.nf.test linguist-language=nextflow +tests/**/*nf.test.snap linguist-generated modules/nf-core/** linguist-generated subworkflows/nf-core/** linguist-generated diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a061b247..369c2f71 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,44 +1,61 @@ -name: nf-core CI # This workflow runs the pipeline with the minimal test dataset to check that it completes without any syntax errors +name: nf-core CI on: - push: - branches: - - dev pull_request: release: types: [published] - + merge_group: + types: + - checks_requested + branches: + - master + - dev env: NXF_ANSI_LOG: false + NFTEST_VER: "0.8.2" concurrency: group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" cancel-in-progress: true jobs: + define_nxf_versions: + name: Choose nextflow versions to test against depending on target branch + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.nxf_versions.outputs.matrix }} + steps: + - id: nxf_versions + run: | + if [[ "${{ github.event_name }}" == "pull_request" && "${{ github.base_ref }}" == "dev" && "${{ matrix.NXF_VER }}" != "latest-everything" ]]; then + echo matrix='["latest-everything"]' | tee -a $GITHUB_OUTPUT + else + echo matrix='["latest-everything", "23.04.0"]' | tee -a $GITHUB_OUTPUT + fi + test: - name: Run pipeline with test data - # 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/taxprofiler') }}" + name: nf-test + needs: define_nxf_versions runs-on: ubuntu-latest strategy: fail-fast: false matrix: - NXF_VER: - - "23.04.0" - - "latest-everything" + NXF_VER: ${{ fromJson(needs.define_nxf_versions.outputs.matrix) }} tags: - - "test" - - "test_nopreprocessing" - - "test_noprofiling" - - "test_krakenuniq" - - "test_malt" - - "test_motus" - - "test_falco" - - "test_fastp" - - "test_adapterremoval" - - "test_bbduk" - - "test_prinseqplusplus" + - "test_nothing" + # - "test" + # - "test_nopreprocessing" + # - "test_noprofiling" + # - "test_krakenuniq" + # - "test_malt" + # - "test_motus" + # - "test_falco" + # - "test_fastp" + # - "test_adapterremoval" + # - "test_bbduk" + # - "test_prinseqplusplus" + profile: + - "docker" steps: - name: Check out pipeline code @@ -49,22 +66,33 @@ jobs: with: version: "${{ matrix.NXF_VER }}" - - name: Show current locale - run: locale + - name: Cache nf-test installation + id: cache-software + uses: actions/cache@v3 + with: + path: | + /usr/local/bin/nf-test + /home/runner/.nf-test/nf-test.jar + key: ${{ runner.os }}-${{ env.NFTEST_VER }}-nftest - - name: Set UTF-8 enabled locale + - name: Install nf-test + if: steps.cache-software.outputs.cache-hit != 'true' run: | - sudo locale-gen en_US.UTF-8 - sudo update-locale LANG=en_US.UTF-8 + wget -qO- https://code.askimed.com/install/nf-test | bash + sudo mv nf-test /usr/local/bin/ - - name: Run pipeline with test data + - name: Run nf-test run: | - if [[ "${{ matrix.tags }}" == "test_motus" ]]; then - wget https://raw.githubusercontent.com/motu-tool/mOTUs/master/motus/downloadDB.py - python downloadDB.py > download_db_log.txt - echo 'tool,db_name,db_params,db_path' > 'database_motus.csv' - echo 'motus,db_mOTU,,db_mOTU' >> 'database_motus.csv' - nextflow run ${GITHUB_WORKSPACE} -profile docker,${{ matrix.tags }} --databases ./database_motus.csv --outdir ./results_${{ matrix.tags }}; - else - nextflow run ${GITHUB_WORKSPACE} -profile docker,${{ matrix.tags }} --outdir ./results_${{ matrix.tags }}; - fi + nf-test test --tag ${{ matrix.tags }} --profile "${{ matrix.tags }},${{ matrix.profile }}" --junitxml=test.xml + + - 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 diff --git a/.gitignore b/.gitignore index 5124c9ac..257b5f7a 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ results/ testing/ testing* *.pyc +.nf-test* +nf-test* diff --git a/.nf-core.yml b/.nf-core.yml index 3805dc81..3b337449 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -1 +1,5 @@ repository_type: pipeline +lint: + files_unchanged: + - .gitattributes + actions_ci: False diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c6be06f..8a03c9b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Added` +- [#309](https://github.com/nf-core/taxprofiler/pull/309) Implemented nf-tests for existing CI tests (added by @sateeshperi & @jfy133) - [#417](https://github.com/nf-core/taxprofiler/pull/417) - Added reference-free metagenome estimation with Nonpareil (added by @jfy133) ### `Fixed` diff --git a/nf-test.config b/nf-test.config new file mode 100644 index 00000000..cb656b94 --- /dev/null +++ b/nf-test.config @@ -0,0 +1,16 @@ +config { + // location for all nf-tests + testsDir "." + + // nf-test directory including temporary files for each test + workDir "/tmp" + + // location of library folder that is added automatically to the classpath + libDir "lib/" + + // location of an optional nextflow.config file specific for executing tests + configFile "nextflow.config" + + // run all test with the defined docker profile from the main nextflow.config + profile "" +} diff --git a/tests/lib/UTILS.groovy b/tests/lib/UTILS.groovy new file mode 100644 index 00000000..28c78f75 --- /dev/null +++ b/tests/lib/UTILS.groovy @@ -0,0 +1,38 @@ +// Helper functions for pipeline tests + +class UTILS { + + // Function to remove Nextflow version from software_versions.yml + public static String removeNextflowVersion(outputDir) { + def softwareVersions = path("$outputDir/pipeline_info/software_versions.yml").yaml + if (softwareVersions.containsKey("Workflow")) { + softwareVersions.Workflow.remove("Nextflow") + } + return softwareVersions + } + + // Function to filter lines from a file and return a new file + public static File filterLines(String inFilePath, int linesToSkip) { + if (linesToSkip >= 0) { + File inputFile = new File(inFilePath) + File outputFile = new File(inFilePath + ".filtered") + def lineCount = 0 + inputFile.eachLine { line -> + lineCount++ + if (lineCount > linesToSkip) { + outputFile.append(line + '\n') + } + } + return outputFile + } else { + File inputFile = new File(inFilePath) + File outputFile = new File(inFilePath + ".filtered") + def lines = inputFile.readLines() + def totalLines = lines.size() + lines.take(totalLines + linesToSkip).each { line -> + outputFile.append(line + '\n') + } + return outputFile + } + } +} diff --git a/tests/old/krakenuniq.nf.test.old b/tests/old/krakenuniq.nf.test.old new file mode 100644 index 00000000..6b9a8c70 --- /dev/null +++ b/tests/old/krakenuniq.nf.test.old @@ -0,0 +1,50 @@ +nextflow_pipeline { + + name "Test Workflow main.nf" + script "main.nf" + tag "test_krakenuniq" + tag "krakenuniq" + tag "pipeline" + + test("Kraken Uniq") { + + when { + params { + outdir = "$outputDir" + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot(UTILS.removeNextflowVersion("$outputDir")).match("software_versions") }, + { assert new File("$outputDir/bbduk/2612_ERR5766176_B.bbduk.log").exists() }, + { assert new File("$outputDir/bbduk/2612_ERR5766176.bbduk.log").exists() }, + { assert new File("$outputDir/bbduk/2612_ERR5766180.bbduk.log").exists() }, + { assert new File("$outputDir/bbduk/2613_ERR5766181.bbduk.log").exists() }, + { assert snapshot(path("$outputDir/bowtie2/align/").list()).match("bowtie2/align/") }, + { assert snapshot(path("$outputDir/fastp/2612_ERR5766176_B.fastp.json"), + path("$outputDir/fastp/2612_ERR5766176.fastp.json"), + path("$outputDir/fastp/2612_ERR5766180.fastp.json"), + path("$outputDir/fastp/2613_ERR5766181.fastp.json")).match("fastp") }, + { assert snapshot(path("$outputDir/filtlong/").list()).match("filtlong") }, + { assert snapshot(UTILS.filterLines("$outputDir/krakenuniq/db6/2612.krakenuniq.report.txt", 1), + UTILS.filterLines("$outputDir/krakenuniq/db6/2613_ERR5766181.krakenuniq.report.txt", 1), + UTILS.filterLines("$outputDir/krakenuniq/db6/ERR3201952.krakenuniq.report.txt", 1), + UTILS.filterLines("$outputDir/krakenuniq/db6/ERX5474930_ERR5766174_1.krakenuniq.report.txt", 1)).match("krakenuniq") }, + { assert snapshot(path("$outputDir/multiqc/multiqc_data/bbduk.txt"), + path("$outputDir/multiqc/multiqc_data/filtlong.txt"), + path("$outputDir/multiqc/multiqc_data/multiqc_bowtie2.txt"), + path("$outputDir/multiqc/multiqc_data/multiqc_fastp.txt"), + path("$outputDir/multiqc/multiqc_data/multiqc_fastqc_1.txt"), + path("$outputDir/multiqc/multiqc_data/multiqc_samtools_stats.txt"), + path("$outputDir/multiqc/multiqc_data/porechop.txt")).match("multiqc") }, + { assert snapshot(UTILS.filterLines("$outputDir/porechop/ERR3201952_ERR3201952.log", -3)).match("porechop") }, + { assert snapshot(path("$outputDir/samtools/stats/").list()).match("samtools/stats/") }, + { assert new File("$outputDir/taxpasta/krakenuniq_db6.tsv").exists() } + ) + } + + } + +} diff --git a/tests/old/krakenuniq.nf.test.snap.old b/tests/old/krakenuniq.nf.test.snap.old new file mode 100644 index 00000000..809f66cd --- /dev/null +++ b/tests/old/krakenuniq.nf.test.snap.old @@ -0,0 +1,75 @@ +{ + "filtlong": { + "content": [ + "ERR3201952_ERR3201952_filtered.log:md5,513650c6b058af60a824f98e6a632e2d" + ], + "timestamp": "2023-06-22T00:37:04+0000" + }, + "software_versions": { + "content": [ + "{BBMAP_BBDUK={bbmap=39.01}, BOWTIE2_ALIGN={bowtie2=2.4.4, pigz=2.6, samtools=1.16.1}, BOWTIE2_BUILD={bowtie2=2.4.4}, CUSTOM_DUMPSOFTWAREVERSIONS={python=3.11.0, yaml=6.0}, FASTP_PAIRED={fastp=0.23.2}, FASTP_SINGLE={fastp=0.23.2}, FASTQC={fastqc=0.11.9}, FASTQC_PROCESSED={fastqc=0.11.9}, FILTLONG={filtlong=0.2.1}, KRAKENUNIQ_PRELOADEDKRAKENUNIQ={krakenuniq=1.0.2}, MERGE_RUNS={cat=8.30}, MINIMAP2_ALIGN={minimap2=2.24-r1122}, MINIMAP2_INDEX={minimap2=2.24-r1122}, PORECHOP_PORECHOP={porechop=0.2.4}, SAMPLESHEET_CHECK={python=3.8.3}, SAMTOOLS_FASTQ={samtools=1.16.1}, SAMTOOLS_INDEX={samtools=1.16.1}, SAMTOOLS_STATS={samtools=1.16.1}, SAMTOOLS_VIEW={samtools=1.16.1}, UNTAR={untar=1.30}, Workflow={nf-core/taxprofiler=1.1.0dev}}" + ], + "timestamp": "2023-06-22T00:37:04+0000" + }, + "porechop": { + "content": [ + "ERR3201952_ERR3201952.log.filtered:md5,92a485cb081b6e40e1bc3360e73f69a9" + ], + "timestamp": "2023-06-22T00:37:04+0000" + }, + "taxpasta": { + "content": [ + "krakenuniq_db6.tsv:md5,9d1b3065bf509b8be6b5d5fa56b7e90a" + ], + "timestamp": "2023-06-22T00:37:04+0000" + }, + "multiqc": { + "content": [ + "bbduk.txt:md5,d609874f85386aeee5241cf7cbedee99", + "filtlong.txt:md5,69cd258c3883ba2acfb1b72cf3b743de", + "multiqc_bowtie2.txt:md5,554215fc040f48daec70cd89c39daa77", + "multiqc_fastp.txt:md5,d755cf8d8b9bb535ce10bacbc06b60a5", + "multiqc_fastqc_1.txt:md5,c3a7e1a86e753f246c1b99574e4dec37", + "multiqc_samtools_stats.txt:md5,8083ccec64e3a46b7cea712e8f734ac0", + "porechop.txt:md5,5cadfceb7d9bc6b4da7bbb981a90d8ed" + ], + "timestamp": "2023-06-22T00:37:04+0000" + }, + "krakenuniq": { + "content": [ + "2612.krakenuniq.report.txt.filtered:md5,06beb20116aa60938fe8b6214ca8ef15", + "2613_ERR5766181.krakenuniq.report.txt.filtered:md5,e89e70d44bfa8184ceb37bab909c5edc", + "ERR3201952.krakenuniq.report.txt.filtered:md5,cb16ae071567a2fd1286365dfb246a10", + "ERX5474930_ERR5766174_1.krakenuniq.report.txt.filtered:md5,73a3b35c5362cb1eb36bdf7b51b80242" + ], + "timestamp": "2023-06-22T00:37:04+0000" + }, + "bowtie2/align/": { + "content": [ + "2612_ERR5766176.bowtie2.log:md5,9ecf931cf545c9f4777dd4586dd883d2", + "2612_ERR5766176_B.bowtie2.log:md5,9ecf931cf545c9f4777dd4586dd883d2", + "2612_ERR5766180.bowtie2.log:md5,a7487ce9c549a7f8fb5694fd0889f929", + "2613_ERR5766181.bowtie2.log:md5,6cb148fdf3840de7a8a1f5315847817b" + ], + "timestamp": "2023-06-22T00:37:04+0000" + }, + "samtools/stats/": { + "content": [ + "2612_ERR5766176.stats:md5,22c22b8550ae64ca1bd84a3b5426258f", + "2612_ERR5766176_B.stats:md5,62424e4e81a1cb1efebeeb32fe393473", + "2612_ERR5766180.stats:md5,c8e54671319515471f1738105c661c19", + "2613_ERR5766181.stats:md5,a6734b56f0d0c7389c9a4972b0733d19", + "ERR3201952_ERR3201952.stats:md5,06a195adabd47f0d5eec9b15558a47cd" + ], + "timestamp": "2023-06-22T00:37:04+0000" + }, + "fastp": { + "content": [ + "2612_ERR5766176_B.fastp.json:md5,11ab617fa60858c5ff252a036db1787b", + "2612_ERR5766176.fastp.json:md5,78cfc49753d310c0b66f736f285f0533", + "2612_ERR5766180.fastp.json:md5,c47589fcbc4e0db8d9f98269fa6b1986", + "2613_ERR5766181.fastp.json:md5,5d967bbc748347f8ceff03b1fb1659a6" + ], + "timestamp": "2023-06-22T00:37:04+0000" + } +} \ No newline at end of file diff --git a/tests/old/malt.nf.test.old b/tests/old/malt.nf.test.old new file mode 100644 index 00000000..ac88e108 --- /dev/null +++ b/tests/old/malt.nf.test.old @@ -0,0 +1,33 @@ +nextflow_pipeline { + + name "Test Workflow main.nf" + script "main.nf" + tag "test_nothing" + tag "test_malt" + tag "pipeline" + + test("MALT") { + + when { + params { + outdir = "$outputDir" + input = "https://github.com/nf-core/test-datasets/raw/taxprofiler/samplesheet_shortreadsonly.csv" + run_malt = true + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot(UTILS.removeNextflowVersion("$outputDir")).match("software_versions") }, + { assert new File("$outputDir/malt/malt85/malt85-malt-run.log").exists() }, + { assert new File("$outputDir/malt/malt95/malt95-malt-run.log").exists() }, + { assert new File("$outputDir/multiqc/multiqc_data/malt.txt").exists() }, + { assert new File("$outputDir/multiqc/multiqc_data/multiqc_fastqc.txt").exists() }, + { assert new File("$outputDir/multiqc/multiqc_data/multiqc_general_stats.txt").exists() }, + ) + } + + } + +} diff --git a/tests/old/malt.nf.test.snap.old b/tests/old/malt.nf.test.snap.old new file mode 100644 index 00000000..a167b933 --- /dev/null +++ b/tests/old/malt.nf.test.snap.old @@ -0,0 +1,8 @@ +{ + "software_versions": { + "content": [ + "{CUSTOM_DUMPSOFTWAREVERSIONS={python=3.11.0, yaml=6.0}, FASTQC={fastqc=0.11.9}, MALT_RUN={malt=0.6.1}, MEGAN_RMA2INFO_TSV={megan=6.21.7}, SAMPLESHEET_CHECK={python=3.8.3}, UNTAR={untar=1.30}, Workflow={nf-core/taxprofiler=1.1.0dev}}" + ], + "timestamp": "2023-06-19T19:53:09+0000" + } +} \ No newline at end of file diff --git a/tests/old/motus.nf.test.old b/tests/old/motus.nf.test.old new file mode 100644 index 00000000..2bd0617a --- /dev/null +++ b/tests/old/motus.nf.test.old @@ -0,0 +1,30 @@ +nextflow_pipeline { + + name "Test Workflow main.nf" + script "main.nf" + tag "test_motus" + tag "pipeline" + options "--databases ./database_motus.csv" + + test("Database mOTUs") { + + when { + params { + outdir = "$outputDir" + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot(UTILS.removeNextflowVersion("$outputDir")).match("software_versions") }, + { assert new File("$outputDir/motus/motus_db_mOTU_combined_reports.txt").exists() }, + { assert snapshot(path("$outputDir/multiqc/multiqc_data/motus.txt"), + path("$outputDir/multiqc/multiqc_data/multiqc_general_stats.txt")).match("multiqc") }, + { assert new File("$outputDir/taxpasta/motus_db_mOTU.tsv").exists() } + ) + } + + } + +} diff --git a/tests/old/motus.nf.test.snap.old b/tests/old/motus.nf.test.snap.old new file mode 100644 index 00000000..a64bbe63 --- /dev/null +++ b/tests/old/motus.nf.test.snap.old @@ -0,0 +1,15 @@ +{ + "software_versions": { + "content": [ + "{CUSTOM_DUMPSOFTWAREVERSIONS={python=3.11.0, yaml=6.0}, FASTQC={fastqc=0.11.9}, MOTUS_MERGE={motus=3.1.0}, MOTUS_PROFILE={motus=3.1.0}, SAMPLESHEET_CHECK={python=3.8.3}, Workflow={nf-core/taxprofiler=1.1.0dev}}" + ], + "timestamp": "2023-06-19T20:20:15+0000" + }, + "multiqc": { + "content": [ + "motus.txt:md5,0ce62a9d532449c291c0cb84d3df1f38", + "multiqc_general_stats.txt:md5,d67a2b6304c3e9cbda3e8b936c35a877" + ], + "timestamp": "2023-06-19T20:20:15+0000" + } +} \ No newline at end of file diff --git a/tests/old/test.nf.test.old b/tests/old/test.nf.test.old new file mode 100644 index 00000000..79935dc8 --- /dev/null +++ b/tests/old/test.nf.test.old @@ -0,0 +1,66 @@ +nextflow_pipeline { + + name "Test Workflow main.nf" + script "main.nf" + tag "test" + tag "test_profile" + tag "pipeline" + + test("Illumina PE") { + + when { + params { + outdir = "$outputDir" + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot(UTILS.removeNextflowVersion("$outputDir")).match("software_versions") }, + { assert new File("$outputDir/bbduk/2612_ERR5766176_B.bbduk.log").exists() }, + { assert new File("$outputDir/bbduk/2612_ERR5766176.bbduk.log").exists() }, + { assert new File("$outputDir/bbduk/2612_ERR5766180.bbduk.log").exists() }, + { assert new File("$outputDir/bbduk/2613_ERR5766181.bbduk.log").exists() }, + { assert snapshot(path("$outputDir/bowtie2/align/").list()).match("bowtie2/align/") }, + { assert snapshot(path("$outputDir/bracken/bracken_db1_combined_reports.txt")).match("bracken") }, + { assert snapshot(path("$outputDir/centrifuge/centrifuge_db3_combined_reports.txt")).match("centrifuge") }, + { assert new File("$outputDir/diamond/db1/2611_se_db1.diamond.tsv").exists() }, + { assert new File("$outputDir/diamond/db1/2612_se_db1.diamond.tsv").exists() }, + { assert new File("$outputDir/diamond/db1/2613_se_db1.diamond.tsv").exists() }, + { assert new File("$outputDir/diamond/db1/ERR3201952_se_db1.diamond.tsv").exists() }, + { assert snapshot(path("$outputDir/fastp/2612_ERR5766176_B.fastp.json"), + path("$outputDir/fastp/2612_ERR5766176.fastp.json"), + path("$outputDir/fastp/2612_ERR5766180.fastp.json"), + path("$outputDir/fastp/2613_ERR5766181.fastp.json")).match("fastp") }, + { assert snapshot(path("$outputDir/filtlong/").list()).match("filtlong") }, + { assert new File("$outputDir/kaiju/kaiju_db5_combined_reports.txt").exists() }, + { assert snapshot(path("$outputDir/kraken2/kraken2_db1_combined_reports.txt"), + path("$outputDir/kraken2/kraken2_db2_combined_reports.txt")).match("kraken2") }, + { assert new File("$outputDir/krona/centrifuge_db3.html").exists() }, + { assert new File("$outputDir/krona/kaiju_db5.html").exists() }, + { assert new File("$outputDir/krona/kraken2_db1.html").exists() }, + { assert new File("$outputDir/krona/kraken2_db2.html").exists() }, + { assert new File("$outputDir/metaphlan3/metaphlan3_db4_combined_reports.txt").exists() }, + { assert snapshot(path("$outputDir/multiqc/multiqc_data/bbduk.txt"), + path("$outputDir/multiqc/multiqc_data/filtlong.txt"), + path("$outputDir/multiqc/multiqc_data/multiqc_bowtie2.txt"), + path("$outputDir/multiqc/multiqc_data/multiqc_fastp.txt"), + path("$outputDir/multiqc/multiqc_data/multiqc_fastqc_1.txt"), + path("$outputDir/multiqc/multiqc_data/multiqc_samtools_stats.txt"), + path("$outputDir/multiqc/multiqc_data/porechop.txt")).match("multiqc") }, + { assert snapshot(UTILS.filterLines("$outputDir/porechop/ERR3201952_ERR3201952.log", -3)).match("porechop") }, + { assert snapshot(path("$outputDir/samtools/stats/").list()).match("samtools/stats/") }, + { assert new File("$outputDir/taxpasta/bracken_db1.tsv").exists() }, + { assert new File("$outputDir/taxpasta/centrifuge_db3.tsv").exists() }, + { assert new File("$outputDir/taxpasta/diamond_db1.tsv").exists() }, + { assert new File("$outputDir/taxpasta/kaiju_db5.tsv").exists() }, + { assert new File("$outputDir/taxpasta/kraken2_db1.tsv").exists() }, + { assert new File("$outputDir/taxpasta/kraken2_db2.tsv").exists() }, + { assert new File("$outputDir/taxpasta/metaphlan_db4.tsv").exists() } + ) + } + + } + +} diff --git a/tests/old/test_with_complexityfilter_fastp.nf.test.old b/tests/old/test_with_complexityfilter_fastp.nf.test.old new file mode 100644 index 00000000..048cc807 --- /dev/null +++ b/tests/old/test_with_complexityfilter_fastp.nf.test.old @@ -0,0 +1,62 @@ +nextflow_pipeline { + + name "Test Workflow main.nf" + script "main.nf" + tag "test" + tag "test_fastp" + tag "pipeline" + + test("Short Read Complexity Filter Tool - Fastp") { + + when { + params { + outdir = "$outputDir" + shortread_complexityfilter_tool = "fastp" + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot(UTILS.removeNextflowVersion("$outputDir")).match("software_versions") }, + { assert snapshot(path("$outputDir/bowtie2/align/").list()).match("bowtie2/align/") }, + { assert snapshot(path("$outputDir/bracken/bracken_db1_combined_reports.txt")).match("bracken") }, + { assert snapshot(path("$outputDir/centrifuge/centrifuge_db3_combined_reports.txt")).match("centrifuge") }, + { assert new File("$outputDir/diamond/db1/2611_se_db1.diamond.tsv").exists() }, + { assert new File("$outputDir/diamond/db1/2612_se_db1.diamond.tsv").exists() }, + { assert new File("$outputDir/diamond/db1/2613_se_db1.diamond.tsv").exists() }, + { assert new File("$outputDir/diamond/db1/ERR3201952_se_db1.diamond.tsv").exists() }, + { assert snapshot(path("$outputDir/fastp/2612_ERR5766176_B.fastp.json"), + path("$outputDir/fastp/2612_ERR5766176.fastp.json"), + path("$outputDir/fastp/2612_ERR5766180.fastp.json"), + path("$outputDir/fastp/2613_ERR5766181.fastp.json")).match("fastp") }, + { assert snapshot(path("$outputDir/filtlong/").list()).match("filtlong") }, + { assert new File("$outputDir/kaiju/kaiju_db5_combined_reports.txt").exists() }, + { assert snapshot(path("$outputDir/kraken2/kraken2_db1_combined_reports.txt"), + path("$outputDir/kraken2/kraken2_db2_combined_reports.txt")).match("kraken2") }, + { assert new File("$outputDir/krona/centrifuge_db3.html").exists() }, + { assert new File("$outputDir/krona/kaiju_db5.html").exists() }, + { assert new File("$outputDir/krona/kraken2_db1.html").exists() }, + { assert new File("$outputDir/krona/kraken2_db2.html").exists() }, + { assert new File("$outputDir/metaphlan3/metaphlan3_db4_combined_reports.txt").exists() }, + { assert snapshot(path("$outputDir/multiqc/multiqc_data/filtlong.txt"), + path("$outputDir/multiqc/multiqc_data/multiqc_bowtie2.txt"), + path("$outputDir/multiqc/multiqc_data/multiqc_fastp.txt"), + path("$outputDir/multiqc/multiqc_data/multiqc_fastqc_1.txt"), + path("$outputDir/multiqc/multiqc_data/multiqc_samtools_stats.txt"), + path("$outputDir/multiqc/multiqc_data/porechop.txt")).match("multiqc") }, + { assert snapshot(UTILS.filterLines("$outputDir/porechop/ERR3201952_ERR3201952.log", -3)).match("porechop") }, + { assert snapshot(path("$outputDir/samtools/stats/").list()).match("samtools/stats/") }, + { assert new File("$outputDir/taxpasta/bracken_db1.tsv").exists() }, + { assert new File("$outputDir/taxpasta/centrifuge_db3.tsv").exists() }, + { assert new File("$outputDir/taxpasta/diamond_db1.tsv").exists() }, + { assert new File("$outputDir/taxpasta/kaiju_db5.tsv").exists() }, + { assert new File("$outputDir/taxpasta/kraken2_db1.tsv").exists() }, + { assert new File("$outputDir/taxpasta/kraken2_db2.tsv").exists() }, + { assert new File("$outputDir/taxpasta/metaphlan_db4.tsv").exists() } + ) + } + + } + +} diff --git a/tests/old/test_with_complexityfilter_fastp.nf.test.snap.old b/tests/old/test_with_complexityfilter_fastp.nf.test.snap.old new file mode 100644 index 00000000..d4c64e27 --- /dev/null +++ b/tests/old/test_with_complexityfilter_fastp.nf.test.snap.old @@ -0,0 +1,105 @@ +{ + "filtlong": { + "content": [ + "ERR3201952_ERR3201952_filtered.log:md5,513650c6b058af60a824f98e6a632e2d" + ], + "timestamp": "2023-06-20T03:10:21+0000" + }, + "metaphlan3": { + "content": [ + "metaphlan3_db4_combined_reports.txt:md5,c73796201f8b1874a75abb05bd9c2c5f" + ], + "timestamp": "2023-06-20T03:10:21+0000" + }, + "software_versions": { + "content": [ + "{BOWTIE2_ALIGN={bowtie2=2.4.4, pigz=2.6, samtools=1.16.1}, BOWTIE2_BUILD={bowtie2=2.4.4}, BRACKEN_BRACKEN={bracken=2.7}, CENTRIFUGE_CENTRIFUGE={centrifuge=1.0.4}, CUSTOM_DUMPSOFTWAREVERSIONS={python=3.11.0, yaml=6.0}, DIAMOND_BLASTX={diamond=2.0.15}, FASTP_PAIRED={fastp=0.23.2}, FASTP_SINGLE={fastp=0.23.2}, FASTQC={fastqc=0.11.9}, FASTQC_PROCESSED={fastqc=0.11.9}, FILTLONG={filtlong=0.2.1}, KAIJU_KAIJU={kaiju=1.8.2}, KAIJU_KAIJU2KRONA={kaiju=1.8.2}, KAIJU_KAIJU2TABLE_COMBINED={kaiju=1.8.2}, KAIJU_KAIJU2TABLE_SINGLE={kaiju=1.8.2}, KRAKEN2_KRAKEN2={kraken2=2.1.2, pigz=2.6}, KRAKENTOOLS_COMBINEKREPORTS_CENTRIFUGE={combine_kreports.py=1.2}, KRAKENTOOLS_COMBINEKREPORTS_KRAKEN={combine_kreports.py=1.2}, KRAKENTOOLS_KREPORT2KRONA={kreport2krona.py=1.2}, KRONA_CLEANUP={sed=4.7}, KRONA_KTIMPORTTEXT={krona=2.8.1}, MERGE_RUNS={cat=8.30}, METAPHLAN3_MERGEMETAPHLANTABLES={metaphlan3=3.0.12}, METAPHLAN3_METAPHLAN3={metaphlan3=3.0.12}, MINIMAP2_ALIGN={minimap2=2.24-r1122}, MINIMAP2_INDEX={minimap2=2.24-r1122}, PORECHOP_PORECHOP={porechop=0.2.4}, SAMPLESHEET_CHECK={python=3.8.3}, SAMTOOLS_FASTQ={samtools=1.16.1}, SAMTOOLS_INDEX={samtools=1.16.1}, SAMTOOLS_STATS={samtools=1.16.1}, SAMTOOLS_VIEW={samtools=1.16.1}, UNTAR={untar=1.30}, Workflow={nf-core/taxprofiler=1.1.0dev}}" + ], + "timestamp": "2023-06-20T03:10:21+0000" + }, + "porechop": { + "content": [ + "ERR3201952_ERR3201952.log.filtered:md5,92a485cb081b6e40e1bc3360e73f69a9" + ], + "timestamp": "2023-06-20T03:10:21+0000" + }, + "taxpasta": { + "content": [ + "bracken_db1.tsv:md5,7b08da8d785d1938a5ee054c5db9bf97", + "centrifuge_db3.tsv:md5,e863ece410193be03940cd6e106071a3", + "diamond_db1.tsv:md5,5f011c9c77e6a09732ebbb286079c514", + "kaiju_db5.tsv:md5,78fd84df498abcbf3ab065d0b8596cef", + "kraken2_db1.tsv:md5,91a897262e017b50f2ad5ad1f5e5f96c", + "kraken2_db2.tsv:md5,16ec973e870f4e967e1248bfe2c39e2b", + "metaphlan_db4.tsv:md5,e1c908b5c7dfa42c7e405f4e20802ab1" + ], + "timestamp": "2023-06-20T03:10:21+0000" + }, + "bracken": { + "content": [ + "bracken_db1_combined_reports.txt:md5,9435227d5ac9d7ee78dbb7e1ff3348ce" + ], + "timestamp": "2023-06-20T03:10:21+0000" + }, + "diamond": { + "content": [ + "2611_se_db1.diamond.tsv:md5,4d3baec82aeed53c6fa8803171edd212", + "2612_se_db1.diamond.tsv:md5,57df576d3859501e0c184be0be474bd5", + "2613_se_db1.diamond.tsv:md5,10b638aea8836d6fdb713b3bb578ddaf", + "ERR3201952_se_db1.diamond.tsv:md5,3c3d1a901abe0a097469423d217c13db" + ], + "timestamp": "2023-06-20T03:10:21+0000" + }, + "kraken2": { + "content": [ + "kraken2_db1_combined_reports.txt:md5,7f3668cbe62e3c689a082c022f352e27", + "kraken2_db2_combined_reports.txt:md5,cca9faa1de80d11bfaebc7df566e71fa" + ], + "timestamp": "2023-06-20T03:10:21+0000" + }, + "centrifuge": { + "content": [ + "centrifuge_db3_combined_reports.txt:md5,5d64a6ba245b269d2c501d614ac302f6" + ], + "timestamp": "2023-06-20T03:10:21+0000" + }, + "multiqc": { + "content": [ + "filtlong.txt:md5,69cd258c3883ba2acfb1b72cf3b743de", + "multiqc_bowtie2.txt:md5,b0be77d53fd71df186871168238f64b0", + "multiqc_fastp.txt:md5,f00a9decdeea5ff94ca078c0a6fbf189", + "multiqc_fastqc_1.txt:md5,a434af9a8fe58b545e342383ae42dc36", + "multiqc_samtools_stats.txt:md5,0f5daeb8d56cab79c5544d0805b80165", + "porechop.txt:md5,5cadfceb7d9bc6b4da7bbb981a90d8ed" + ], + "timestamp": "2023-06-20T03:10:21+0000" + }, + "bowtie2/align/": { + "content": [ + "2612_ERR5766176.bowtie2.log:md5,dda1526e79de4bdab426d79ef706119d", + "2612_ERR5766176_B.bowtie2.log:md5,dda1526e79de4bdab426d79ef706119d", + "2612_ERR5766180.bowtie2.log:md5,16be5d96f4f7cb306557893332fd0848", + "2613_ERR5766181.bowtie2.log:md5,3b7b3b6344e77229d79934e8a2958211" + ], + "timestamp": "2023-06-20T03:10:21+0000" + }, + "samtools/stats/": { + "content": [ + "2612_ERR5766176.stats:md5,baa1109302a2997d0825145c2654b946", + "2612_ERR5766176_B.stats:md5,60d429adaa8d09ac70fe9f5ce1c0c353", + "2612_ERR5766180.stats:md5,015566b451a5065ae0d871ba53ce587e", + "2613_ERR5766181.stats:md5,a6835893f2894762237172a1e74b72b1", + "ERR3201952_ERR3201952.stats:md5,06a195adabd47f0d5eec9b15558a47cd" + ], + "timestamp": "2023-06-20T03:10:21+0000" + }, + "fastp": { + "content": [ + "2612_ERR5766176_B.fastp.json:md5,6bab68b07802c02ad2bffeb4dc421708", + "2612_ERR5766176.fastp.json:md5,bbdb33c26cdba9a7463bb3de911bed54", + "2612_ERR5766180.fastp.json:md5,96d022031246167e0061fca62f57dcb7", + "2613_ERR5766181.fastp.json:md5,34cfb8fc9fa09e69ad3f7d09b0d40e92" + ], + "timestamp": "2023-06-20T03:10:21+0000" + } +} \ No newline at end of file diff --git a/tests/old/test_with_complexityfilter_prinseqpluslplus.nf.test.old b/tests/old/test_with_complexityfilter_prinseqpluslplus.nf.test.old new file mode 100644 index 00000000..cee4e98b --- /dev/null +++ b/tests/old/test_with_complexityfilter_prinseqpluslplus.nf.test.old @@ -0,0 +1,63 @@ +nextflow_pipeline { + + name "Test Workflow main.nf" + script "main.nf" + tag "test" + tag "test_prinseq++" + tag "pipeline" + + test("Short Read Complexity Filter Tool - PRINSEQ++") { + + when { + params { + outdir = "$outputDir" + shortread_complexityfilter_tool = "prinseqplusplus" + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot(UTILS.removeNextflowVersion("$outputDir")).match("software_versions") }, + { assert snapshot(path("$outputDir/bowtie2/align/").list()).match("bowtie2/align/") }, + { assert snapshot(path("$outputDir/prinseqplusplus/").list()).match("prinseqplusplus") }, + { assert snapshot(path("$outputDir/bracken/bracken_db1_combined_reports.txt")).match("bracken") }, + { assert snapshot(path("$outputDir/centrifuge/centrifuge_db3_combined_reports.txt")).match("centrifuge") }, + { assert new File("$outputDir/diamond/db1/2611_se_db1.diamond.tsv").exists() }, + { assert new File("$outputDir/diamond/db1/2612_se_db1.diamond.tsv").exists() }, + { assert new File("$outputDir/diamond/db1/2613_se_db1.diamond.tsv").exists() }, + { assert new File("$outputDir/diamond/db1/ERR3201952_se_db1.diamond.tsv").exists() }, + { assert snapshot(path("$outputDir/fastp/2612_ERR5766176_B.fastp.json"), + path("$outputDir/fastp/2612_ERR5766176.fastp.json"), + path("$outputDir/fastp/2612_ERR5766180.fastp.json"), + path("$outputDir/fastp/2613_ERR5766181.fastp.json")).match("fastp") }, + { assert snapshot(path("$outputDir/filtlong/").list()).match("filtlong") }, + { assert new File("$outputDir/kaiju/kaiju_db5_combined_reports.txt").exists() }, + { assert snapshot(path("$outputDir/kraken2/kraken2_db1_combined_reports.txt"), + path("$outputDir/kraken2/kraken2_db2_combined_reports.txt")).match("kraken2") }, + { assert new File("$outputDir/krona/centrifuge_db3.html").exists() }, + { assert new File("$outputDir/krona/kaiju_db5.html").exists() }, + { assert new File("$outputDir/krona/kraken2_db1.html").exists() }, + { assert new File("$outputDir/krona/kraken2_db2.html").exists() }, + { assert new File("$outputDir/metaphlan3/metaphlan3_db4_combined_reports.txt").exists() }, + { assert snapshot(path("$outputDir/multiqc/multiqc_data/filtlong.txt"), + path("$outputDir/multiqc/multiqc_data/multiqc_bowtie2.txt"), + path("$outputDir/multiqc/multiqc_data/multiqc_fastp.txt"), + path("$outputDir/multiqc/multiqc_data/multiqc_fastqc_1.txt"), + path("$outputDir/multiqc/multiqc_data/multiqc_samtools_stats.txt"), + path("$outputDir/multiqc/multiqc_data/porechop.txt")).match("multiqc") }, + { assert snapshot(UTILS.filterLines("$outputDir/porechop/ERR3201952_ERR3201952.log", -3)).match("porechop") }, + { assert snapshot(path("$outputDir/samtools/stats/").list()).match("samtools/stats/") }, + { assert new File("$outputDir/taxpasta/bracken_db1.tsv").exists() }, + { assert new File("$outputDir/taxpasta/centrifuge_db3.tsv").exists() }, + { assert new File("$outputDir/taxpasta/diamond_db1.tsv").exists() }, + { assert new File("$outputDir/taxpasta/kaiju_db5.tsv").exists() }, + { assert new File("$outputDir/taxpasta/kraken2_db1.tsv").exists() }, + { assert new File("$outputDir/taxpasta/kraken2_db2.tsv").exists() }, + { assert new File("$outputDir/taxpasta/metaphlan_db4.tsv").exists() } + ) + } + + } + +} diff --git a/tests/old/test_with_complexityfilter_prinseqpluslplus.nf.test.snap.old b/tests/old/test_with_complexityfilter_prinseqpluslplus.nf.test.snap.old new file mode 100644 index 00000000..645192a0 --- /dev/null +++ b/tests/old/test_with_complexityfilter_prinseqpluslplus.nf.test.snap.old @@ -0,0 +1,114 @@ +{ + "filtlong": { + "content": [ + "ERR3201952_ERR3201952_filtered.log:md5,513650c6b058af60a824f98e6a632e2d" + ], + "timestamp": "2023-06-20T03:28:37+0000" + }, + "metaphlan3": { + "content": [ + "metaphlan3_db4_combined_reports.txt:md5,c73796201f8b1874a75abb05bd9c2c5f" + ], + "timestamp": "2023-06-20T03:28:37+0000" + }, + "software_versions": { + "content": [ + "{BOWTIE2_ALIGN={bowtie2=2.4.4, pigz=2.6, samtools=1.16.1}, BOWTIE2_BUILD={bowtie2=2.4.4}, BRACKEN_BRACKEN={bracken=2.7}, CENTRIFUGE_CENTRIFUGE={centrifuge=1.0.4}, CUSTOM_DUMPSOFTWAREVERSIONS={python=3.11.0, yaml=6.0}, DIAMOND_BLASTX={diamond=2.0.15}, FASTP_PAIRED={fastp=0.23.2}, FASTP_SINGLE={fastp=0.23.2}, FASTQC={fastqc=0.11.9}, FASTQC_PROCESSED={fastqc=0.11.9}, FILTLONG={filtlong=0.2.1}, KAIJU_KAIJU={kaiju=1.8.2}, KAIJU_KAIJU2KRONA={kaiju=1.8.2}, KAIJU_KAIJU2TABLE_COMBINED={kaiju=1.8.2}, KAIJU_KAIJU2TABLE_SINGLE={kaiju=1.8.2}, KRAKEN2_KRAKEN2={kraken2=2.1.2, pigz=2.6}, KRAKENTOOLS_COMBINEKREPORTS_CENTRIFUGE={combine_kreports.py=1.2}, KRAKENTOOLS_COMBINEKREPORTS_KRAKEN={combine_kreports.py=1.2}, KRAKENTOOLS_KREPORT2KRONA={kreport2krona.py=1.2}, KRONA_CLEANUP={sed=4.7}, KRONA_KTIMPORTTEXT={krona=2.8.1}, MERGE_RUNS={cat=8.30}, METAPHLAN3_MERGEMETAPHLANTABLES={metaphlan3=3.0.12}, METAPHLAN3_METAPHLAN3={metaphlan3=3.0.12}, MINIMAP2_ALIGN={minimap2=2.24-r1122}, MINIMAP2_INDEX={minimap2=2.24-r1122}, PORECHOP_PORECHOP={porechop=0.2.4}, PRINSEQPLUSPLUS={prinseqplusplus=1.2}, SAMPLESHEET_CHECK={python=3.8.3}, SAMTOOLS_FASTQ={samtools=1.16.1}, SAMTOOLS_INDEX={samtools=1.16.1}, SAMTOOLS_STATS={samtools=1.16.1}, SAMTOOLS_VIEW={samtools=1.16.1}, UNTAR={untar=1.30}, Workflow={nf-core/taxprofiler=1.1.0dev}}" + ], + "timestamp": "2023-06-20T03:28:37+0000" + }, + "porechop": { + "content": [ + "ERR3201952_ERR3201952.log.filtered:md5,92a485cb081b6e40e1bc3360e73f69a9" + ], + "timestamp": "2023-06-20T03:28:37+0000" + }, + "taxpasta": { + "content": [ + "bracken_db1.tsv:md5,7b08da8d785d1938a5ee054c5db9bf97", + "centrifuge_db3.tsv:md5,82a06a277a398c3d413400c4e0ab76aa", + "diamond_db1.tsv:md5,c9caeea7bf35f28178718d5c752bc63f", + "kaiju_db5.tsv:md5,d0fee4fe21d127feb3da25635e8e28f3", + "kraken2_db1.tsv:md5,9ccb53850cec6b64df019be8a3d64755", + "kraken2_db2.tsv:md5,293b995af65ed91f5e7bd9073a6de84b", + "metaphlan_db4.tsv:md5,e1c908b5c7dfa42c7e405f4e20802ab1" + ], + "timestamp": "2023-06-20T03:28:37+0000" + }, + "bracken": { + "content": [ + "bracken_db1_combined_reports.txt:md5,9435227d5ac9d7ee78dbb7e1ff3348ce" + ], + "timestamp": "2023-06-20T03:28:37+0000" + }, + "diamond": { + "content": [ + "2611_se_db1.diamond.tsv:md5,4d3baec82aeed53c6fa8803171edd212", + "2612_se_db1.diamond.tsv:md5,65254add18c57945ce0e81747415c82a", + "2613_se_db1.diamond.tsv:md5,6f2baa670c91c5003f94449fc2861bb3", + "ERR3201952_se_db1.diamond.tsv:md5,3c3d1a901abe0a097469423d217c13db" + ], + "timestamp": "2023-06-20T03:28:37+0000" + }, + "kraken2": { + "content": [ + "kraken2_db1_combined_reports.txt:md5,208014d194c6dd57d1aa4455b162d439", + "kraken2_db2_combined_reports.txt:md5,5fa6850e00dc47829c634128c90f1bb2" + ], + "timestamp": "2023-06-20T03:28:37+0000" + }, + "centrifuge": { + "content": [ + "centrifuge_db3_combined_reports.txt:md5,5d64a6ba245b269d2c501d614ac302f6" + ], + "timestamp": "2023-06-20T03:28:37+0000" + }, + "prinseqplusplus": { + "content": [ + "2612_ERR5766176.log:md5,8769bf40103386cc4b44d37ec4d65ff3", + "2612_ERR5766176_B.log:md5,8769bf40103386cc4b44d37ec4d65ff3", + "2612_ERR5766180.log:md5,711e2ebaaad829125a167964708d0d40", + "2613_ERR5766181.log:md5,2b1aa5958166f287ba7578712c1424a4" + ], + "timestamp": "2023-06-20T03:28:37+0000" + }, + "multiqc": { + "content": [ + "filtlong.txt:md5,69cd258c3883ba2acfb1b72cf3b743de", + "multiqc_bowtie2.txt:md5,36ee313c5889c536cb1120239fcb7c00", + "multiqc_fastp.txt:md5,d755cf8d8b9bb535ce10bacbc06b60a5", + "multiqc_fastqc_1.txt:md5,c3a7e1a86e753f246c1b99574e4dec37", + "multiqc_samtools_stats.txt:md5,e5535c69cefdcd574d61fb008df50be5", + "porechop.txt:md5,5cadfceb7d9bc6b4da7bbb981a90d8ed" + ], + "timestamp": "2023-06-20T03:28:37+0000" + }, + "bowtie2/align/": { + "content": [ + "2612_ERR5766176.bowtie2.log:md5,d7d0f8e3ba259a642edb67578a7b8596", + "2612_ERR5766176_B.bowtie2.log:md5,d7d0f8e3ba259a642edb67578a7b8596", + "2612_ERR5766180.bowtie2.log:md5,ad8b28d71de796acb0090e66218dc4c6", + "2613_ERR5766181.bowtie2.log:md5,59573fec0a20156f2b71bf3d7f83becf" + ], + "timestamp": "2023-06-20T03:28:37+0000" + }, + "samtools/stats/": { + "content": [ + "2612_ERR5766176.stats:md5,4047bf414ded3d6a01f5b3d4f651435d", + "2612_ERR5766176_B.stats:md5,cabac00e2c38e637d6f2e1605e004862", + "2612_ERR5766180.stats:md5,6cb73a1c2b7ec4c03bbea801b8180544", + "2613_ERR5766181.stats:md5,a571b049e70bbe22850c6a745d50abf0", + "ERR3201952_ERR3201952.stats:md5,06a195adabd47f0d5eec9b15558a47cd" + ], + "timestamp": "2023-06-20T03:28:37+0000" + }, + "fastp": { + "content": [ + "2612_ERR5766176_B.fastp.json:md5,11ab617fa60858c5ff252a036db1787b", + "2612_ERR5766176.fastp.json:md5,78cfc49753d310c0b66f736f285f0533", + "2612_ERR5766180.fastp.json:md5,c47589fcbc4e0db8d9f98269fa6b1986", + "2613_ERR5766181.fastp.json:md5,5d967bbc748347f8ceff03b1fb1659a6" + ], + "timestamp": "2023-06-20T03:28:37+0000" + } +} \ No newline at end of file diff --git a/tests/old/test_with_preprocessingqc_falco.nf.test.old b/tests/old/test_with_preprocessingqc_falco.nf.test.old new file mode 100644 index 00000000..0d54d3ff --- /dev/null +++ b/tests/old/test_with_preprocessingqc_falco.nf.test.old @@ -0,0 +1,74 @@ +nextflow_pipeline { + + name "Test Workflow main.nf" + script "main.nf" + tag "test" + tag "test_falco" + tag "pipeline" + + test("Pre-Processing QC Tool - Falco") { + + when { + params { + outdir = "$outputDir" + preprocessing_qc_tool = "falco" + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot(UTILS.removeNextflowVersion("$outputDir")).match("software_versions") }, + { assert new File("$outputDir/bbduk/2612_ERR5766176_B.bbduk.log").exists() }, + { assert new File("$outputDir/bbduk/2612_ERR5766176.bbduk.log").exists() }, + { assert new File("$outputDir/bbduk/2612_ERR5766180.bbduk.log").exists() }, + { assert new File("$outputDir/bbduk/2613_ERR5766181.bbduk.log").exists() }, + { assert snapshot(path("$outputDir/bowtie2/align/").list()).match("bowtie2/align/") }, + { assert snapshot(path("$outputDir/bracken/bracken_db1_combined_reports.txt")).match("bracken") }, + { assert snapshot(path("$outputDir/centrifuge/centrifuge_db3_combined_reports.txt")).match("centrifuge") }, + { assert new File("$outputDir/diamond/db1/2611_se_db1.diamond.tsv").exists() }, + { assert new File("$outputDir/diamond/db1/2612_se_db1.diamond.tsv").exists() }, + { assert new File("$outputDir/diamond/db1/2613_se_db1.diamond.tsv").exists() }, + { assert new File("$outputDir/diamond/db1/ERR3201952_se_db1.diamond.tsv").exists() }, + { assert snapshot(path("$outputDir/falco/processed/2612_ERR5766176_B_processed_falco_summary.txt"), + path("$outputDir/falco/processed/2612_ERR5766176_processed_falco_summary.txt"), + path("$outputDir/falco/processed/2612_ERR5766180_processed_falco_summary.txt"), + path("$outputDir/falco/processed/2613_ERR5766181_processed_falco_summary.txt"), + path("$outputDir/falco/processed/ERR3201952_ERR3201952_processed_falco_summary.txt"), + path("$outputDir/falco/raw/2612_ERR5766180_raw_falco_summary.txt"), + path("$outputDir/falco/raw/ERR3201952_ERR3201952_raw_falco_summary.txt")).match("falco") }, + { assert snapshot(path("$outputDir/fastp/2612_ERR5766176_B.fastp.json"), + path("$outputDir/fastp/2612_ERR5766176.fastp.json"), + path("$outputDir/fastp/2612_ERR5766180.fastp.json"), + path("$outputDir/fastp/2613_ERR5766181.fastp.json")).match("fastp") }, + { assert snapshot(path("$outputDir/filtlong/").list()).match("filtlong") }, + { assert new File("$outputDir/kaiju/kaiju_db5_combined_reports.txt").exists() }, + { assert snapshot(path("$outputDir/kraken2/kraken2_db1_combined_reports.txt"), + path("$outputDir/kraken2/kraken2_db2_combined_reports.txt")).match("kraken2") }, + { assert new File("$outputDir/krona/centrifuge_db3.html").exists() }, + { assert new File("$outputDir/krona/kaiju_db5.html").exists() }, + { assert new File("$outputDir/krona/kraken2_db1.html").exists() }, + { assert new File("$outputDir/krona/kraken2_db2.html").exists() }, + { assert new File("$outputDir/metaphlan3/metaphlan3_db4_combined_reports.txt").exists() }, + { assert snapshot(path("$outputDir/multiqc/multiqc_data/bbduk.txt"), + path("$outputDir/multiqc/multiqc_data/filtlong.txt"), + path("$outputDir/multiqc/multiqc_data/multiqc_bowtie2.txt"), + path("$outputDir/multiqc/multiqc_data/multiqc_fastp.txt"), + path("$outputDir/multiqc/multiqc_data/multiqc_fastqc_1.txt"), + path("$outputDir/multiqc/multiqc_data/multiqc_samtools_stats.txt"), + path("$outputDir/multiqc/multiqc_data/porechop.txt")).match("multiqc") }, + { assert snapshot(UTILS.filterLines("$outputDir/porechop/ERR3201952_ERR3201952.log", -3)).match("porechop") }, + { assert snapshot(path("$outputDir/samtools/stats/").list()).match("samtools/stats/") }, + { assert new File("$outputDir/taxpasta/bracken_db1.tsv").exists() }, + { assert new File("$outputDir/taxpasta/centrifuge_db3.tsv").exists() }, + { assert new File("$outputDir/taxpasta/diamond_db1.tsv").exists() }, + { assert new File("$outputDir/taxpasta/kaiju_db5.tsv").exists() }, + { assert new File("$outputDir/taxpasta/kraken2_db1.tsv").exists() }, + { assert new File("$outputDir/taxpasta/kraken2_db2.tsv").exists() }, + { assert new File("$outputDir/taxpasta/metaphlan_db4.tsv").exists() } + ) + } + + } + +} diff --git a/tests/old/test_with_preprocessingqc_falco.nf.test.snap.old b/tests/old/test_with_preprocessingqc_falco.nf.test.snap.old new file mode 100644 index 00000000..f2dc5cd5 --- /dev/null +++ b/tests/old/test_with_preprocessingqc_falco.nf.test.snap.old @@ -0,0 +1,118 @@ +{ + "filtlong": { + "content": [ + "ERR3201952_ERR3201952_filtered.log:md5,513650c6b058af60a824f98e6a632e2d" + ], + "timestamp": "2023-06-20T03:45:37+0000" + }, + "metaphlan3": { + "content": [ + "metaphlan3_db4_combined_reports.txt:md5,c73796201f8b1874a75abb05bd9c2c5f" + ], + "timestamp": "2023-06-20T03:45:37+0000" + }, + "software_versions": { + "content": [ + "{BBMAP_BBDUK={bbmap=39.01}, BOWTIE2_ALIGN={bowtie2=2.4.4, pigz=2.6, samtools=1.16.1}, BOWTIE2_BUILD={bowtie2=2.4.4}, BRACKEN_BRACKEN={bracken=2.7}, CENTRIFUGE_CENTRIFUGE={centrifuge=1.0.4}, CUSTOM_DUMPSOFTWAREVERSIONS={python=3.11.0, yaml=6.0}, DIAMOND_BLASTX={diamond=2.0.15}, FALCO={falco=1.2.1}, FALCO_PROCESSED={falco=1.2.1}, FASTP_PAIRED={fastp=0.23.2}, FASTP_SINGLE={fastp=0.23.2}, FILTLONG={filtlong=0.2.1}, KAIJU_KAIJU={kaiju=1.8.2}, KAIJU_KAIJU2KRONA={kaiju=1.8.2}, KAIJU_KAIJU2TABLE_COMBINED={kaiju=1.8.2}, KAIJU_KAIJU2TABLE_SINGLE={kaiju=1.8.2}, KRAKEN2_KRAKEN2={kraken2=2.1.2, pigz=2.6}, KRAKENTOOLS_COMBINEKREPORTS_CENTRIFUGE={combine_kreports.py=1.2}, KRAKENTOOLS_COMBINEKREPORTS_KRAKEN={combine_kreports.py=1.2}, KRAKENTOOLS_KREPORT2KRONA={kreport2krona.py=1.2}, KRONA_CLEANUP={sed=4.7}, KRONA_KTIMPORTTEXT={krona=2.8.1}, MERGE_RUNS={cat=8.30}, METAPHLAN3_MERGEMETAPHLANTABLES={metaphlan3=3.0.12}, METAPHLAN3_METAPHLAN3={metaphlan3=3.0.12}, MINIMAP2_ALIGN={minimap2=2.24-r1122}, MINIMAP2_INDEX={minimap2=2.24-r1122}, PORECHOP_PORECHOP={porechop=0.2.4}, SAMPLESHEET_CHECK={python=3.8.3}, SAMTOOLS_FASTQ={samtools=1.16.1}, SAMTOOLS_INDEX={samtools=1.16.1}, SAMTOOLS_STATS={samtools=1.16.1}, SAMTOOLS_VIEW={samtools=1.16.1}, UNTAR={untar=1.30}, Workflow={nf-core/taxprofiler=1.1.0dev}}" + ], + "timestamp": "2023-06-20T03:45:37+0000" + }, + "porechop": { + "content": [ + "ERR3201952_ERR3201952.log.filtered:md5,92a485cb081b6e40e1bc3360e73f69a9" + ], + "timestamp": "2023-06-20T03:45:37+0000" + }, + "taxpasta": { + "content": [ + "bracken_db1.tsv:md5,7b08da8d785d1938a5ee054c5db9bf97", + "centrifuge_db3.tsv:md5,82a06a277a398c3d413400c4e0ab76aa", + "diamond_db1.tsv:md5,dbc778f00d049fc7bbe5cf71f2ab93a9", + "kaiju_db5.tsv:md5,be303f14714e434965934f1ad9fe26d6", + "kraken2_db1.tsv:md5,03acc20258442773a56a956f71abc522", + "kraken2_db2.tsv:md5,68c3b521ffd45c0e715b8bdceaa30d7b", + "metaphlan_db4.tsv:md5,e1c908b5c7dfa42c7e405f4e20802ab1" + ], + "timestamp": "2023-06-20T03:45:37+0000" + }, + "bracken": { + "content": [ + "bracken_db1_combined_reports.txt:md5,9435227d5ac9d7ee78dbb7e1ff3348ce" + ], + "timestamp": "2023-06-20T03:45:37+0000" + }, + "diamond": { + "content": [ + "2611_se_db1.diamond.tsv:md5,4d3baec82aeed53c6fa8803171edd212", + "2612_se_db1.diamond.tsv:md5,0b74642f6dd51494ebd8072793859fb0", + "2613_se_db1.diamond.tsv:md5,8df4ab09acf4c0bf9b4211d5635d81fb", + "ERR3201952_se_db1.diamond.tsv:md5,3c3d1a901abe0a097469423d217c13db" + ], + "timestamp": "2023-06-20T03:45:37+0000" + }, + "kraken2": { + "content": [ + "kraken2_db1_combined_reports.txt:md5,56ed99df608e7a0e1bbfe8a8d9468a8f", + "kraken2_db2_combined_reports.txt:md5,60db761c6e9d995d185704196db8f6f7" + ], + "timestamp": "2023-06-20T03:45:37+0000" + }, + "centrifuge": { + "content": [ + "centrifuge_db3_combined_reports.txt:md5,5d64a6ba245b269d2c501d614ac302f6" + ], + "timestamp": "2023-06-20T03:45:37+0000" + }, + "falco": { + "content": [ + "2612_ERR5766176_B_processed_falco_summary.txt:md5,7c268f2f523e64de04f11d32352039d4", + "2612_ERR5766176_processed_falco_summary.txt:md5,8c4e5c7bd2ab9c1df4b8429d3588e347", + "2612_ERR5766180_processed_falco_summary.txt:md5,575099ea75f1bef325f31e270e7e1100", + "2613_ERR5766181_processed_falco_summary.txt:md5,7a6b8ee0af81ef623b4d9d5c73c5c225", + "ERR3201952_ERR3201952_processed_falco_summary.txt:md5,e079ab37851ee8e8f5fb989a6d6cc2c9", + "2612_ERR5766180_raw_falco_summary.txt:md5,4de575c00d5554a12e6eb9d4345c0ae5", + "ERR3201952_ERR3201952_raw_falco_summary.txt:md5,18cc66de2719cfe2c0d092aa51ac41c9" + ], + "timestamp": "2023-06-20T03:45:37+0000" + }, + "multiqc": { + "content": [ + "bbduk.txt:md5,d609874f85386aeee5241cf7cbedee99", + "filtlong.txt:md5,69cd258c3883ba2acfb1b72cf3b743de", + "multiqc_bowtie2.txt:md5,554215fc040f48daec70cd89c39daa77", + "multiqc_fastp.txt:md5,d755cf8d8b9bb535ce10bacbc06b60a5", + "multiqc_fastqc_1.txt:md5,27be3dc0f9218fa1961d0cfcd7d3b7ae", + "multiqc_samtools_stats.txt:md5,8083ccec64e3a46b7cea712e8f734ac0", + "porechop.txt:md5,5cadfceb7d9bc6b4da7bbb981a90d8ed" + ], + "timestamp": "2023-06-20T03:45:37+0000" + }, + "bowtie2/align/": { + "content": [ + "2612_ERR5766176.bowtie2.log:md5,9ecf931cf545c9f4777dd4586dd883d2", + "2612_ERR5766176_B.bowtie2.log:md5,9ecf931cf545c9f4777dd4586dd883d2", + "2612_ERR5766180.bowtie2.log:md5,a7487ce9c549a7f8fb5694fd0889f929", + "2613_ERR5766181.bowtie2.log:md5,6cb148fdf3840de7a8a1f5315847817b" + ], + "timestamp": "2023-06-20T03:45:37+0000" + }, + "samtools/stats/": { + "content": [ + "2612_ERR5766176.stats:md5,22c22b8550ae64ca1bd84a3b5426258f", + "2612_ERR5766176_B.stats:md5,62424e4e81a1cb1efebeeb32fe393473", + "2612_ERR5766180.stats:md5,c8e54671319515471f1738105c661c19", + "2613_ERR5766181.stats:md5,a6734b56f0d0c7389c9a4972b0733d19", + "ERR3201952_ERR3201952.stats:md5,06a195adabd47f0d5eec9b15558a47cd" + ], + "timestamp": "2023-06-20T03:45:37+0000" + }, + "fastp": { + "content": [ + "2612_ERR5766176_B.fastp.json:md5,11ab617fa60858c5ff252a036db1787b", + "2612_ERR5766176.fastp.json:md5,78cfc49753d310c0b66f736f285f0533", + "2612_ERR5766180.fastp.json:md5,c47589fcbc4e0db8d9f98269fa6b1986", + "2613_ERR5766181.fastp.json:md5,5d967bbc748347f8ceff03b1fb1659a6" + ], + "timestamp": "2023-06-20T03:45:37+0000" + } +} \ No newline at end of file diff --git a/tests/old/test_with_shortreadqc_adapterremoval.nf.test.old b/tests/old/test_with_shortreadqc_adapterremoval.nf.test.old new file mode 100644 index 00000000..b5bf40e4 --- /dev/null +++ b/tests/old/test_with_shortreadqc_adapterremoval.nf.test.old @@ -0,0 +1,66 @@ +nextflow_pipeline { + + name "Test Workflow main.nf" + script "main.nf" + tag "test" + tag "test_adapterremoval" + tag "pipeline" + + test("Short Read QC Tool - Adapter Removal") { + + when { + params { + outdir = "$outputDir" + shortread_qc_tool = "adapterremoval" + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot(UTILS.removeNextflowVersion("$outputDir")).match("software_versions") }, + { assert new File("$outputDir/bbduk/2612_ERR5766176_B.bbduk.log").exists() }, + { assert new File("$outputDir/bbduk/2612_ERR5766176.bbduk.log").exists() }, + { assert new File("$outputDir/bbduk/2612_ERR5766180.bbduk.log").exists() }, + { assert new File("$outputDir/bbduk/2613_ERR5766181.bbduk.log").exists() }, + { assert new File("$outputDir/bowtie2/align/2612_ERR5766176.bowtie2.log").exists() }, + { assert new File("$outputDir/bowtie2/align/2612_ERR5766176_B.bowtie2.log").exists() }, + { assert new File("$outputDir/bowtie2/align/2612_ERR5766180.bowtie2.log").exists() }, + { assert new File("$outputDir/bowtie2/align/2613_ERR5766181.bowtie2.log").exists() }, + { assert snapshot(path("$outputDir/bracken/bracken_db1_combined_reports.txt")).match("bracken") }, + { assert snapshot(path("$outputDir/centrifuge/centrifuge_db3_combined_reports.txt")).match("centrifuge") }, + { assert new File("$outputDir/diamond/db1/2611_se_db1.diamond.tsv").exists() }, + { assert new File("$outputDir/diamond/db1/2612_se_db1.diamond.tsv").exists() }, + { assert new File("$outputDir/diamond/db1/2613_se_db1.diamond.tsv").exists() }, + { assert new File("$outputDir/diamond/db1/ERR3201952_se_db1.diamond.tsv").exists() }, + { assert snapshot(path("$outputDir/adapterremoval/").list()).match("adapterremoval") }, + { assert snapshot(path("$outputDir/filtlong/").list()).match("filtlong") }, + { assert new File("$outputDir/kaiju/kaiju_db5_combined_reports.txt").exists() }, + { assert new File("$outputDir/kraken2/kraken2_db1_combined_reports.txt").exists() }, + { assert new File("$outputDir/kraken2/kraken2_db2_combined_reports.txt").exists() }, + { assert new File("$outputDir/krona/centrifuge_db3.html").exists() }, + { assert new File("$outputDir/krona/kaiju_db5.html").exists() }, + { assert new File("$outputDir/krona/kraken2_db1.html").exists() }, + { assert new File("$outputDir/krona/kraken2_db2.html").exists() }, + { assert new File("$outputDir/metaphlan3/metaphlan3_db4_combined_reports.txt").exists() }, + { assert snapshot(path("$outputDir/multiqc/multiqc_data/filtlong.txt"), + path("$outputDir/multiqc/multiqc_data/porechop.txt")).match("multiqc") }, + { assert snapshot(UTILS.filterLines("$outputDir/porechop/ERR3201952_ERR3201952.log", -3)).match("porechop") }, + { assert new File("$outputDir/samtools/stats/2612_ERR5766176.stats").exists() }, + { assert new File("$outputDir/samtools/stats/2612_ERR5766176_B.stats").exists() }, + { assert new File("$outputDir/samtools/stats/2612_ERR5766180.stats").exists() }, + { assert new File("$outputDir/samtools/stats/2613_ERR5766181.stats").exists() }, + { assert new File("$outputDir/samtools/stats/ERR3201952_ERR3201952.stats").exists() }, + { assert new File("$outputDir/taxpasta/bracken_db1.tsv").exists() }, + { assert new File("$outputDir/taxpasta/centrifuge_db3.tsv").exists() }, + { assert new File("$outputDir/taxpasta/diamond_db1.tsv").exists() }, + { assert new File("$outputDir/taxpasta/kaiju_db5.tsv").exists() }, + { assert new File("$outputDir/taxpasta/kraken2_db1.tsv").exists() }, + { assert new File("$outputDir/taxpasta/kraken2_db2.tsv").exists() }, + { assert new File("$outputDir/taxpasta/metaphlan_db4.tsv").exists() } + ) + } + + } + +} diff --git a/tests/old/test_with_shortreadqc_adapterremoval.nf.test.snap.old b/tests/old/test_with_shortreadqc_adapterremoval.nf.test.snap.old new file mode 100644 index 00000000..09577fbe --- /dev/null +++ b/tests/old/test_with_shortreadqc_adapterremoval.nf.test.snap.old @@ -0,0 +1,75 @@ +{ + "filtlong": { + "content": [ + "ERR3201952_ERR3201952_filtered.log:md5,513650c6b058af60a824f98e6a632e2d" + ], + "timestamp": "2023-06-21T14:02:00+0000" + }, + "metaphlan3": { + "content": [ + "metaphlan3_db4_combined_reports.txt:md5,ceb88c02370a2c3bccdd3ff4ee7c23a9" + ], + "timestamp": "2023-06-21T14:02:00+0000" + }, + "software_versions": { + "content": [ + "{ADAPTERREMOVAL_PAIRED={adapterremoval=2.3.2}, ADAPTERREMOVAL_SINGLE={adapterremoval=2.3.2}, BBMAP_BBDUK={bbmap=39.01}, BOWTIE2_ALIGN={bowtie2=2.4.4, pigz=2.6, samtools=1.16.1}, BOWTIE2_BUILD={bowtie2=2.4.4}, BRACKEN_BRACKEN={bracken=2.7}, CENTRIFUGE_CENTRIFUGE={centrifuge=1.0.4}, CUSTOM_DUMPSOFTWAREVERSIONS={python=3.11.0, yaml=6.0}, DIAMOND_BLASTX={diamond=2.0.15}, FASTQC={fastqc=0.11.9}, FASTQC_PROCESSED={fastqc=0.11.9}, FILTLONG={filtlong=0.2.1}, KAIJU_KAIJU={kaiju=1.8.2}, KAIJU_KAIJU2KRONA={kaiju=1.8.2}, KAIJU_KAIJU2TABLE_COMBINED={kaiju=1.8.2}, KAIJU_KAIJU2TABLE_SINGLE={kaiju=1.8.2}, KRAKEN2_KRAKEN2={kraken2=2.1.2, pigz=2.6}, KRAKENTOOLS_COMBINEKREPORTS_CENTRIFUGE={combine_kreports.py=1.2}, KRAKENTOOLS_COMBINEKREPORTS_KRAKEN={combine_kreports.py=1.2}, KRAKENTOOLS_KREPORT2KRONA={kreport2krona.py=1.2}, KRONA_CLEANUP={sed=4.7}, KRONA_KTIMPORTTEXT={krona=2.8.1}, MERGE_RUNS={cat=8.30}, METAPHLAN3_MERGEMETAPHLANTABLES={metaphlan3=3.0.12}, METAPHLAN3_METAPHLAN3={metaphlan3=3.0.12}, MINIMAP2_ALIGN={minimap2=2.24-r1122}, MINIMAP2_INDEX={minimap2=2.24-r1122}, PORECHOP_PORECHOP={porechop=0.2.4}, SAMPLESHEET_CHECK={python=3.8.3}, SAMTOOLS_FASTQ={samtools=1.16.1}, SAMTOOLS_INDEX={samtools=1.16.1}, SAMTOOLS_STATS={samtools=1.16.1}, SAMTOOLS_VIEW={samtools=1.16.1}, UNTAR={untar=1.30}, Workflow={nf-core/taxprofiler=1.1.0dev}}" + ], + "timestamp": "2023-06-21T14:02:00+0000" + }, + "porechop": { + "content": [ + "ERR3201952_ERR3201952.log.filtered:md5,92a485cb081b6e40e1bc3360e73f69a9" + ], + "timestamp": "2023-06-21T14:02:00+0000" + }, + "taxpasta": { + "content": [ + "bracken_db1.tsv:md5,3b34e55c670b94b6382ea45dad46c0a4", + "centrifuge_db3.tsv:md5,e863ece410193be03940cd6e106071a3", + "diamond_db1.tsv:md5,955ebd2d69aa8f19c04873c41e58aeaf", + "kaiju_db5.tsv:md5,1b1f70c369e3decc7947de9be4164aa9", + "kraken2_db1.tsv:md5,881953e5a67956a2323950d5e3f4af4d", + "kraken2_db2.tsv:md5,1ebecba3015143b8905168f72d88a4ff", + "metaphlan_db4.tsv:md5,2e19ca1dd3904d18a53637d173ff9017" + ], + "timestamp": "2023-06-21T14:02:00+0000" + }, + "adapterremoval": { + "content": [ + "2612_ERR5766176.settings:md5,e9f2de44ca1711aa609d0fd943f4b29f", + "2612_ERR5766176_B.settings:md5,e9f2de44ca1711aa609d0fd943f4b29f", + "2612_ERR5766180.settings:md5,1cc7909f9f70d185850780ae9a116803", + "2613_ERR5766181.settings:md5,e3ec2f6c633a43bca4470aa7bd19a156" + ], + "timestamp": "2023-06-21T14:02:00+0000" + }, + "bracken": { + "content": [ + "bracken_db1_combined_reports.txt:md5,e31134c567abcffa7b2c4b19f73d5dea" + ], + "timestamp": "2023-06-21T14:02:00+0000" + }, + "diamond": { + "content": [ + "2611_se_db1.diamond.tsv:md5,4d3baec82aeed53c6fa8803171edd212", + "2612_se_db1.diamond.tsv:md5,f71d9b71b3f3c9261c6fb40383964013", + "2613_se_db1.diamond.tsv:md5,575f69334dbd4d49b05ae74058d80f35", + "ERR3201952_se_db1.diamond.tsv:md5,3c3d1a901abe0a097469423d217c13db" + ], + "timestamp": "2023-06-21T14:02:00+0000" + }, + "centrifuge": { + "content": [ + "centrifuge_db3_combined_reports.txt:md5,5d64a6ba245b269d2c501d614ac302f6" + ], + "timestamp": "2023-06-21T14:02:00+0000" + }, + "multiqc": { + "content": [ + "filtlong.txt:md5,69cd258c3883ba2acfb1b72cf3b743de", + "porechop.txt:md5,5cadfceb7d9bc6b4da7bbb981a90d8ed" + ], + "timestamp": "2023-06-21T14:02:00+0000" + } +} \ No newline at end of file diff --git a/tests/tags.yml b/tests/tags.yml new file mode 100644 index 00000000..e69de29b diff --git a/tests/test_nothing.nf.test b/tests/test_nothing.nf.test new file mode 100644 index 00000000..7dd81852 --- /dev/null +++ b/tests/test_nothing.nf.test @@ -0,0 +1,28 @@ +nextflow_pipeline { + + name "Test pipeline: NFCORE_TAXPROFILER" + script "main.nf" + tag "pipeline" + tag "nfcore_taxprofiler" + tag "nfcore_taxprofiler_test_nothing" + tag "test_nothing" + + test("nf-core/taxprofiler test_nothing profile") { + when { + params { + outdir = "$outputDir" + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot( + file("${params.outdir}/fastqc").listFiles().exists, + file("${params.outdir}/multiqc").listFiles().exists, + ).match() + } + ) + } + } +} diff --git a/tests/test_nothing.nf.test.snap b/tests/test_nothing.nf.test.snap new file mode 100644 index 00000000..0c0e7303 --- /dev/null +++ b/tests/test_nothing.nf.test.snap @@ -0,0 +1,99 @@ +{ + "nf-core/taxprofiler test_nothing profile": { + "content": [ + [ + [ + [ + "2612_ERR5766176_B_raw_1_fastqc.html:md5,22c25a2cb921172db84a7b86cc125b04", + "2612_ERR5766176_B_raw_1_fastqc.zip:md5,b8b47d68603cb13cab569f4497dfc11e", + "2612_ERR5766176_B_raw_2_fastqc.html:md5,49c94b6be3881278c943dcf8b2fb348f", + "2612_ERR5766176_B_raw_2_fastqc.zip:md5,b3de30c18440c9f079037ee75e1eefbe", + "2612_ERR5766176_raw_1_fastqc.html:md5,aeadc849f7871335c731172951de743f", + "2612_ERR5766176_raw_1_fastqc.zip:md5,7103d51310f0eb1af777aa8794d4dbcd", + "2612_ERR5766176_raw_2_fastqc.html:md5,ae9510a231479a459162ba2c43487a56", + "2612_ERR5766176_raw_2_fastqc.zip:md5,a53c752eb7b9fd963b195b30ff4d8147", + "2612_ERR5766180_raw_fastqc.html:md5,579396567aa78671d5038f6bb6f7cbba", + "2612_ERR5766180_raw_fastqc.zip:md5,40051d62da8e8e167b4495781914ea85", + "2613_ERR5766181_raw_1_fastqc.html:md5,7164c1f3d4db16c85bc98f6960f6f731", + "2613_ERR5766181_raw_1_fastqc.zip:md5,a9253a70e136ac0bf1ee352d9f777eaa", + "2613_ERR5766181_raw_2_fastqc.html:md5,c413fa16d6226aeeb8e11b49a0a036b9", + "2613_ERR5766181_raw_2_fastqc.zip:md5,eea822bcf1f73387a7ec49a8890772bc", + "ERR3201952_ERR3201952_raw_fastqc.html:md5,b1756e66fd863ee606a8c91d439f8775", + "ERR3201952_ERR3201952_raw_fastqc.zip:md5,7a8e4d6101d38b45b360308786c300fb" + ] + ], + [ + [ + "mqc_fastqc_adapter_content_plot_1.txt:md5,03fcfd4ace824968a095e82a042ec82d", + "mqc_fastqc_overrepresented_sequences_plot_1.txt:md5,c8f294c7217e2e54117bce92b423ad2a", + "mqc_fastqc_per_base_n_content_plot_1.txt:md5,1f78a15290cce751b9d1c76310fb9987", + "mqc_fastqc_per_base_sequence_quality_plot_1.txt:md5,c1876d03c7d0643f6a8d9bc14853cbc4", + "mqc_fastqc_per_sequence_gc_content_plot_Counts.txt:md5,1b8ee374b085e3e2a423e90d7c49d61c", + "mqc_fastqc_per_sequence_gc_content_plot_Percentages.txt:md5,561610c73e18af864207d5938395c095", + "mqc_fastqc_per_sequence_quality_scores_plot_1.txt:md5,e60e51c43c71ddc2e1221680723839e8", + "mqc_fastqc_sequence_counts_plot_1.txt:md5,004796a97685bdeb02292be79e090673", + "mqc_fastqc_sequence_duplication_levels_plot_1.txt:md5,71002c0f9191ea67ed9d245b308c0f04", + "mqc_fastqc_sequence_length_distribution_plot_1.txt:md5,2e33e514ed41a7566fd8af34cfe49334", + "multiqc.log:md5,543a8c1ccfe2218d11d138fab94ee70f", + "multiqc_citations.txt:md5,4c806e63a283ec1b7e78cdae3a923d4f", + "multiqc_data.json:md5,4b3a3f505f4b7a435788fa24cabea03d", + "multiqc_fastqc.txt:md5,4e145ddc71fb1b37b62df907fa452200", + "multiqc_general_stats.txt:md5,2ff3830e0098393fc60d2e9292e2ac66", + "multiqc_software_versions.txt:md5,a8c72f50c3dbc98152e15bcba21dbf7f", + "multiqc_sources.txt:md5,170f76bce159e4f5a47e586fcf934f22" + ], + [ + [ + "mqc_fastqc_adapter_content_plot_1.pdf:md5,92061915b9c94eafb383fb62bcf53d67", + "mqc_fastqc_overrepresented_sequences_plot_1.pdf:md5,f099c363d18f8495ab24e6106a13f95d", + "mqc_fastqc_per_base_n_content_plot_1.pdf:md5,7a2ed304e10fe60e0d2c003cb3695d22", + "mqc_fastqc_per_base_sequence_quality_plot_1.pdf:md5,cf98a0065e78f9de9e9820c48c72ea28", + "mqc_fastqc_per_sequence_gc_content_plot_Counts.pdf:md5,4fd1162de6ed98d9c8979c363c8c6d8d", + "mqc_fastqc_per_sequence_gc_content_plot_Percentages.pdf:md5,ef3fd50c5ad666f5c9d8b7272bb63ffe", + "mqc_fastqc_per_sequence_quality_scores_plot_1.pdf:md5,1ed5ff1af74249601fbbedaf0896eeec", + "mqc_fastqc_sequence_counts_plot_1.pdf:md5,05699a06111266ba1a2fc6c5b6225b5e", + "mqc_fastqc_sequence_counts_plot_1_pc.pdf:md5,1e12f97bbc1d11778ff021e273ed9306", + "mqc_fastqc_sequence_duplication_levels_plot_1.pdf:md5,da78092e24049610606c5a9f08022730", + "mqc_fastqc_sequence_length_distribution_plot_1.pdf:md5,b5fe60395c94ea578a608abdcc2c879a" + ], + [ + "mqc_fastqc_adapter_content_plot_1.png:md5,d0944b5f795c6538ff950131907a235c", + "mqc_fastqc_overrepresented_sequences_plot_1.png:md5,215518a939fbdd13b440100c2dfee886", + "mqc_fastqc_per_base_n_content_plot_1.png:md5,d8836c33718bededd2d27031412cef1a", + "mqc_fastqc_per_base_sequence_quality_plot_1.png:md5,18ce1e486ebeb0050abb027f591dec1e", + "mqc_fastqc_per_sequence_gc_content_plot_Counts.png:md5,3e26a0f31a552797446c1a2da93c8906", + "mqc_fastqc_per_sequence_gc_content_plot_Percentages.png:md5,9540195d9eaf7c503b6dc9f6dd1b65ae", + "mqc_fastqc_per_sequence_quality_scores_plot_1.png:md5,5a132a8645b54d6c7665e5ce27b382c5", + "mqc_fastqc_sequence_counts_plot_1.png:md5,4a5d277e9dfdab7539149f463e3cd3ff", + "mqc_fastqc_sequence_counts_plot_1_pc.png:md5,cc0518d03f7a5bfbee3ff1d5c70e08c5", + "mqc_fastqc_sequence_duplication_levels_plot_1.png:md5,d95749003f744f1149c79a1b477a5323", + "mqc_fastqc_sequence_length_distribution_plot_1.png:md5,24bf7cfd1113bc12a3eb311ec2642a51" + ], + [ + "mqc_fastqc_adapter_content_plot_1.svg:md5,975bf3c4b47ed61a6fea1a5613cc4856", + "mqc_fastqc_overrepresented_sequences_plot_1.svg:md5,318a787111dfd53f1ab052a19e0c61b7", + "mqc_fastqc_per_base_n_content_plot_1.svg:md5,aabb76bd8d048e5189be0647138fa16e", + "mqc_fastqc_per_base_sequence_quality_plot_1.svg:md5,101f0c24b9993719f0dd0aa33d4d3358", + "mqc_fastqc_per_sequence_gc_content_plot_Counts.svg:md5,7519277c6d46ccdc33613655c55cdecc", + "mqc_fastqc_per_sequence_gc_content_plot_Percentages.svg:md5,bebd34f4f601a49473ffac0ad86f0549", + "mqc_fastqc_per_sequence_quality_scores_plot_1.svg:md5,6ab7712be2dc346c4125ca24bc676023", + "mqc_fastqc_sequence_counts_plot_1.svg:md5,de6647727b404111cc585bc130fd609b", + "mqc_fastqc_sequence_counts_plot_1_pc.svg:md5,3748092488ed6c2e5cda3c0c47f517d3", + "mqc_fastqc_sequence_duplication_levels_plot_1.svg:md5,691ac9510e93e27ed61f6cf56d4187ed", + "mqc_fastqc_sequence_length_distribution_plot_1.svg:md5,9b80a697ccb105a09e4b2afc2953cd44" + ] + ], + "multiqc_report.html:md5,b3a306f35034be4de49257fee9067e8f" + ], + [ + "execution_report_2023-12-01_05-58-24.html:md5,0ddb6c350255ae5537e6d304d573ae45", + "execution_timeline_2023-12-01_05-58-24.html:md5,14a213458c0d36187c3b18d942e42732", + "params_2023-12-01_05-59-25.json:md5,acae7d15c24ee4cc322b6bf99fcce9eb", + "pipeline_dag_2023-12-01_05-58-24.html:md5,e3b835328ae04fe552aaf94dffdc430c", + "software_versions.yml:md5,a24a6dddf273082d065dea785bfe5f11" + ] + ] + ], + "timestamp": "2023-12-01T05:59:25.966329598" + } +} \ No newline at end of file