diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61895ff9..dd8aa75b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,70 +1,75 @@ -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 + - "dev" pull_request: + branches: + - "dev" + - "master" release: - types: [published] + types: + - "published" env: NXF_ANSI_LOG: false + NFTEST_VER: "0.8.4" concurrency: - group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: - test: - name: Run pipeline with test data (AMP and ARG) - # 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/funcscan') }}" + define_nxf_versions: + name: Choose nextflow versions to test against depending on target branch runs-on: ubuntu-latest - strategy: - matrix: - NXF_VER: - - "23.04.0" - - "latest-everything" - parameters: - - "-profile docker,test_preannotated --annotation_tool prodigal" - - "-profile docker,test --annotation_tool prokka" - - "-profile docker,test --annotation_tool bakta --annotation_bakta_db_downloadtype light --arg_skip_deeparg --arg_skip_amrfinderplus" # Skip deeparg and amrfinderplus due to otherwise running out of space on GitHub Actions - + outputs: + matrix: ${{ steps.nxf_versions.outputs.matrix }} steps: - - name: Check out pipeline code - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 - - - name: Install Nextflow - uses: nf-core/setup-nextflow@v2 - with: - version: "${{ matrix.NXF_VER }}" - - - name: Disk space cleanup - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 - - - name: Run pipeline with test data (AMP/ARG workflows) + - id: nxf_versions run: | - nextflow run ${GITHUB_WORKSPACE} ${{ matrix.parameters }} --outdir ./results + 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.10.0"]' | tee -a $GITHUB_OUTPUT + fi - test_bgc: - name: Run pipeline with test data (BGC) - # 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/funcscan') }}" + test: + name: nf-test + needs: define_nxf_versions runs-on: ubuntu-latest strategy: + fail-fast: false matrix: - NXF_VER: - - "23.04.0" - - "latest-everything" - parameters: - - "-profile docker,test_preannotated_bgc --annotation_tool prodigal" - - "-profile docker,test_bgc --annotation_tool prokka" - - "-profile docker,test_bgc --annotation_tool bakta --annotation_bakta_db_downloadtype light" + NXF_VER: ${{ fromJson(needs.define_nxf_versions.outputs.matrix) }} + tags: + - "test" + - "test_nothing" + - "test_bakta" + - "test_prokka" + - "test_bgc_pyrodigal" + - "test_bgc_bakta" + - "test_bgc_prokka" + - "test_taxonomy_pyrodigal" + - "test_taxonomy_bakta" + - "test_taxonomy_prokka" + - "test_preannotated" + - "test_preannotated_bgc" + profile: + - "docker" steps: - name: Check out pipeline code - uses: actions/checkout@v2 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 + + - name: Check out test data + uses: actions/checkout@v3 + with: + repository: nf-core/test-datasets + ref: funcscan + path: test-datasets/ + fetch-depth: 1 - name: Install Nextflow uses: nf-core/setup-nextflow@v1 @@ -74,37 +79,23 @@ jobs: - name: Disk space cleanup uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 - - name: Run pipeline with test data (BGC workflow) + - name: Install nf-test run: | - nextflow run ${GITHUB_WORKSPACE} ${{ matrix.parameters }} --outdir ./results --bgc_skip_deepbgc + wget -qO- https://code.askimed.com/install/nf-test | bash -s $NFTEST_VER + sudo mv nf-test /usr/local/bin/ - test_taxonomy: - name: Run pipeline with test data (AMP, ARG and BGC with taxonomy) - # 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/funcscan') }}" - runs-on: ubuntu-latest - strategy: - matrix: - NXF_VER: - - "23.04.0" - - "latest-everything" - parameters: - - "-profile docker,test_taxonomy --annotation_tool prodigal" - - "-profile docker,test_taxonomy --annotation_tool prokka" - - "-profile docker,test_taxonomy --annotation_tool bakta --annotation_bakta_db_downloadtype light" + - name: Run nf-test + run: | + nf-test test --tag ${{ matrix.tags }} --profile ${{ matrix.tags }},${{ matrix.profile }} --junitxml=test.xml - steps: - - name: Check out pipeline code - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + - name: Output log on failure + if: failure() + run: | + sudo apt install bat > /dev/null + batcat --decorations=always --color=always ${{ github.workspace }}/.nf-test/*/tests/output/pipeline_info/software_versions.yml - - name: Install Nextflow - uses: nf-core/setup-nextflow@v1 + - name: Publish Test Report + uses: mikepenz/action-junit-report@v3 + if: always() # always run even if the previous step fails with: - version: "${{ matrix.NXF_VER }}" - - - name: Disk space cleanup - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 - - - name: Run pipeline with test data (AMP, ARG and BGC taxonomy workflows) - run: | - nextflow run ${GITHUB_WORKSPACE} ${{ matrix.parameters }} --outdir ./results + report_paths: "*.xml" diff --git a/.nf-core.yml b/.nf-core.yml index e0b85a77..318ad93d 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -1,2 +1,4 @@ repository_type: pipeline +lint: + actions_ci: False ## TODO: re-activate once nf-test ci.yml structure updated nf_core_version: "2.14.1" diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f0735bf..38958df7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#375](https://github.com/nf-core/funcscan/pull/375) Merged pipeline template of nf-core/tools version 2.14.1. (by @jfy133) - [#381](https://github.com/nf-core/funcscan/pull/381) Added support for supplying pre-annotated sequences to the pipeline. (by @jfy133, @jasmezz) - [#382](https://github.com/nf-core/funcscan/pull/382) Optimised BGC screening run time and prevent crashes due to too-short contigs by adding contig length filtering for BGC workflow only. (by @jfy133, @darcy220606) -- [#384](https://github.com/nf-core/funcscan/pull/384) Deprecated AMPcombi and exchanged it with full suite of AMPcombi2 submodules. (by @darcy220606) +- [#366](https://github.com/nf-core/funcscan/pull/366) Added nf-test on pipeline level. (by @jfy133, @Darcy220606, @jasmezz) ### `Fixed` @@ -38,22 +38,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | Tool | Previous version | New version | | ------------- | ---------------- | ----------- | +| AMPcombi | 0.1.7 | 0.2.2 | | AMPlify | 1.1.0 | 2.0.0 | | AMRFinderPlus | 3.11.18 | 3.12.8 | | antiSMASH | 6.1.1 | 7.1.0 | +| bioawk | 1.0 | NA | | DeepARG | 1.0.2 | 1.0.4 | | DeepBGC | 0.1.30 | 0.1.31 | | GECCO | 0.9.8 | 0.9.10 | | hAMRonization | 1.1.1 | 1.1.4 | | HMMER | 3.3.2 | 3.4 | +| MMSeqs | NA | 2:15.6f452 | | MultiQC | 1.15 | 1.22.3 | | Pyrodigal | 2.1.0 | 3.3.0 | | RGI | 5.2.1 | 6.0.3 | +| seqkit | NA | 2.8.1 | | tabix/htslib | 1.11 | 1.19.1 | -| ampcombi | 0.1.7 | 0.2.2 | ### `Deprecated` +- [#384](https://github.com/nf-core/funcscan/pull/384) Deprecated AMPcombi and exchanged it with full suite of AMPcombi2 submodules. (by @darcy220606) +- [#382](https://github.com/nf-core/funcscan/pull/382) Optimised BGC screening run time and prevent crashes due to too-short contigs by adding contig length filtering for BGC workflow only. Bioawk is replaced with seqkit (by @jfy133, @darcy220606) + ## v1.1.6 - [2024-07-08] ### `Added` diff --git a/conf/test.config b/conf/test.config index f1345093..907bdd69 100644 --- a/conf/test.config +++ b/conf/test.config @@ -11,7 +11,7 @@ */ params { - config_profile_name = 'Test profile' + config_profile_name = 'AMP/ARG Pyrodigal test profile' config_profile_description = 'Minimal test dataset to check pipeline function' // Limit resources so that this can run on GitHub Actions @@ -21,7 +21,6 @@ params { // Input data input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_reduced.csv' - amp_hmmsearch_models = params.pipelines_testdata_base_path + 'funcscan/hmms/mybacteriocin.hmm' annotation_tool = 'pyrodigal' @@ -29,4 +28,6 @@ params { arg_fargene_hmmmodel = 'class_a,class_b_1_2' run_amp_screening = true + amp_run_hmmsearch = true + amp_hmmsearch_models = params.pipelines_testdata_base_path + 'funcscan/hmms/mybacteriocin.hmm' } diff --git a/conf/test_bakta.config b/conf/test_bakta.config new file mode 100644 index 00000000..72c540c5 --- /dev/null +++ b/conf/test_bakta.config @@ -0,0 +1,34 @@ +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Nextflow config file for running minimal tests +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Defines input files and everything required to run a fast and simple pipeline test. + + Use as follows: + nextflow run nf-core/funcscan -profile test_bakta, --outdir + +---------------------------------------------------------------------------------------- +*/ + +params { + config_profile_name = 'AMP/ARG Bakta test profile' + config_profile_description = 'Minimal test dataset to check pipeline function' + + // Limit resources so that this can run on GitHub Actions + max_cpus = 2 + max_memory = '8.GB' + max_time = '6.h' + + // Input data + input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_reduced.csv' + + annotation_tool = 'bakta' + annotation_bakta_db_downloadtype = 'light' + + run_amp_screening = true + amp_run_hmmsearch = true + amp_hmmsearch_models = params.pipelines_testdata_base_path + 'funcscan/hmms/mybacteriocin.hmm' + + run_arg_screening = true + arg_fargene_hmmmodel = 'class_a,class_b_1_2' +} diff --git a/conf/test_bgc_bakta.config b/conf/test_bgc_bakta.config new file mode 100644 index 00000000..d879fe38 --- /dev/null +++ b/conf/test_bgc_bakta.config @@ -0,0 +1,34 @@ +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Nextflow config file for running minimal tests +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Defines input files and everything required to run a fast and simple pipeline test. + + Use as follows: + nextflow run nf-core/funcscan -profile test_bgc_bakta, --outdir + +---------------------------------------------------------------------------------------- +*/ + +params { + config_profile_name = 'BGC Bakta test profile' + config_profile_description = 'Minimal test dataset to check BGC workflow function' + + // Limit resources so that this can run on GitHub Actions + max_cpus = 2 + max_memory = '8.GB' + max_time = '6.h' + + // Input data + input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_reduced.csv' + + annotation_tool = 'bakta' + annotation_bakta_db_downloadtype = "light" + + run_arg_screening = false + run_amp_screening = false + run_bgc_screening = true + + bgc_run_hmmsearch = true + bgc_hmmsearch_models = 'https://raw.githubusercontent.com/antismash/antismash/fd61de057e082fbf071732ac64b8b2e8883de32f/antismash/detection/hmm_detection/data/ToyB.hmm' +} diff --git a/conf/test_bgc_prokka.config b/conf/test_bgc_prokka.config new file mode 100644 index 00000000..0a7b4e18 --- /dev/null +++ b/conf/test_bgc_prokka.config @@ -0,0 +1,33 @@ +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Nextflow config file for running minimal tests +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Defines input files and everything required to run a fast and simple pipeline test. + + Use as follows: + nextflow run nf-core/funcscan -profile test_bgc_prokka, --outdir + +---------------------------------------------------------------------------------------- +*/ + +params { + config_profile_name = 'BGC Prokka test profile' + config_profile_description = 'Minimal test dataset to check BGC workflow function' + + // Limit resources so that this can run on GitHub Actions + max_cpus = 2 + max_memory = '8.GB' + max_time = '6.h' + + // Input data + input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_reduced.csv' + + annotation_tool = 'prokka' + + run_arg_screening = false + run_amp_screening = false + run_bgc_screening = true + + bgc_run_hmmsearch = true + bgc_hmmsearch_models = 'https://raw.githubusercontent.com/antismash/antismash/fd61de057e082fbf071732ac64b8b2e8883de32f/antismash/detection/hmm_detection/data/ToyB.hmm' +} diff --git a/conf/test_bgc.config b/conf/test_bgc_pyrodigal.config similarity index 69% rename from conf/test_bgc.config rename to conf/test_bgc_pyrodigal.config index d1419d86..f5ef07a9 100644 --- a/conf/test_bgc.config +++ b/conf/test_bgc_pyrodigal.config @@ -5,13 +5,13 @@ Defines input files and everything required to run a fast and simple pipeline test. Use as follows: - nextflow run nf-core/funcscan -profile test_bgc, --outdir + nextflow run nf-core/funcscan -profile test_bgc_pyrodigal, --outdir ---------------------------------------------------------------------------------------- */ params { - config_profile_name = 'BGC test profile' + config_profile_name = 'BGC Pyrodigal test profile' config_profile_description = 'Minimal test dataset to check BGC workflow function' // Limit resources so that this can run on GitHub Actions @@ -20,12 +20,14 @@ params { max_time = '6.h' // Input data - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/funcscan/samplesheet_reduced.csv' - bgc_hmmsearch_models = 'https://raw.githubusercontent.com/antismash/antismash/fd61de057e082fbf071732ac64b8b2e8883de32f/antismash/detection/hmm_detection/data/ToyB.hmm' + input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_reduced.csv' annotation_tool = 'pyrodigal' - run_arg_screening = false - run_amp_screening = false - run_bgc_screening = true + run_arg_screening = false + run_amp_screening = false + run_bgc_screening = true + + bgc_run_hmmsearch = true + bgc_hmmsearch_models = 'https://raw.githubusercontent.com/antismash/antismash/fd61de057e082fbf071732ac64b8b2e8883de32f/antismash/detection/hmm_detection/data/ToyB.hmm' } diff --git a/conf/test_full.config b/conf/test_full.config index 74cad367..9d16fb18 100644 --- a/conf/test_full.config +++ b/conf/test_full.config @@ -22,11 +22,12 @@ params { // AMP params run_amp_screening = true + amp_run_hmmsearch = true amp_hmmsearch_models = params.pipelines_testdata_base_path + 'funcscan/hmms/mybacteriocin.hmm' amp_hmmsearch_savealignments = true amp_hmmsearch_savedomains = true amp_hmmsearch_savetargets = true - amp_skip_amplify = true + amp_skip_amplify = true // takes too long // ARG params run_arg_screening = true @@ -34,6 +35,7 @@ params { // BGC params run_bgc_screening = true + bgc_run_hmmsearch = true bgc_hmmsearch_models = 'https://raw.githubusercontent.com/antismash/antismash/fd61de057e082fbf071732ac64b8b2e8883de32f/antismash/detection/hmm_detection/data/ToyB.hmm' bgc_hmmsearch_savealignments = true bgc_hmmsearch_savetargets = true @@ -43,6 +45,4 @@ params { bgc_savefilteredcontigs = true bgc_skip_deepbgc = true bgc_antismash_contigminlength = 1000 - - } diff --git a/conf/test_nothing.config b/conf/test_nothing.config index 9da474c7..87a2e06b 100644 --- a/conf/test_nothing.config +++ b/conf/test_nothing.config @@ -22,32 +22,32 @@ params { max_time = '6.h' // Input data - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/funcscan/samplesheet_reduced.csv' - amp_hmmsearch_models = 'https://raw.githubusercontent.com/nf-core/test-datasets/funcscan/hmms/mybacteriocin.hmm' - bgc_hmmsearch_models = 'https://raw.githubusercontent.com/antismash/antismash/fd61de057e082fbf071732ac64b8b2e8883de32f/antismash/detection/hmm_detection/data/ToyB.hmm' - - annotation_tool = 'pyrodigal' - - run_arg_screening = false - run_amp_screening = false - run_bgc_screening = false - - arg_fargene_hmmmodel = 'class_a,class_b_1_2' - - amp_skip_amplify = true - amp_skip_macrel = true - amp_skip_ampir = true - amp_skip_hmmsearch = true - - arg_skip_deeparg = true - arg_skip_fargene = true - arg_skip_rgi = true - arg_skip_amrfinderplus = true - arg_skip_deeparg = true - arg_skip_abricate = true - - bgc_skip_antismash = true - bgc_skip_deepbgc = true - bgc_skip_gecco = true - bgc_skip_hmmsearch = true + input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_reduced.csv' + amp_hmmsearch_models = params.pipelines_testdata_base_path + 'funcscan/hmms/mybacteriocin.hmm' + bgc_hmmsearch_models = 'https://raw.githubusercontent.com/antismash/antismash/fd61de057e082fbf071732ac64b8b2e8883de32f/antismash/detection/hmm_detection/data/ToyB.hmm' + + annotation_tool = 'pyrodigal' + + run_arg_screening = false + run_amp_screening = false + run_bgc_screening = false + + arg_fargene_hmmmodel = 'class_a,class_b_1_2' + + amp_skip_amplify = true + amp_skip_macrel = true + amp_skip_ampir = true + amp_run_hmmsearch = false + + arg_skip_deeparg = true + arg_skip_fargene = true + arg_skip_rgi = true + arg_skip_amrfinderplus = true + arg_skip_deeparg = true + arg_skip_abricate = true + + bgc_skip_antismash = true + bgc_skip_deepbgc = true + bgc_skip_gecco = true + bgc_run_hmmsearch = false } diff --git a/conf/test_preannotated.config b/conf/test_preannotated.config index 27e67209..38a5e1d1 100644 --- a/conf/test_preannotated.config +++ b/conf/test_preannotated.config @@ -11,7 +11,7 @@ */ params { - config_profile_name = 'Test profile - preannotated input' + config_profile_name = 'ARG/AMP test profile - preannotated input' config_profile_description = 'Minimal test dataset to check pipeline function' // Limit resources so that this can run on GitHub Actions @@ -20,13 +20,14 @@ params { max_time = '6.h' // Input data - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/funcscan/samplesheet_preannotated.csv' - amp_hmmsearch_models = 'https://raw.githubusercontent.com/nf-core/test-datasets/funcscan/hmms/mybacteriocin.hmm' + input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_preannotated.csv' - annotation_tool = 'pyrodigal' + annotation_tool = 'pyrodigal' - run_arg_screening = true - arg_fargene_hmmmodel = 'class_a,class_b_1_2' + run_arg_screening = true + arg_fargene_hmmmodel = 'class_a,class_b_1_2' - run_amp_screening = true + run_amp_screening = true + amp_run_hmmsearch = true + amp_hmmsearch_models = params.pipelines_testdata_base_path + 'funcscan/hmms/mybacteriocin.hmm' } diff --git a/conf/test_preannotated_bgc.config b/conf/test_preannotated_bgc.config index 47aa7504..039656d3 100644 --- a/conf/test_preannotated_bgc.config +++ b/conf/test_preannotated_bgc.config @@ -11,7 +11,7 @@ */ params { - config_profile_name = 'BGC test profile - preannotated input BGC' + config_profile_name = 'BGC test profile - preannotated input' config_profile_description = 'Minimal test dataset to check BGC workflow function' // Limit resources so that this can run on GitHub Actions @@ -20,12 +20,14 @@ params { max_time = '6.h' // Input data - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/funcscan/samplesheet_preannotated.csv' - bgc_hmmsearch_models = 'https://raw.githubusercontent.com/antismash/antismash/fd61de057e082fbf071732ac64b8b2e8883de32f/antismash/detection/hmm_detection/data/ToyB.hmm' + input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_preannotated.csv' annotation_tool = 'pyrodigal' - run_arg_screening = false - run_amp_screening = false - run_bgc_screening = true + run_arg_screening = false + run_amp_screening = false + run_bgc_screening = true + + bgc_run_hmmsearch = true + bgc_hmmsearch_models = 'https://raw.githubusercontent.com/antismash/antismash/fd61de057e082fbf071732ac64b8b2e8883de32f/antismash/detection/hmm_detection/data/ToyB.hmm' } diff --git a/conf/test_prokka.config b/conf/test_prokka.config new file mode 100644 index 00000000..eb346bcb --- /dev/null +++ b/conf/test_prokka.config @@ -0,0 +1,33 @@ +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Nextflow config file for running minimal tests +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Defines input files and everything required to run a fast and simple pipeline test. + + Use as follows: + nextflow run nf-core/funcscan -profile test_prokka, --outdir + +---------------------------------------------------------------------------------------- +*/ + +params { + config_profile_name = 'AMP/ARG Prokka test profile' + config_profile_description = 'Minimal test dataset to check pipeline function' + + // Limit resources so that this can run on GitHub Actions + max_cpus = 2 + max_memory = '8.GB' + max_time = '6.h' + + // Input data + input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_reduced.csv' + + annotation_tool = 'prokka' + + run_arg_screening = true + arg_fargene_hmmmodel = 'class_a,class_b_1_2' + + run_amp_screening = true + amp_run_hmmsearch = true + amp_hmmsearch_models = params.pipelines_testdata_base_path + 'funcscan/hmms/mybacteriocin.hmm' +} diff --git a/conf/test_taxonomy_bakta.config b/conf/test_taxonomy_bakta.config new file mode 100644 index 00000000..e7bc923d --- /dev/null +++ b/conf/test_taxonomy_bakta.config @@ -0,0 +1,50 @@ +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Nextflow config file for running minimal tests +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Defines input files and everything required to run a fast and simple pipeline test. + + Use as follows: + nextflow run nf-core/funcscan -profile test_taxonomy_bakta, --outdir + +---------------------------------------------------------------------------------------- +*/ + +params { + config_profile_name = 'Taxonomic classification test profile' + config_profile_description = 'Minimal test dataset to check taxonomic classification workflow function' + + // Limit resources so that this can run on GitHub Actions + max_cpus = 2 + max_memory = '14.GB' + max_time = '6.h' + + // Input data + input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_reduced.csv' + amp_hmmsearch_models = params.pipelines_testdata_base_path + 'funcscan/hmms/mybacteriocin.hmm' + bgc_hmmsearch_models = 'https://raw.githubusercontent.com/antismash/antismash/fd61de057e082fbf071732ac64b8b2e8883de32f/antismash/detection/hmm_detection/data/ToyB.hmm' + + run_taxa_classification = true + annotation_tool = 'bakta' + annotation_bakta_db_downloadtype = 'light' + + run_arg_screening = true + arg_skip_deeparg = true + arg_skip_amrfinderplus = true + + run_amp_screening = true + amp_run_hmmsearch = true + + run_bgc_screening = true + bgc_mincontiglength = 1000 + bgc_savefilteredcontigs = true + bgc_skip_deepbgc = true + bgc_antismash_contigminlength = 1000 + bgc_run_hmmsearch = true +} + +process { + withName: MMSEQS_DATABASES { + memory = '14.GB' + } +} diff --git a/conf/test_taxonomy_prokka.config b/conf/test_taxonomy_prokka.config new file mode 100644 index 00000000..39eefdfc --- /dev/null +++ b/conf/test_taxonomy_prokka.config @@ -0,0 +1,49 @@ +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Nextflow config file for running minimal tests +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Defines input files and everything required to run a fast and simple pipeline test. + + Use as follows: + nextflow run nf-core/funcscan -profile test_taxonomy_prokka, --outdir + +---------------------------------------------------------------------------------------- +*/ + +params { + config_profile_name = 'Taxonomic classification test profile' + config_profile_description = 'Minimal test dataset to check taxonomic classification workflow function' + + // Limit resources so that this can run on GitHub Actions + max_cpus = 2 + max_memory = '14.GB' + max_time = '6.h' + + // Input data + input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_reduced.csv' + bgc_hmmsearch_models = 'https://raw.githubusercontent.com/antismash/antismash/fd61de057e082fbf071732ac64b8b2e8883de32f/antismash/detection/hmm_detection/data/ToyB.hmm' + amp_hmmsearch_models = params.pipelines_testdata_base_path + 'funcscan/hmms/mybacteriocin.hmm' + + run_taxa_classification = true + annotation_tool = 'prokka' + + run_arg_screening = true + arg_skip_deeparg = true + arg_skip_amrfinderplus = true + + run_amp_screening = true + amp_run_hmmsearch = true + + run_bgc_screening = true + bgc_mincontiglength = 1000 + bgc_savefilteredcontigs = true + bgc_skip_deepbgc = true + bgc_antismash_contigminlength = 1000 + bgc_run_hmmsearch = true +} + +process { + withName: MMSEQS_DATABASES { + memory = '14.GB' + } +} diff --git a/conf/test_taxonomy.config b/conf/test_taxonomy_pyrodigal.config similarity index 78% rename from conf/test_taxonomy.config rename to conf/test_taxonomy_pyrodigal.config index 313bbf0a..4ad970f9 100644 --- a/conf/test_taxonomy.config +++ b/conf/test_taxonomy_pyrodigal.config @@ -5,7 +5,7 @@ Defines input files and everything required to run a fast and simple pipeline test. Use as follows: - nextflow run nf-core/funcscan -profile test_taxonomy, --outdir + nextflow run nf-core/funcscan -profile test_taxonomy_pyrodigal, --outdir ---------------------------------------------------------------------------------------- */ @@ -20,25 +20,26 @@ params { max_time = '6.h' // Input data - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/funcscan/samplesheet_reduced.csv' + input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_reduced.csv' bgc_hmmsearch_models = 'https://raw.githubusercontent.com/antismash/antismash/fd61de057e082fbf071732ac64b8b2e8883de32f/antismash/detection/hmm_detection/data/ToyB.hmm' - amp_hmmsearch_models = 'https://raw.githubusercontent.com/nf-core/test-datasets/funcscan/hmms/mybacteriocin.hmm' + amp_hmmsearch_models = params.pipelines_testdata_base_path + 'funcscan/hmms/mybacteriocin.hmm' run_taxa_classification = true annotation_tool = 'pyrodigal' - save_annotations = true run_arg_screening = true arg_skip_deeparg = true arg_skip_amrfinderplus = true run_amp_screening = true + amp_run_hmmsearch = true run_bgc_screening = true bgc_mincontiglength = 1000 bgc_savefilteredcontigs = true bgc_skip_deepbgc = true bgc_antismash_contigminlength = 1000 + bgc_run_hmmsearch = true } process { diff --git a/modules/nf-core/bioawk/environment.yml b/modules/nf-core/bioawk/environment.yml deleted file mode 100644 index 5fdfd417..00000000 --- a/modules/nf-core/bioawk/environment.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: bioawk -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - bioconda::bioawk=1.0 diff --git a/nextflow.config b/nextflow.config index fbaec56d..ae69b505 100644 --- a/nextflow.config +++ b/nextflow.config @@ -370,14 +370,19 @@ profiles { executor.cpus = 4 executor.memory = 8.GB } - test { includeConfig 'conf/test.config' } - test_bgc { includeConfig 'conf/test_bgc.config' } - test_taxonomy { includeConfig 'conf/test_taxonomy.config' } - test_full { includeConfig 'conf/test_full.config' } - test_deeparg { includeConfig 'conf/test_deeparg.config' } - test_nothing { includeConfig 'conf/test_nothing.config' } - test_preannotated { includeConfig 'conf/test_preannotated.config' } - test_preannotated_bgc { includeConfig 'conf/test_preannotated_bgc.config' } + test { includeConfig 'conf/test.config' } + test_bakta { includeConfig 'conf/test_bakta.config' } + test_prokka { includeConfig 'conf/test_prokka.config' } + test_bgc_bakta { includeConfig 'conf/test_bgc_bakta.config' } + test_bgc_prokka { includeConfig 'conf/test_bgc_prokka.config' } + test_bgc_pyrodigal { includeConfig 'conf/test_bgc_pyrodigal.config' } + test_taxonomy_bakta { includeConfig 'conf/test_taxonomy_bakta.config' } + test_taxonomy_prokka { includeConfig 'conf/test_taxonomy_prokka.config' } + test_taxonomy_pyrodigal { includeConfig 'conf/test_taxonomy_pyrodigal.config' } + test_full { includeConfig 'conf/test_full.config' } + test_nothing { includeConfig 'conf/test_nothing.config' } + test_preannotated { includeConfig 'conf/test_preannotated.config' } + test_preannotated_bgc { includeConfig 'conf/test_preannotated_bgc.config' } } // Set default registry for Apptainer, Docker, Podman and Singularity independent of -profile diff --git a/nf-test.config b/nf-test.config new file mode 100644 index 00000000..03cfcfa8 --- /dev/null +++ b/nf-test.config @@ -0,0 +1,19 @@ +config { + // location for all nf-tests + testsDir "tests/" + + // nf-test directory including temporary files for each test + workDir ".nf-test" + + // location of library folder that is added automatically to the classpath + libDir "tests/pipeline/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 "" + + // add Nextflow options + //options "-resume" +} diff --git a/subworkflows/local/bgc.nf b/subworkflows/local/bgc.nf index b939a18a..0130205d 100644 --- a/subworkflows/local/bgc.nf +++ b/subworkflows/local/bgc.nf @@ -113,7 +113,7 @@ workflow BGC { ch_versions = ch_versions.mix( DEEPBGC_DOWNLOAD.out.versions ) } - DEEPBGC_PIPELINE ( gbks, ch_deepbgc_database) + DEEPBGC_PIPELINE ( gbks, ch_deepbgc_database ) ch_versions = ch_versions.mix( DEEPBGC_PIPELINE.out.versions ) ch_bgcresults_for_combgc = ch_bgcresults_for_combgc.mix( DEEPBGC_PIPELINE.out.bgc_tsv ) } diff --git a/tests/test.nf.test b/tests/test.nf.test new file mode 100644 index 00000000..df4125f7 --- /dev/null +++ b/tests/test.nf.test @@ -0,0 +1,109 @@ +nextflow_pipeline { + + name "Test pipeline: NFCORE_FUNCSCAN" + script "main.nf" + tag "pipeline" + tag "nfcore_funcscan" + tag "test" + + test("test_profile") { + + when { + params { + outdir = "$outputDir" + } + } + + then { + assertAll( + { assert workflow.success }, + { assert new File("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml").exists() }, + { assert new File("$outputDir/multiqc/multiqc_report.html").exists() }, + + // AMPir + { assert snapshot( + file("$outputDir/amp/ampir/sample_1/sample_1.ampir.tsv").text.contains("NODE_882919_length_258_cov_0.935961_1"), + file("$outputDir/amp/ampir/sample_1/sample_1.ampir.faa").text.contains("NODE_882919_length_258_cov_0.935961_1"), + file("$outputDir/amp/ampir/sample_2/sample_2.ampir.tsv").text.contains("NODE_882919_length_258_cov_0.935961_1"), + file("$outputDir/amp/ampir/sample_2/sample_2.ampir.faa").text.contains("NODE_882919_length_258_cov_0.935961_1"), + ).match("ampir") }, + + // AMPlify + { assert snapshot( + file("$outputDir/amp/amplify/sample_1/sample_1.amplify.tsv").text.contains("NODE_882919_length_258_cov_0.935961_1"), + file("$outputDir/amp/amplify/sample_2/sample_2.amplify.tsv").text.contains("NODE_882919_length_258_cov_0.935961_1") + ).match("amplify") }, + + // HMMsearch + { assert new File("$outputDir/amp/hmmer_hmmsearch/sample_1/sample_1_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + { assert new File("$outputDir/amp/hmmer_hmmsearch/sample_2/sample_2_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + + // Macrel + { assert snapshot( + path("$outputDir/amp/macrel/sample_1.macrel/sample_1.macrel.smorfs.faa.gz"), + path("$outputDir/amp/macrel/sample_2.macrel/sample_2.macrel.smorfs.faa.gz"), + path("$outputDir/amp/macrel/sample_1.macrel/sample_1.macrel.all_orfs.faa.gz"), + path("$outputDir/amp/macrel/sample_2.macrel/sample_2.macrel.all_orfs.faa.gz"), + path("$outputDir/amp/macrel/sample_1.macrel/sample_1.macrel.prediction.gz"), + path("$outputDir/amp/macrel/sample_2.macrel/sample_2.macrel.prediction.gz"), + path("$outputDir/amp/macrel/sample_1.macrel/README.md"), + path("$outputDir/amp/macrel/sample_1.macrel/README.md"), + path("$outputDir/amp/macrel/sample_1.macrel/sample_1.macrel_log.txt"), + path("$outputDir/amp/macrel/sample_2.macrel/sample_2.macrel_log.txt") + ).match("macrel") }, + + // AMPcombi + { assert path("$outputDir/reports/ampcombi2/Ampcombi_summary.tsv").text.contains("NODE_515831_length_303_cov_1.532258_1") }, + { assert snapshot( + path("$outputDir/reports/ampcombi2/Ampcombi_cluster.log"), + path("$outputDir/reports/ampcombi2/Ampcombi_complete.log"), + path("$outputDir/reports/ampcombi2/Ampcombi_parse_tables.log") + ).match("ampcombi_logfiles") }, + + // DeepARG + { assert snapshot( + path("$outputDir/arg/deeparg/sample_1/sample_1.align.daa.tsv"), + path("$outputDir/arg/deeparg/sample_2/sample_2.align.daa.tsv"), + path("$outputDir/arg/deeparg/sample_1/sample_1.mapping.ARG"), + path("$outputDir/arg/deeparg/sample_2/sample_2.mapping.ARG") + ).match("deeparg_tsv_ARG") }, + { assert file("$outputDir/arg/deeparg/sample_1/sample_1.align.daa").name }, + { assert file("$outputDir/arg/deeparg/sample_2/sample_2.align.daa").name }, + { assert path("$outputDir/arg/deeparg/sample_1/sample_1.mapping.potential.ARG").text.contains("#ARG") }, + { assert path("$outputDir/arg/deeparg/sample_2/sample_2.mapping.potential.ARG").text.contains("#ARG") }, + + // ABRicate + { assert snapshot( + path("$outputDir/arg/abricate/sample_1/sample_1.txt"), + path("$outputDir/arg/abricate/sample_2/sample_2.txt"), + ).match("abricate") }, + + // AMRFinderPlus + { assert snapshot( + path("$outputDir/arg/amrfinderplus/sample_1/sample_1.tsv"), + path("$outputDir/arg/amrfinderplus/sample_2/sample_2.tsv"), + ).match("amrfinderplus") }, + + // RGI + { assert snapshot( + path("$outputDir/arg/rgi/sample_1/sample_1.txt"), + path("$outputDir/arg/rgi/sample_2/sample_2.txt"), + ).match("rgi") }, + + // fARGene + { assert snapshot( + path("$outputDir/arg/fargene/sample_1/class_a/results_summary.txt"), + path("$outputDir/arg/fargene/sample_2/class_a/results_summary.txt"), + path("$outputDir/arg/fargene/sample_1/class_b_1_2/results_summary.txt"), + path("$outputDir/arg/fargene/sample_2/class_b_1_2/results_summary.txt") + ).match("fargene") + }, + { assert path("$outputDir/arg/fargene/sample_1/fargene_analysis.log").text.contains("fARGene is done.") }, + { assert path("$outputDir/arg/fargene/sample_2/fargene_analysis.log").text.contains("fARGene is done.") }, + + // hAMRonization + { assert snapshot(path("$outputDir/reports/hamronization_summarize/hamronization_combined_report.tsv")).match("hamronization_summarize") }, + ) + } + } +} diff --git a/tests/test.nf.test.snap b/tests/test.nf.test.snap new file mode 100644 index 00000000..9762baf5 --- /dev/null +++ b/tests/test.nf.test.snap @@ -0,0 +1,126 @@ +{ + "hamronization_summarize": { + "content": [ + "hamronization_combined_report.tsv:md5,864466b0fb1acfc0e6b3425271f78ecb" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:01:38.641163055" + }, + "abricate": { + "content": [ + "sample_1.txt:md5,69af3321b0bc808b7ef85f102395736f", + "sample_2.txt:md5,69af3321b0bc808b7ef85f102395736f" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:01:38.590739146" + }, + "fargene": { + "content": [ + "results_summary.txt:md5,690d351cfc52577263ef4cfab1c81f50", + "results_summary.txt:md5,690d351cfc52577263ef4cfab1c81f50", + "results_summary.txt:md5,f69af9b0e18a0cfc934eb18b7e4bffe1", + "results_summary.txt:md5,f69af9b0e18a0cfc934eb18b7e4bffe1" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:01:38.625398198" + }, + "rgi": { + "content": [ + "sample_1.txt:md5,fce130af51f93cccfc09ddaf9caf623f", + "sample_2.txt:md5,fce130af51f93cccfc09ddaf9caf623f" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:01:38.614473482" + }, + "deeparg_tsv_ARG": { + "content": [ + "sample_1.align.daa.tsv:md5,21822364379fe8f991d27cdb52a33d1d", + "sample_2.align.daa.tsv:md5,f448465df58785a87cdee53691a77bfe", + "sample_1.mapping.ARG:md5,0e049e99eab4c55666062df21707d5b9", + "sample_2.mapping.ARG:md5,0e049e99eab4c55666062df21707d5b9" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:01:38.575881231" + }, + "ampir": { + "content": [ + true, + true, + true, + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:01:38.512274661" + }, + "ampcombi_logfiles": { + "content": [ + "Ampcombi_cluster.log:md5,4c78f5f134edf566f39e04e3ab7d8558", + "Ampcombi_complete.log:md5,3dabfea4303bf94bd4f5d78c5b8c83c1", + "Ampcombi_parse_tables.log:md5,cb5dc95f6b64edc2f0eb56bb541660d5" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:01:38.560675596" + }, + "amplify": { + "content": [ + true, + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:01:38.522977776" + }, + "macrel": { + "content": [ + "sample_1.macrel.smorfs.faa.gz:md5,1b5e2434860e635e95324d1804a3be7b", + "sample_2.macrel.smorfs.faa.gz:md5,38108b5cdfdc2196afe67418b9b04682", + "sample_1.macrel.all_orfs.faa.gz:md5,86f6b3b590d1b22d9c5aa164f8a14080", + "sample_2.macrel.all_orfs.faa.gz:md5,fdb384925af50ecade05dccaff68afd8", + "sample_1.macrel.prediction.gz:md5,0c4b16e0838be56e012b99169863a168", + "sample_2.macrel.prediction.gz:md5,440deffd6b6d9986ce098e44c66db9ae", + "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", + "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", + "sample_1.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "sample_2.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:01:38.525854315" + }, + "amrfinderplus": { + "content": [ + "sample_1.tsv:md5,b4d261ace9be7d013c19d1f5c0005bfe", + "sample_2.tsv:md5,b4d261ace9be7d013c19d1f5c0005bfe" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:01:38.603392278" + } +} \ No newline at end of file diff --git a/tests/test_bakta.nf.test b/tests/test_bakta.nf.test new file mode 100644 index 00000000..36ca12be --- /dev/null +++ b/tests/test_bakta.nf.test @@ -0,0 +1,109 @@ +nextflow_pipeline { + + name "Test pipeline: NFCORE_FUNCSCAN" + script "main.nf" + tag "pipeline" + tag "nfcore_funcscan" + tag "test_bakta" + + test("test_bakta_profile") { + + when { + params { + outdir = "$outputDir" + } + } + + then { + assertAll( + { assert workflow.success }, + { assert new File("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml").exists() }, + { assert new File("$outputDir/multiqc/multiqc_report.html").exists() }, + + // AMPir + { assert snapshot( + file("$outputDir/amp/ampir/sample_1/sample_1.ampir.tsv").text.contains("NODE_882919_length_258_cov_0.935961_1"), + file("$outputDir/amp/ampir/sample_1/sample_1.ampir.faa").text.contains("NODE_882919_length_258_cov_0.935961_1"), + file("$outputDir/amp/ampir/sample_2/sample_2.ampir.tsv").text.contains("NODE_882919_length_258_cov_0.935961_1"), + file("$outputDir/amp/ampir/sample_2/sample_2.ampir.faa").text.contains("NODE_882919_length_258_cov_0.935961_1") + ).match("ampir") }, + + // AMPlify + { assert snapshot( + file("$outputDir/amp/amplify/sample_1/sample_1.amplify.tsv").text.contains("NODE_882919_length_258_cov_0.935961_1"), + file("$outputDir/amp/amplify/sample_2/sample_2.amplify.tsv").text.contains("NODE_882919_length_258_cov_0.935961_1") + ).match("amplify") }, + + // HMMsearch + { assert new File("$outputDir/amp/hmmer_hmmsearch/sample_1/sample_1_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + { assert new File("$outputDir/amp/hmmer_hmmsearch/sample_2/sample_2_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + + // Macrel + { assert snapshot( + path("$outputDir/amp/macrel/sample_1.macrel/sample_1.macrel.smorfs.faa.gz"), + path("$outputDir/amp/macrel/sample_2.macrel/sample_2.macrel.smorfs.faa.gz"), + path("$outputDir/amp/macrel/sample_1.macrel/sample_1.macrel.all_orfs.faa.gz"), + path("$outputDir/amp/macrel/sample_2.macrel/sample_2.macrel.all_orfs.faa.gz"), + path("$outputDir/amp/macrel/sample_1.macrel/sample_1.macrel.prediction.gz"), + path("$outputDir/amp/macrel/sample_2.macrel/sample_2.macrel.prediction.gz"), + path("$outputDir/amp/macrel/sample_1.macrel/README.md"), + path("$outputDir/amp/macrel/sample_1.macrel/README.md"), + path("$outputDir/amp/macrel/sample_1.macrel/sample_1.macrel_log.txt"), + path("$outputDir/amp/macrel/sample_2.macrel/sample_2.macrel_log.txt") + ).match("macrel") }, + + // AMPcombi + { assert path("$outputDir/reports/ampcombi2/Ampcombi_summary.tsv").text.contains("KKEJHB_00100") }, + { assert snapshot( + path("$outputDir/reports/ampcombi2/Ampcombi_cluster.log"), + path("$outputDir/reports/ampcombi2/Ampcombi_complete.log"), + path("$outputDir/reports/ampcombi2/Ampcombi_parse_tables.log") + ).match("ampcombi_logfiles") }, + + // DeepARG + { assert snapshot( + path("$outputDir/arg/deeparg/sample_1/sample_1.align.daa.tsv"), + path("$outputDir/arg/deeparg/sample_2/sample_2.align.daa.tsv"), + path("$outputDir/arg/deeparg/sample_1/sample_1.mapping.ARG"), + path("$outputDir/arg/deeparg/sample_2/sample_2.mapping.ARG") + ).match("deeparg_tsv_ARG") }, + { assert file("$outputDir/arg/deeparg/sample_1/sample_1.align.daa").name }, + { assert file("$outputDir/arg/deeparg/sample_2/sample_2.align.daa").name }, + { assert path("$outputDir/arg/deeparg/sample_1/sample_1.mapping.potential.ARG").text.contains("#ARG") }, + { assert path("$outputDir/arg/deeparg/sample_2/sample_2.mapping.potential.ARG").text.contains("#ARG") }, + + // ABRicate + { assert snapshot( + path("$outputDir/arg/abricate/sample_1/sample_1.txt"), + path("$outputDir/arg/abricate/sample_2/sample_2.txt"), + ).match("abricate") }, + + // AMRFinderPlus + { assert snapshot( + path("$outputDir/arg/amrfinderplus/sample_1/sample_1.tsv"), + path("$outputDir/arg/amrfinderplus/sample_2/sample_2.tsv"), + ).match("amrfinderplus") }, + + // RGI + { assert snapshot( + path("$outputDir/arg/rgi/sample_1/sample_1.txt"), + path("$outputDir/arg/rgi/sample_2/sample_2.txt"), + ).match("rgi") }, + + // fARGene + { assert snapshot( + path("$outputDir/arg/fargene/sample_1/class_a/results_summary.txt"), + path("$outputDir/arg/fargene/sample_2/class_a/results_summary.txt"), + path("$outputDir/arg/fargene/sample_1/class_b_1_2/results_summary.txt"), + path("$outputDir/arg/fargene/sample_2/class_b_1_2/results_summary.txt") + ).match("fargene") + }, + { assert path("$outputDir/arg/fargene/sample_1/fargene_analysis.log").text.contains("fARGene is done.") }, + { assert path("$outputDir/arg/fargene/sample_2/fargene_analysis.log").text.contains("fARGene is done.") }, + + // hAMRonization + { assert snapshot(path("$outputDir/reports/hamronization_summarize/hamronization_combined_report.tsv")).match("hamronization_summarize") }, + ) + } + } +} diff --git a/tests/test_bakta.nf.test.snap b/tests/test_bakta.nf.test.snap new file mode 100644 index 00000000..0c167dde --- /dev/null +++ b/tests/test_bakta.nf.test.snap @@ -0,0 +1,126 @@ +{ + "hamronization_summarize": { + "content": [ + "hamronization_combined_report.tsv:md5,864466b0fb1acfc0e6b3425271f78ecb" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:10:03.320498194" + }, + "abricate": { + "content": [ + "sample_1.txt:md5,69af3321b0bc808b7ef85f102395736f", + "sample_2.txt:md5,69af3321b0bc808b7ef85f102395736f" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:10:03.261118633" + }, + "fargene": { + "content": [ + "results_summary.txt:md5,690d351cfc52577263ef4cfab1c81f50", + "results_summary.txt:md5,690d351cfc52577263ef4cfab1c81f50", + "results_summary.txt:md5,f69af9b0e18a0cfc934eb18b7e4bffe1", + "results_summary.txt:md5,f69af9b0e18a0cfc934eb18b7e4bffe1" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:10:03.30812705" + }, + "rgi": { + "content": [ + "sample_1.txt:md5,fce130af51f93cccfc09ddaf9caf623f", + "sample_2.txt:md5,fce130af51f93cccfc09ddaf9caf623f" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:10:03.292595392" + }, + "deeparg_tsv_ARG": { + "content": [ + "sample_1.align.daa.tsv:md5,d41d8cd98f00b204e9800998ecf8427e", + "sample_2.align.daa.tsv:md5,4a86ca69defa4c861fabf236609afe8a", + "sample_1.mapping.ARG:md5,0e049e99eab4c55666062df21707d5b9", + "sample_2.mapping.ARG:md5,0e049e99eab4c55666062df21707d5b9" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:10:03.245901486" + }, + "ampir": { + "content": [ + false, + false, + false, + false + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:10:03.19218768" + }, + "ampcombi_logfiles": { + "content": [ + "Ampcombi_cluster.log:md5,4c78f5f134edf566f39e04e3ab7d8558", + "Ampcombi_complete.log:md5,3dabfea4303bf94bd4f5d78c5b8c83c1", + "Ampcombi_parse_tables.log:md5,cb5dc95f6b64edc2f0eb56bb541660d5" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:10:03.230099612" + }, + "amplify": { + "content": [ + false, + false + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:10:03.204985783" + }, + "macrel": { + "content": [ + "sample_1.macrel.smorfs.faa.gz:md5,1b5e2434860e635e95324d1804a3be7b", + "sample_2.macrel.smorfs.faa.gz:md5,38108b5cdfdc2196afe67418b9b04682", + "sample_1.macrel.all_orfs.faa.gz:md5,86f6b3b590d1b22d9c5aa164f8a14080", + "sample_2.macrel.all_orfs.faa.gz:md5,fdb384925af50ecade05dccaff68afd8", + "sample_1.macrel.prediction.gz:md5,0c4b16e0838be56e012b99169863a168", + "sample_2.macrel.prediction.gz:md5,440deffd6b6d9986ce098e44c66db9ae", + "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", + "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", + "sample_1.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "sample_2.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:10:03.208256804" + }, + "amrfinderplus": { + "content": [ + "sample_1.tsv:md5,b4d261ace9be7d013c19d1f5c0005bfe", + "sample_2.tsv:md5,b4d261ace9be7d013c19d1f5c0005bfe" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:10:03.276435739" + } +} \ No newline at end of file diff --git a/tests/test_bgc_bakta.nf.test b/tests/test_bgc_bakta.nf.test new file mode 100644 index 00000000..37a0a0b1 --- /dev/null +++ b/tests/test_bgc_bakta.nf.test @@ -0,0 +1,45 @@ +nextflow_pipeline { + + name "Test pipeline: NFCORE_FUNCSCAN" + script "main.nf" + tag "pipeline" + tag "nfcore_funcscan" + tag "test_bgc_bakta" + + test("test_bgc_bakta_profile") { + + when { + params { + outdir = "$outputDir" + } + } + + then { + assertAll( + { assert workflow.success }, + { assert new File("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml").exists() }, + { assert new File("$outputDir/multiqc/multiqc_report.html").exists() }, + + // antiSMASH + { assert path("$outputDir/bgc/antismash/sample_2/sample_2.gbk").text.contains("##antiSMASH-Data-START##") }, // channel: gbk_input + { assert snapshot(path("$outputDir/bgc/antismash/sample_2/css")).match("antismash_css") }, // parts of channel: html_accessory_files + { assert path("$outputDir/bgc/antismash/sample_2/sample_2.zip").exists() }, // channel: zip + { assert path("$outputDir/bgc/antismash/sample_2/index.html").text.contains("https://antismash.secondarymetabolites.org/") }, // channel: html + { assert path("$outputDir/bgc/antismash/sample_2/regions.js").text.contains('NODE_861_length_4516_cov') }, // channel: json_sideloading + { assert path("$outputDir/bgc/antismash/sample_2/sample_2.log").text.contains("antiSMASH status: SUCCESS") }, // channel: log + + // DeepBGC + { assert snapshot(path("$outputDir/bgc/deepbgc/sample_2/sample_2.bgc.gbk")).match("deepbgc_bgc_gbk") }, // channel: bgc_gbk + { assert path("$outputDir/bgc/deepbgc/sample_2/sample_2.antismash.json").text.contains("Putative BGCs predicted using DeepBGC") }, // channel: json + { assert path("$outputDir/bgc/deepbgc/sample_2/LOG.txt").text.contains('Saved DeepBGC result to: sample_2') }, // channel: log + { assert path("$outputDir/bgc/deepbgc/sample_2/sample_2.full.gbk").text.contains('1 aaggggtatg gagcagcgac gtctacccgt') }, // channel: full_gbk + + // GECCO + { assert snapshot( + path("$outputDir/bgc/gecco/sample_2/sample_2.genes.tsv"), // channel: genes + path("$outputDir/bgc/gecco/sample_2/sample_2.features.tsv") // channel: features + ).match("gecco") } + ) + } + } +} diff --git a/tests/test_bgc_bakta.nf.test.snap b/tests/test_bgc_bakta.nf.test.snap new file mode 100644 index 00000000..e1856206 --- /dev/null +++ b/tests/test_bgc_bakta.nf.test.snap @@ -0,0 +1,35 @@ +{ + "antismash_css": { + "content": [ + [ + "bacteria.css:md5,39c0ca9cbc64cb824dc958b26b5b4ab8" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-12T16:30:18.349501125" + }, + "deepbgc_bgc_gbk": { + "content": [ + "sample_2.bgc.gbk:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-12T16:30:18.378687548" + }, + "gecco": { + "content": [ + "sample_2.genes.tsv:md5,66e3724c7e7da102bf58acd564211e8b", + "sample_2.features.tsv:md5,2ef146213836ca80d3079776f17c7cb2" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-12T16:30:18.404694725" + } +} \ No newline at end of file diff --git a/tests/test_bgc_prokka.nf.test b/tests/test_bgc_prokka.nf.test new file mode 100644 index 00000000..0fe53cd5 --- /dev/null +++ b/tests/test_bgc_prokka.nf.test @@ -0,0 +1,45 @@ +nextflow_pipeline { + + name "Test pipeline: NFCORE_FUNCSCAN" + script "main.nf" + tag "pipeline" + tag "nfcore_funcscan" + tag "test_bgc_prokka" + + test("test_bgc_prokka_profile") { + + when { + params { + outdir = "$outputDir" + } + } + + then { + assertAll( + { assert workflow.success }, + { assert new File("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml").exists() }, + { assert new File("$outputDir/multiqc/multiqc_report.html").exists() }, + + // antiSMASH + { assert path("$outputDir/bgc/antismash/sample_2/sample_2.gbk").text.contains("##antiSMASH-Data-START##") }, // channel: gbk_input + { assert snapshot(path("$outputDir/bgc/antismash/sample_2/css")).match("antismash_css") }, // parts of channel: html_accessory_files + { assert path("$outputDir/bgc/antismash/sample_2/sample_2.zip").exists() }, // channel: zip + { assert path("$outputDir/bgc/antismash/sample_2/index.html").text.contains("https://antismash.secondarymetabolites.org/") }, // channel: html + { assert path("$outputDir/bgc/antismash/sample_2/regions.js").text.contains('PROKKA_1') }, // channel: json_sideloading + { assert path("$outputDir/bgc/antismash/sample_2/sample_2.log").text.contains("antiSMASH status: SUCCESS") }, // channel: log + + // DeepBGC + { assert snapshot(path("$outputDir/bgc/deepbgc/sample_2/sample_2.bgc.gbk")).match("deepbgc_bgc_gbk") }, // channel: bgc_gbk + { assert path("$outputDir/bgc/deepbgc/sample_2/sample_2.antismash.json").text.contains("Putative BGCs predicted using DeepBGC") }, // channel: json + { assert path("$outputDir/bgc/deepbgc/sample_2/LOG.txt").text.contains('Saved DeepBGC result to: sample_2') }, // channel: log + { assert path("$outputDir/bgc/deepbgc/sample_2/sample_2.full.gbk").text.contains('1 aaggggtatg gagcagcgac gtctacccgt') }, // channel: full_gbk + + // GECCO + { assert snapshot( + path("$outputDir/bgc/gecco/sample_2/sample_2.genes.tsv"), // channel: genes + path("$outputDir/bgc/gecco/sample_2/sample_2.features.tsv") // channel: features + ).match("gecco") } + ) + } + } +} diff --git a/tests/test_bgc_prokka.nf.test.snap b/tests/test_bgc_prokka.nf.test.snap new file mode 100644 index 00000000..8f7ceed5 --- /dev/null +++ b/tests/test_bgc_prokka.nf.test.snap @@ -0,0 +1,35 @@ +{ + "antismash_css": { + "content": [ + [ + "bacteria.css:md5,39c0ca9cbc64cb824dc958b26b5b4ab8" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-12T16:06:37.879464917" + }, + "deepbgc_bgc_gbk": { + "content": [ + "sample_2.bgc.gbk:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-12T16:06:37.920624113" + }, + "gecco": { + "content": [ + "sample_2.genes.tsv:md5,050b82ca462430ecc0635acb2e297531", + "sample_2.features.tsv:md5,79354868ee3de6fdc419195b8fa8edb6" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-12T16:06:37.944935473" + } +} diff --git a/tests/test_bgc_pyrodigal.nf.test b/tests/test_bgc_pyrodigal.nf.test new file mode 100644 index 00000000..cab97577 --- /dev/null +++ b/tests/test_bgc_pyrodigal.nf.test @@ -0,0 +1,45 @@ +nextflow_pipeline { + + name "Test pipeline: NFCORE_FUNCSCAN" + script "main.nf" + tag "pipeline" + tag "nfcore_funcscan" + tag "test_bgc_pyrodigal" + + test("test_bgc_pyrodigal_profile") { + + when { + params { + outdir = "$outputDir" + } + } + + then { + assertAll( + { assert workflow.success }, + { assert new File("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml").exists() }, + { assert new File("$outputDir/multiqc/multiqc_report.html").exists() }, + + // antiSMASH + { assert path("$outputDir/bgc/antismash/sample_2/sample_2.gbk").text.contains("##antiSMASH-Data-START##") }, // channel: gbk_input + { assert snapshot(path("$outputDir/bgc/antismash/sample_2/css")).match("antismash_css") }, // parts of channel: html_accessory_files + { assert path("$outputDir/bgc/antismash/sample_2/sample_2.zip").exists() }, // channel: zip + { assert path("$outputDir/bgc/antismash/sample_2/index.html").text.contains("https://antismash.secondarymetabolites.org/") }, // channel: html + { assert path("$outputDir/bgc/antismash/sample_2/regions.js").text.contains('NODE_861_length_4516_cov') }, // channel: json_sideloading + { assert path("$outputDir/bgc/antismash/sample_2/sample_2.log").text.contains("antiSMASH status: SUCCESS") }, // channel: log + + // DeepBGC + { assert snapshot(path("$outputDir/bgc/deepbgc/sample_2/sample_2.bgc.gbk")).match("deepbgc_bgc_gbk") }, // channel: bgc_gbk + { assert path("$outputDir/bgc/deepbgc/sample_2/sample_2.antismash.json").text.contains("NODE_861_length_4516_cov_2.736606") }, // channel: json + { assert path("$outputDir/bgc/deepbgc/sample_2/LOG.txt").text.contains('Saved DeepBGC result to: sample_2') }, // channel: log + { assert path("$outputDir/bgc/deepbgc/sample_2/sample_2.full.gbk").text.contains('1 aaggggtatg gagcagcgac gtctacccgt') }, // channel: full_gbk + + // GECCO + { assert snapshot( + path("$outputDir/bgc/gecco/sample_2/sample_2.genes.tsv"), // channel: genes + path("$outputDir/bgc/gecco/sample_2/sample_2.features.tsv") // channel: features + ).match("gecco") } + ) + } + } +} diff --git a/tests/test_bgc_pyrodigal.nf.test.snap b/tests/test_bgc_pyrodigal.nf.test.snap new file mode 100644 index 00000000..0017244d --- /dev/null +++ b/tests/test_bgc_pyrodigal.nf.test.snap @@ -0,0 +1,35 @@ +{ + "antismash_css": { + "content": [ + [ + "bacteria.css:md5,39c0ca9cbc64cb824dc958b26b5b4ab8" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-19T12:49:25.720352923" + }, + "deepbgc_bgc_gbk": { + "content": [ + "sample_2.bgc.gbk:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-19T13:05:44.435766452" + }, + "gecco": { + "content": [ + "sample_2.genes.tsv:md5,66e3724c7e7da102bf58acd564211e8b", + "sample_2.features.tsv:md5,2ef146213836ca80d3079776f17c7cb2" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-19T12:49:25.732866237" + } +} \ No newline at end of file diff --git a/tests/test_full.nf.test b/tests/test_full.nf.test new file mode 100644 index 00000000..93303734 --- /dev/null +++ b/tests/test_full.nf.test @@ -0,0 +1,306 @@ +nextflow_pipeline { + + name "Test pipeline: NFCORE_FUNCSCAN" + script "main.nf" + tag "pipeline" + tag "nfcore_funcscan" + tag "test_full" + + test("test_full_profile") { + + when { + params { + outdir = "$outputDir" + } + } + + then { + assertAll( + { assert workflow.success }, + { assert new File("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml").exists() }, + { assert new File("$outputDir/multiqc/multiqc_report.html").exists() }, + + // AMP workflow + + // AMPir + { assert snapshot( + path("$outputDir/amp/ampir/ERZ1664501/ERZ1664501.ampir.tsv"), + path("$outputDir/amp/ampir/ERZ1664503/ERZ1664503.ampir.tsv"), + path("$outputDir/amp/ampir/ERZ1664504/ERZ1664504.ampir.tsv"), + path("$outputDir/amp/ampir/ERZ1664505/ERZ1664505.ampir.tsv"), + path("$outputDir/amp/ampir/ERZ1664506/ERZ1664506.ampir.tsv"), + path("$outputDir/amp/ampir/ERZ1664507/ERZ1664507.ampir.tsv"), + path("$outputDir/amp/ampir/ERZ1664508/ERZ1664508.ampir.tsv"), + path("$outputDir/amp/ampir/ERZ1664509/ERZ1664509.ampir.tsv"), + path("$outputDir/amp/ampir/ERZ1664510/ERZ1664510.ampir.tsv"), + path("$outputDir/amp/ampir/ERZ1664511/ERZ1664511.ampir.tsv"), + path("$outputDir/amp/ampir/ERZ1664515/ERZ1664515.ampir.tsv"), + path("$outputDir/amp/ampir/ERZ1664516/ERZ1664516.ampir.tsv"), + path("$outputDir/amp/ampir/ERZ1664517/ERZ1664517.ampir.tsv"), + path("$outputDir/amp/ampir/ERZ1664518/ERZ1664518.ampir.tsv"), + path("$outputDir/amp/ampir/ERZ1664520/ERZ1664520.ampir.tsv"), + path("$outputDir/amp/ampir/ERZ1664521/ERZ1664521.ampir.tsv"), + path("$outputDir/amp/ampir/ERZ1664523/ERZ1664523.ampir.tsv"), + path("$outputDir/amp/ampir/ERZ1664524/ERZ1664524.ampir.tsv"), + path("$outputDir/amp/ampir/ERZ1664528/ERZ1664528.ampir.tsv"), + path("$outputDir/amp/ampir/ERZ1664501/ERZ1664501.ampir.faa"), + path("$outputDir/amp/ampir/ERZ1664503/ERZ1664503.ampir.faa"), + path("$outputDir/amp/ampir/ERZ1664504/ERZ1664504.ampir.faa"), + path("$outputDir/amp/ampir/ERZ1664505/ERZ1664505.ampir.faa"), + path("$outputDir/amp/ampir/ERZ1664506/ERZ1664506.ampir.faa"), + path("$outputDir/amp/ampir/ERZ1664507/ERZ1664507.ampir.faa"), + path("$outputDir/amp/ampir/ERZ1664508/ERZ1664508.ampir.faa"), + path("$outputDir/amp/ampir/ERZ1664509/ERZ1664509.ampir.faa"), + path("$outputDir/amp/ampir/ERZ1664510/ERZ1664510.ampir.faa"), + path("$outputDir/amp/ampir/ERZ1664511/ERZ1664511.ampir.faa"), + path("$outputDir/amp/ampir/ERZ1664515/ERZ1664515.ampir.faa"), + path("$outputDir/amp/ampir/ERZ1664516/ERZ1664516.ampir.faa"), + path("$outputDir/amp/ampir/ERZ1664517/ERZ1664517.ampir.faa"), + path("$outputDir/amp/ampir/ERZ1664518/ERZ1664518.ampir.faa"), + path("$outputDir/amp/ampir/ERZ1664520/ERZ1664520.ampir.faa"), + path("$outputDir/amp/ampir/ERZ1664521/ERZ1664521.ampir.faa"), + path("$outputDir/amp/ampir/ERZ1664523/ERZ1664523.ampir.faa"), + path("$outputDir/amp/ampir/ERZ1664524/ERZ1664524.ampir.faa"), + path("$outputDir/amp/ampir/ERZ1664528/ERZ1664528.ampir.faa") + ).match("ampir") }, + + // HMMsearch + { assert new File("$outputDir/amp/hmmer_hmmsearch/ERZ1664501/ERZ1664501_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + { assert new File("$outputDir/amp/hmmer_hmmsearch/ERZ1664503/ERZ1664503_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + { assert new File("$outputDir/amp/hmmer_hmmsearch/ERZ1664504/ERZ1664504_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + { assert new File("$outputDir/amp/hmmer_hmmsearch/ERZ1664506/ERZ1664506_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + { assert new File("$outputDir/amp/hmmer_hmmsearch/ERZ1664507/ERZ1664507_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + { assert new File("$outputDir/amp/hmmer_hmmsearch/ERZ1664508/ERZ1664508_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + { assert new File("$outputDir/amp/hmmer_hmmsearch/ERZ1664509/ERZ1664509_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + { assert new File("$outputDir/amp/hmmer_hmmsearch/ERZ1664510/ERZ1664510_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + { assert new File("$outputDir/amp/hmmer_hmmsearch/ERZ1664511/ERZ1664511_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + { assert new File("$outputDir/amp/hmmer_hmmsearch/ERZ1664515/ERZ1664515_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + { assert new File("$outputDir/amp/hmmer_hmmsearch/ERZ1664516/ERZ1664516_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + { assert new File("$outputDir/amp/hmmer_hmmsearch/ERZ1664517/ERZ1664517_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + { assert new File("$outputDir/amp/hmmer_hmmsearch/ERZ1664518/ERZ1664518_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + { assert new File("$outputDir/amp/hmmer_hmmsearch/ERZ1664520/ERZ1664520_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + { assert new File("$outputDir/amp/hmmer_hmmsearch/ERZ1664521/ERZ1664521_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + { assert new File("$outputDir/amp/hmmer_hmmsearch/ERZ1664523/ERZ1664523_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + { assert new File("$outputDir/amp/hmmer_hmmsearch/ERZ1664523/ERZ1664523_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + { assert new File("$outputDir/amp/hmmer_hmmsearch/ERZ1664524/ERZ1664524_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + { assert new File("$outputDir/amp/hmmer_hmmsearch/ERZ1664528/ERZ1664528_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + + // Macrel + { assert snapshot( + path("$outputDir/amp/macrel/ERZ1664501.macrel/ERZ1664501.macrel.prediction.gz"), + path("$outputDir/amp/macrel/ERZ1664503.macrel/ERZ1664503.macrel.prediction.gz"), + path("$outputDir/amp/macrel/ERZ1664504.macrel/ERZ1664504.macrel.prediction.gz"), + path("$outputDir/amp/macrel/ERZ1664505.macrel/ERZ1664505.macrel.prediction.gz"), + path("$outputDir/amp/macrel/ERZ1664506.macrel/ERZ1664506.macrel.prediction.gz"), + path("$outputDir/amp/macrel/ERZ1664507.macrel/ERZ1664507.macrel.prediction.gz"), + path("$outputDir/amp/macrel/ERZ1664508.macrel/ERZ1664508.macrel.prediction.gz"), + path("$outputDir/amp/macrel/ERZ1664509.macrel/ERZ1664509.macrel.prediction.gz"), + path("$outputDir/amp/macrel/ERZ1664510.macrel/ERZ1664510.macrel.prediction.gz"), + path("$outputDir/amp/macrel/ERZ1664511.macrel/ERZ1664511.macrel.prediction.gz"), + path("$outputDir/amp/macrel/ERZ1664515.macrel/ERZ1664515.macrel.prediction.gz"), + path("$outputDir/amp/macrel/ERZ1664516.macrel/ERZ1664516.macrel.prediction.gz"), + path("$outputDir/amp/macrel/ERZ1664517.macrel/ERZ1664517.macrel.prediction.gz"), + path("$outputDir/amp/macrel/ERZ1664518.macrel/ERZ1664518.macrel.prediction.gz"), + path("$outputDir/amp/macrel/ERZ1664520.macrel/ERZ1664520.macrel.prediction.gz"), + path("$outputDir/amp/macrel/ERZ1664521.macrel/ERZ1664521.macrel.prediction.gz"), + path("$outputDir/amp/macrel/ERZ1664523.macrel/ERZ1664523.macrel.prediction.gz"), + path("$outputDir/amp/macrel/ERZ1664524.macrel/ERZ1664524.macrel.prediction.gz"), + path("$outputDir/amp/macrel/ERZ1664528.macrel/ERZ1664528.macrel.prediction.gz") + ).match("macrel") }, + + // AMPcombi + { assert path("$outputDir/reports/ampcombi2/Ampcombi_summary.tsv").text.contains("ERZ1664515.11560-NODE-11560-length-551-cov-1.403226_2") }, + + // ARG workflow + + // DeepARG + { assert snapshot( + path("$outputDir/arg/deeparg/ERZ1664501/ERZ1664501.mapping.ARG"), + path("$outputDir/arg/deeparg/ERZ1664503/ERZ1664503.mapping.ARG"), + path("$outputDir/arg/deeparg/ERZ1664504/ERZ1664504.mapping.ARG"), + path("$outputDir/arg/deeparg/ERZ1664505/ERZ1664505.mapping.ARG"), + path("$outputDir/arg/deeparg/ERZ1664506/ERZ1664506.mapping.ARG"), + path("$outputDir/arg/deeparg/ERZ1664507/ERZ1664507.mapping.ARG"), + path("$outputDir/arg/deeparg/ERZ1664508/ERZ1664508.mapping.ARG"), + path("$outputDir/arg/deeparg/ERZ1664509/ERZ1664509.mapping.ARG"), + path("$outputDir/arg/deeparg/ERZ1664510/ERZ1664510.mapping.ARG"), + path("$outputDir/arg/deeparg/ERZ1664511/ERZ1664511.mapping.ARG"), + path("$outputDir/arg/deeparg/ERZ1664515/ERZ1664515.mapping.ARG"), + path("$outputDir/arg/deeparg/ERZ1664516/ERZ1664516.mapping.ARG"), + path("$outputDir/arg/deeparg/ERZ1664517/ERZ1664517.mapping.ARG"), + path("$outputDir/arg/deeparg/ERZ1664518/ERZ1664518.mapping.ARG"), + path("$outputDir/arg/deeparg/ERZ1664520/ERZ1664520.mapping.ARG"), + path("$outputDir/arg/deeparg/ERZ1664521/ERZ1664521.mapping.ARG"), + path("$outputDir/arg/deeparg/ERZ1664523/ERZ1664523.mapping.ARG"), + path("$outputDir/arg/deeparg/ERZ1664524/ERZ1664524.mapping.ARG"), + path("$outputDir/arg/deeparg/ERZ1664528/ERZ1664528.mapping.ARG") + ).match("deeparg") }, + + { assert new File("$outputDir/arg/deeparg/ERZ1664501/ERZ1664501.align.daa").exists() }, + { assert new File("$outputDir/arg/deeparg/ERZ1664503/ERZ1664503.align.daa").exists() }, + { assert new File("$outputDir/arg/deeparg/ERZ1664504/ERZ1664504.align.daa").exists() }, + { assert new File("$outputDir/arg/deeparg/ERZ1664505/ERZ1664505.align.daa").exists() }, + { assert new File("$outputDir/arg/deeparg/ERZ1664506/ERZ1664506.align.daa").exists() }, + { assert new File("$outputDir/arg/deeparg/ERZ1664507/ERZ1664507.align.daa").exists() }, + { assert new File("$outputDir/arg/deeparg/ERZ1664508/ERZ1664508.align.daa").exists() }, + { assert new File("$outputDir/arg/deeparg/ERZ1664509/ERZ1664509.align.daa").exists() }, + { assert new File("$outputDir/arg/deeparg/ERZ1664510/ERZ1664510.align.daa").exists() }, + { assert new File("$outputDir/arg/deeparg/ERZ1664511/ERZ1664511.align.daa").exists() }, + { assert new File("$outputDir/arg/deeparg/ERZ1664515/ERZ1664515.align.daa").exists() }, + { assert new File("$outputDir/arg/deeparg/ERZ1664516/ERZ1664516.align.daa").exists() }, + { assert new File("$outputDir/arg/deeparg/ERZ1664517/ERZ1664517.align.daa").exists() }, + { assert new File("$outputDir/arg/deeparg/ERZ1664518/ERZ1664518.align.daa").exists() }, + { assert new File("$outputDir/arg/deeparg/ERZ1664520/ERZ1664520.align.daa").exists() }, + { assert new File("$outputDir/arg/deeparg/ERZ1664521/ERZ1664521.align.daa").exists() }, + { assert new File("$outputDir/arg/deeparg/ERZ1664523/ERZ1664523.align.daa").exists() }, + { assert new File("$outputDir/arg/deeparg/ERZ1664524/ERZ1664524.align.daa").exists() }, + { assert new File("$outputDir/arg/deeparg/ERZ1664528/ERZ1664528.align.daa").exists() }, + + // ABRicate + { assert snapshot( + path("$outputDir/arg/abricate/ERZ1664501/ERZ1664501.txt"), + path("$outputDir/arg/abricate/ERZ1664503/ERZ1664503.txt"), + path("$outputDir/arg/abricate/ERZ1664504/ERZ1664504.txt"), + path("$outputDir/arg/abricate/ERZ1664505/ERZ1664505.txt"), + path("$outputDir/arg/abricate/ERZ1664506/ERZ1664506.txt"), + path("$outputDir/arg/abricate/ERZ1664507/ERZ1664507.txt"), + path("$outputDir/arg/abricate/ERZ1664508/ERZ1664508.txt"), + path("$outputDir/arg/abricate/ERZ1664509/ERZ1664509.txt"), + path("$outputDir/arg/abricate/ERZ1664510/ERZ1664510.txt"), + path("$outputDir/arg/abricate/ERZ1664511/ERZ1664511.txt"), + path("$outputDir/arg/abricate/ERZ1664515/ERZ1664515.txt"), + path("$outputDir/arg/abricate/ERZ1664516/ERZ1664516.txt"), + path("$outputDir/arg/abricate/ERZ1664517/ERZ1664517.txt"), + path("$outputDir/arg/abricate/ERZ1664518/ERZ1664518.txt"), + path("$outputDir/arg/abricate/ERZ1664520/ERZ1664520.txt"), + path("$outputDir/arg/abricate/ERZ1664521/ERZ1664521.txt"), + path("$outputDir/arg/abricate/ERZ1664523/ERZ1664523.txt"), + path("$outputDir/arg/abricate/ERZ1664524/ERZ1664524.txt"), + path("$outputDir/arg/abricate/ERZ1664528/ERZ1664528.txt") + ).match("abricate") }, + + // AMRFinderPlus + { assert snapshot( + path("$outputDir/arg/amrfinderplus/ERZ1664501/ERZ1664501.tsv"), + path("$outputDir/arg/amrfinderplus/ERZ1664503/ERZ1664503.tsv"), + path("$outputDir/arg/amrfinderplus/ERZ1664504/ERZ1664504.tsv"), + path("$outputDir/arg/amrfinderplus/ERZ1664505/ERZ1664505.tsv"), + path("$outputDir/arg/amrfinderplus/ERZ1664506/ERZ1664506.tsv"), + path("$outputDir/arg/amrfinderplus/ERZ1664507/ERZ1664507.tsv"), + path("$outputDir/arg/amrfinderplus/ERZ1664508/ERZ1664508.tsv"), + path("$outputDir/arg/amrfinderplus/ERZ1664509/ERZ1664509.tsv"), + path("$outputDir/arg/amrfinderplus/ERZ1664510/ERZ1664510.tsv"), + path("$outputDir/arg/amrfinderplus/ERZ1664511/ERZ1664511.tsv"), + path("$outputDir/arg/amrfinderplus/ERZ1664515/ERZ1664515.tsv"), + path("$outputDir/arg/amrfinderplus/ERZ1664516/ERZ1664516.tsv"), + path("$outputDir/arg/amrfinderplus/ERZ1664517/ERZ1664517.tsv"), + path("$outputDir/arg/amrfinderplus/ERZ1664518/ERZ1664518.tsv"), + path("$outputDir/arg/amrfinderplus/ERZ1664520/ERZ1664520.tsv"), + path("$outputDir/arg/amrfinderplus/ERZ1664521/ERZ1664521.tsv"), + path("$outputDir/arg/amrfinderplus/ERZ1664523/ERZ1664523.tsv"), + path("$outputDir/arg/amrfinderplus/ERZ1664524/ERZ1664524.tsv"), + path("$outputDir/arg/amrfinderplus/ERZ1664528/ERZ1664528.tsv") + ).match("amrfinderplus") }, + + // RGI + { assert snapshot( + path("$outputDir/arg/rgi/ERZ1664501/ERZ1664501.txt"), + path("$outputDir/arg/rgi/ERZ1664503/ERZ1664503.txt"), + path("$outputDir/arg/rgi/ERZ1664504/ERZ1664504.txt"), + path("$outputDir/arg/rgi/ERZ1664505/ERZ1664505.txt"), + path("$outputDir/arg/rgi/ERZ1664506/ERZ1664506.txt"), + path("$outputDir/arg/rgi/ERZ1664507/ERZ1664507.txt"), + path("$outputDir/arg/rgi/ERZ1664508/ERZ1664508.txt"), + path("$outputDir/arg/rgi/ERZ1664509/ERZ1664509.txt"), + path("$outputDir/arg/rgi/ERZ1664510/ERZ1664510.txt"), + path("$outputDir/arg/rgi/ERZ1664511/ERZ1664511.txt"), + path("$outputDir/arg/rgi/ERZ1664515/ERZ1664515.txt"), + path("$outputDir/arg/rgi/ERZ1664516/ERZ1664516.txt"), + path("$outputDir/arg/rgi/ERZ1664517/ERZ1664517.txt"), + path("$outputDir/arg/rgi/ERZ1664518/ERZ1664518.txt"), + path("$outputDir/arg/rgi/ERZ1664520/ERZ1664520.txt"), + path("$outputDir/arg/rgi/ERZ1664521/ERZ1664521.txt"), + path("$outputDir/arg/rgi/ERZ1664523/ERZ1664523.txt"), + path("$outputDir/arg/rgi/ERZ1664524/ERZ1664524.txt"), + path("$outputDir/arg/rgi/ERZ1664528/ERZ1664528.txt") + ).match("rgi") }, + + // fARGene + { assert snapshot( + path("$outputDir/arg/fargene/ERZ1664501/class_a/results_summary.txt"), + path("$outputDir/arg/fargene/ERZ1664503/class_a/results_summary.txt"), + path("$outputDir/arg/fargene/ERZ1664504/class_a/results_summary.txt"), + path("$outputDir/arg/fargene/ERZ1664505/class_a/results_summary.txt"), + path("$outputDir/arg/fargene/ERZ1664506/class_a/results_summary.txt"), + path("$outputDir/arg/fargene/ERZ1664507/class_a/results_summary.txt"), + path("$outputDir/arg/fargene/ERZ1664508/class_a/results_summary.txt"), + path("$outputDir/arg/fargene/ERZ1664509/class_a/results_summary.txt"), + path("$outputDir/arg/fargene/ERZ1664510/class_a/results_summary.txt"), + path("$outputDir/arg/fargene/ERZ1664511/class_a/results_summary.txt"), + path("$outputDir/arg/fargene/ERZ1664515/class_a/results_summary.txt"), + path("$outputDir/arg/fargene/ERZ1664516/class_a/results_summary.txt"), + path("$outputDir/arg/fargene/ERZ1664517/class_a/results_summary.txt"), + path("$outputDir/arg/fargene/ERZ1664518/class_a/results_summary.txt"), + path("$outputDir/arg/fargene/ERZ1664520/class_a/results_summary.txt"), + path("$outputDir/arg/fargene/ERZ1664521/class_a/results_summary.txt"), + path("$outputDir/arg/fargene/ERZ1664523/class_a/results_summary.txt"), + path("$outputDir/arg/fargene/ERZ1664524/class_a/results_summary.txt"), + path("$outputDir/arg/fargene/ERZ1664528/class_a/results_summary.txt") + ).match("fargene") }, + + // hAMRonization + { assert snapshot(path("$outputDir/reports/hamronization_summarize/hamronization_combined_report.tsv")).match("hamronization_summarize") }, + + // BGC workflow + + // antiSMASH + { assert snapshot( + path("$outputDir/bgc/antismash/ERZ1664501/ERZ1664501.gbk").text.contains("ccgcccatat cctttctgtc accgactcgg"), + path("$outputDir/bgc/antismash/ERZ1664503/ERZ1664503.gbk").text.contains("agaaggaacc gagcttgata aaacctatgc"), + path("$outputDir/bgc/antismash/ERZ1664504/ERZ1664504.gbk").text.contains("aggcaatacc ggctccaaca acagcagatt"), + path("$outputDir/bgc/antismash/ERZ1664505/ERZ1664505.gbk").text.contains("agggccacgc acacgggctc ggtgcacccc"), + path("$outputDir/bgc/antismash/ERZ1664506/ERZ1664506.gbk").text.contains("acaggatgga gcattgacta cattctggat"), + path("$outputDir/bgc/antismash/ERZ1664507/ERZ1664507.gbk").text.contains("aaagcaggaa aaagctgata acgcccgccc"), + path("$outputDir/bgc/antismash/ERZ1664508/ERZ1664508.gbk").text.contains("gggccgtttc gcggtaggcc tggttcatat"), + path("$outputDir/bgc/antismash/ERZ1664509/ERZ1664509.gbk").text.contains("aagcagtggg tctaaggcga agtcataccc"), + path("$outputDir/bgc/antismash/ERZ1664510/ERZ1664510.gbk").text.contains("ttcgcgataa agcgttccaa tggggatgag"), + path("$outputDir/bgc/antismash/ERZ1664511/ERZ1664511.gbk").text.contains("tttttgggaa cggcgtccgt tctcaaagag"), + path("$outputDir/bgc/antismash/ERZ1664515/ERZ1664515.gbk").text.contains("tattgcaaac atatcaagca ccttcccttc"), + path("$outputDir/bgc/antismash/ERZ1664516/ERZ1664516.gbk").text.contains("aactccctgg ttgaaccggc cgtaatactt"), + path("$outputDir/bgc/antismash/ERZ1664517/ERZ1664517.gbk").text.contains("gacgctttct ttcagaaacg ttttcccctt"), + path("$outputDir/bgc/antismash/ERZ1664518/ERZ1664518.gbk").text.contains("cagcgcataa gtctgcgtca cctgtcccag"), + path("$outputDir/bgc/antismash/ERZ1664520/ERZ1664520.gbk").text.contains("ggagtttttg cgctttgacc gccacgggga"), + path("$outputDir/bgc/antismash/ERZ1664521/ERZ1664521.gbk").text.contains("ggtaaaggaa accatccggc ggccaatctg"), + path("$outputDir/bgc/antismash/ERZ1664523/ERZ1664523.gbk").text.contains("gctgtgggga tgggtaagcg aggatgatgc"), + path("$outputDir/bgc/antismash/ERZ1664524/ERZ1664524.gbk").text.contains("ataatggctt cttttataaa tgcataaatt"), + path("$outputDir/bgc/antismash/ERZ1664528/ERZ1664528.gbk").text.contains("cagaaagaag aaaaacgcct gacttgggcg") + ).match("antismash") }, + + // GECCO + { assert snapshot( + path("$outputDir/bgc/gecco/ERZ1664504/ERZ1664504.220-NODE-220-length-4587-cov-2.552957_cluster_1.gbk"), + path("$outputDir/bgc/gecco/ERZ1664504/ERZ1664504.48-NODE-48-length-9582-cov-5.239425_cluster_1.gbk"), + path("$outputDir/bgc/gecco/ERZ1664506/ERZ1664506.42-NODE-42-length-11967-cov-6.006380_cluster_1.gbk"), + path("$outputDir/bgc/gecco/ERZ1664508/ERZ1664508.3061-NODE-3061-length-1263-cov-3.647351_cluster_1.gbk"), + path("$outputDir/bgc/gecco/ERZ1664510/ERZ1664510.123-NODE-123-length-8863-cov-8.649410_cluster_1.gbk"), + path("$outputDir/bgc/gecco/ERZ1664510/ERZ1664510.210-NODE-210-length-5173-cov-7.860688_cluster_1.gbk"), + path("$outputDir/bgc/gecco/ERZ1664511/ERZ1664511.16-NODE-16-length-49668-cov-9.810473_cluster_1.gbk"), + path("$outputDir/bgc/gecco/ERZ1664515/ERZ1664515.9-NODE-9-length-49063-cov-10.926196_cluster_1.gbk"), + path("$outputDir/bgc/gecco/ERZ1664516/ERZ1664516.158-NODE-158-length-6232-cov-9.863850_cluster_1.gbk"), + path("$outputDir/bgc/gecco/ERZ1664517/ERZ1664517.38-NODE-38-length-19981-cov-8.613771_cluster_1.gbk"), + path("$outputDir/bgc/gecco/ERZ1664518/ERZ1664518.217-NODE-217-length-4457-cov-6.415947_cluster_1.gbk"), + path("$outputDir/bgc/gecco/ERZ1664521/ERZ1664521.1871-NODE-1871-length-1473-cov-1.858251_cluster_1.gbk"), + path("$outputDir/bgc/gecco/ERZ1664521/ERZ1664521.895-NODE-895-length-1964-cov-2.221058_cluster_1.gbk"), + path("$outputDir/bgc/gecco/ERZ1664523/ERZ1664523.16-NODE-16-length-15072-cov-6.654591_cluster_1.gbk"), + path("$outputDir/bgc/gecco/ERZ1664524/ERZ1664524.1150-NODE-1150-length-2386-cov-3.450879_cluster_1.gbk"), + path("$outputDir/bgc/gecco/ERZ1664524/ERZ1664524.54-NODE-54-length-9607-cov-5.345582_cluster_1.gbk"), + path("$outputDir/bgc/gecco/ERZ1664528/ERZ1664528.138-NODE-138-length-5805-cov-4.599304_cluster_1.gbk"), + path("$outputDir/bgc/gecco/ERZ1664528/ERZ1664528.1641-NODE-1641-length-2049-cov-4.697091_cluster_1.gbk") + ).match("gecco") }, + + // comBGC + { assert snapshot("$outputDir/reports/combgc/combgc_complete_summary.tsv") } + ) + } + } +} diff --git a/tests/test_full.nf.test.snap b/tests/test_full.nf.test.snap new file mode 100644 index 00000000..d0f96abc --- /dev/null +++ b/tests/test_full.nf.test.snap @@ -0,0 +1,282 @@ +{ + "hamronization_summarize": { + "content": [ + "hamronization_combined_report.tsv:md5,5a75323ff27acde627a2c3b6a8dc1539" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.1" + }, + "timestamp": "2024-07-12T08:17:19.099809903" + }, + "abricate": { + "content": [ + "ERZ1664501.txt:md5,1ace32d2d44194d635db31daa89a6fae", + "ERZ1664503.txt:md5,da890e2cef1b1a34ec035f6198f0a60b", + "ERZ1664504.txt:md5,3db1864a6efe5321379e89dcee34d505", + "ERZ1664505.txt:md5,317354f6091bad44ab5852399d48eb4a", + "ERZ1664506.txt:md5,8fcc568d6a15d1c3ac889169ce884093", + "ERZ1664507.txt:md5,0be8f76b35aca900f8f7fa6d2e7fc1f9", + "ERZ1664508.txt:md5,357da5e192d9a17b501446e181f41942", + "ERZ1664509.txt:md5,c14f4aef2c96e8c4f6688af35fe07a2c", + "ERZ1664510.txt:md5,0d88060e28b267a308271a2a2af38b12", + "ERZ1664511.txt:md5,46adf11d5d3952e3709ba05ec76b5e8a", + "ERZ1664515.txt:md5,4b7a0db47ac6e9baf723e6b2ef31bfc4", + "ERZ1664516.txt:md5,1ccfd94077fe329f7b30351aa846b327", + "ERZ1664517.txt:md5,8137ab84373a5300c9626a9459a2c935", + "ERZ1664518.txt:md5,db514f4bef8de0d4799f478e1807adc6", + "ERZ1664520.txt:md5,a3afa2368c941cdb0c4abd8efa855f0e", + "ERZ1664521.txt:md5,2849a78188c4793d4608ba1775da1d58", + "ERZ1664523.txt:md5,507e1710e7220965010ad8375b4c434a", + "ERZ1664524.txt:md5,b7d380fe3fbcb0fe2ac23823cb6b35e8", + "ERZ1664528.txt:md5,64aff1aaaab8b3d009edd40527446c08" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-02T20:18:29.527514564" + }, + "fargene": { + "content": [ + "results_summary.txt:md5,3061d75086b3d25605eda0ea05e1c927", + "results_summary.txt:md5,ea00de6524c521e06583ee13ffbcf338", + "results_summary.txt:md5,c5a6205a249cb6112b6235bbab51c60d", + "results_summary.txt:md5,c5a6205a249cb6112b6235bbab51c60d", + "results_summary.txt:md5,cc647b7810c7335edb6aa939f9f0fbde", + "results_summary.txt:md5,fa58a7f510100be20ce22fe3f6b036e3", + "results_summary.txt:md5,33b51ce0c8ba7c65bdb8bfe1480d85cb", + "results_summary.txt:md5,fa58a7f510100be20ce22fe3f6b036e3", + "results_summary.txt:md5,f3f36761cda3fbb23e0250f9b0b6657a", + "results_summary.txt:md5,f3f36761cda3fbb23e0250f9b0b6657a", + "results_summary.txt:md5,657d012f697a1a9e3ce7f8a0f675aed0", + "results_summary.txt:md5,f3f36761cda3fbb23e0250f9b0b6657a", + "results_summary.txt:md5,f3f36761cda3fbb23e0250f9b0b6657a", + "results_summary.txt:md5,c5a6205a249cb6112b6235bbab51c60d", + "results_summary.txt:md5,33b51ce0c8ba7c65bdb8bfe1480d85cb", + "results_summary.txt:md5,54ba6a1a657fea6b78abac50820c2c24", + "results_summary.txt:md5,f3f36761cda3fbb23e0250f9b0b6657a", + "results_summary.txt:md5,f3f36761cda3fbb23e0250f9b0b6657a", + "results_summary.txt:md5,cc647b7810c7335edb6aa939f9f0fbde" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-02T20:18:41.345458618" + }, + "rgi": { + "content": [ + "ERZ1664501.txt:md5,631580295a01dfa9942a84ec6daddb7e", + "ERZ1664503.txt:md5,19b414d2f84d99e7da99558f13ddc3e5", + "ERZ1664504.txt:md5,35cfd6af482966669d98a65b56331a3d", + "ERZ1664505.txt:md5,d9f983090909140617bc784635220c4b", + "ERZ1664506.txt:md5,7a52f37f5672b06b05741ee058391f8f", + "ERZ1664507.txt:md5,721b11a0d9a16cbcbfd9004478b00600", + "ERZ1664508.txt:md5,b216d24eb67e17b00176fd0e9fddee2d", + "ERZ1664509.txt:md5,a83a12f5eee2817adde168ceea2918c5", + "ERZ1664510.txt:md5,648ff158c4eb26a5ea32d784f035919e", + "ERZ1664511.txt:md5,9bae24f90a3ec78bf949a98fdf22a497", + "ERZ1664515.txt:md5,2d0d0b2f048fa6c28840b1b6a2c9454d", + "ERZ1664516.txt:md5,eb69d148d8dad471c8d9a36dd915f4a4", + "ERZ1664517.txt:md5,79b0f80950eb5f0f51542b394a77a173", + "ERZ1664518.txt:md5,887de51b7632b0c635b0fe6deda75266", + "ERZ1664520.txt:md5,3caf2e1b0afcbfb73522bfa1cee1d06e", + "ERZ1664521.txt:md5,19334a653a98bbced73f1f2ec92e4eb8", + "ERZ1664523.txt:md5,0e47ce5c41d4d0d39d270a18ce62773a", + "ERZ1664524.txt:md5,8ca49d7dee9c7de25910de130de93859", + "ERZ1664528.txt:md5,6a10752196f2f33bcee972d15d669803" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-02T20:18:37.337052941" + }, + "deeparg": { + "content": [ + "ERZ1664501.mapping.ARG:md5,a4641ca28291c73f4ce664af575a4811", + "ERZ1664503.mapping.ARG:md5,c217c176a55170cf7f342dd6b082bec6", + "ERZ1664504.mapping.ARG:md5,2f2a6297dc8752766f65f2b3e966158d", + "ERZ1664505.mapping.ARG:md5,be741b562796026b46f649c8fbe6e73d", + "ERZ1664506.mapping.ARG:md5,17122078c5b1821ea9d841eb1775e987", + "ERZ1664507.mapping.ARG:md5,6dbd85abafa0f892c4b557eb8f93b788", + "ERZ1664508.mapping.ARG:md5,9a824269207740c926eb7d1ade69cd89", + "ERZ1664509.mapping.ARG:md5,fa8ffd39d8405bd167bb1676b5a29db7", + "ERZ1664510.mapping.ARG:md5,16f2e41c2378645dbbdf9867f9000acf", + "ERZ1664511.mapping.ARG:md5,7f2bd09ed161162a82c3c10c06bf1ee8", + "ERZ1664515.mapping.ARG:md5,a4bb295a414b9a26c4e2d032bb25624f", + "ERZ1664516.mapping.ARG:md5,e3ec14da3e206782e1151593d801015d", + "ERZ1664517.mapping.ARG:md5,9f22fec9df39231f0a52865ca9245451", + "ERZ1664518.mapping.ARG:md5,821fd592c54795e2666277e3a2c84169", + "ERZ1664520.mapping.ARG:md5,24942a7fadad6af031c116e8f9ea848e", + "ERZ1664521.mapping.ARG:md5,d61ee33f0395ab5dbb6b65f816186d77", + "ERZ1664523.mapping.ARG:md5,2ba512cfd091a9ab18825cd4d9560a83", + "ERZ1664524.mapping.ARG:md5,d3fd9b70a667f37478c901c4ec5c69be", + "ERZ1664528.mapping.ARG:md5,1da3f34f173fabe34ff5bc122d9ec7e8" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-02T20:18:25.679296582" + }, + "ampir": { + "content": [ + "ERZ1664501.ampir.tsv:md5,ef78b10c6f4c6a555eb9ef8d93291aad", + "ERZ1664503.ampir.tsv:md5,7354b3c583443d9d3cab33ce3cb6327e", + "ERZ1664504.ampir.tsv:md5,506a55b7dc97b33b5533febabde8b0cf", + "ERZ1664505.ampir.tsv:md5,27f72ca9213aac5b0d857df638db692b", + "ERZ1664506.ampir.tsv:md5,1c5df79369a889b136cdef0e89f3f120", + "ERZ1664507.ampir.tsv:md5,a44751ce33a3384583dd43795d729245", + "ERZ1664508.ampir.tsv:md5,a9267c72360b01116bc61ab360f01ab4", + "ERZ1664509.ampir.tsv:md5,c0d8115529d6d8ee4989bd1e9dfe5766", + "ERZ1664510.ampir.tsv:md5,2a6d6563be682769a83208fe025ed946", + "ERZ1664511.ampir.tsv:md5,b96317516b603ea796d58366693e6b96", + "ERZ1664515.ampir.tsv:md5,9fbeb531294e951336e4c91257d44e30", + "ERZ1664516.ampir.tsv:md5,44dcbd1371c1fcfe0e98e756d6a74996", + "ERZ1664517.ampir.tsv:md5,35a42d7aabc1edef65a0c0f2129530bc", + "ERZ1664518.ampir.tsv:md5,c7c9157000642e158b6746c719d65a85", + "ERZ1664520.ampir.tsv:md5,62f2e109031048fc593aa525405a19b4", + "ERZ1664521.ampir.tsv:md5,91bebaf23d2a63192359178af8ae1d42", + "ERZ1664523.ampir.tsv:md5,1e01f9649dc2e9bebd8ce635e051e3df", + "ERZ1664524.ampir.tsv:md5,8ea8ca6483c416695ad2307e7a939f8d", + "ERZ1664528.ampir.tsv:md5,a239169a2cd41265693442694bb5e329", + "ERZ1664501.ampir.faa:md5,88d04f76764566e029f1a0eb7481bd50", + "ERZ1664503.ampir.faa:md5,754b00982b99d20d24ddd2c39e3db060", + "ERZ1664504.ampir.faa:md5,c6e84c9ee141c097decb89def230a70b", + "ERZ1664505.ampir.faa:md5,7519e8f28ca3c3e8b33e65a672b6f418", + "ERZ1664506.ampir.faa:md5,39162c25303085463d893acee70c2921", + "ERZ1664507.ampir.faa:md5,8119bbc3daa1fc93cf3760b359001212", + "ERZ1664508.ampir.faa:md5,369131964554c5d7b7b56a99a4eeb851", + "ERZ1664509.ampir.faa:md5,2594cd39d2d0cf96d303955528e9c962", + "ERZ1664510.ampir.faa:md5,9bf556234e1a9843d7155118cb8b6afb", + "ERZ1664511.ampir.faa:md5,5ddc4c648af3db91d1aba27527c13622", + "ERZ1664515.ampir.faa:md5,a7830a1af51b290793af9ac83d8c3296", + "ERZ1664516.ampir.faa:md5,6c5b07f03f6f1bc55a44e0a8cbc18cb3", + "ERZ1664517.ampir.faa:md5,2c59abb9b9bfc690f97fefe10a6bc4ce", + "ERZ1664518.ampir.faa:md5,7f5519edb85db37903f3665541219c69", + "ERZ1664520.ampir.faa:md5,f3314a405c3c33e05722a8ab6021cb64", + "ERZ1664521.ampir.faa:md5,139303c88f5f5a4041ee059519ba7f98", + "ERZ1664523.ampir.faa:md5,fb34351d27a405e4a9968664878a0fd4", + "ERZ1664524.ampir.faa:md5,e4660c8d3ac00779a26ee2f0105bba2a", + "ERZ1664528.ampir.faa:md5,36fd7ea6830c3068015105d20b4404a7" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-02T20:18:12.786462549" + }, + "gecco": { + "content": [ + "ERZ1664504.220-NODE-220-length-4587-cov-2.552957_cluster_1.gbk:md5,69eeb368a6f89a268d069fa07ecee1d6", + "ERZ1664504.48-NODE-48-length-9582-cov-5.239425_cluster_1.gbk:md5,357eb07ba90c9bcdc9cedef796bcfca0", + "ERZ1664506.42-NODE-42-length-11967-cov-6.006380_cluster_1.gbk:md5,0a260a4ba3de321dd3c700019bbcdedc", + "ERZ1664508.3061-NODE-3061-length-1263-cov-3.647351_cluster_1.gbk:md5,ad50f411e0e6b53a4326d0383f8b22c2", + "ERZ1664510.123-NODE-123-length-8863-cov-8.649410_cluster_1.gbk:md5,c9692f950285789af64fa69fb871841f", + "ERZ1664510.210-NODE-210-length-5173-cov-7.860688_cluster_1.gbk:md5,5fa9a892c2f8f6473317cbfe801e7e95", + "ERZ1664511.16-NODE-16-length-49668-cov-9.810473_cluster_1.gbk:md5,ac5f4682cfe60b4038aa39f5f42a117b", + "ERZ1664515.9-NODE-9-length-49063-cov-10.926196_cluster_1.gbk:md5,96752064bd4b32f741ae7b5d00c4f37c", + "ERZ1664516.158-NODE-158-length-6232-cov-9.863850_cluster_1.gbk:md5,7f58f99bf974d10efa760048552fe2e5", + "ERZ1664517.38-NODE-38-length-19981-cov-8.613771_cluster_1.gbk:md5,c876ab59dd943efd8e7838f9b1f665e6", + "ERZ1664518.217-NODE-217-length-4457-cov-6.415947_cluster_1.gbk:md5,f01dee924cd2dc677d494d0d4db07f8a", + "ERZ1664521.1871-NODE-1871-length-1473-cov-1.858251_cluster_1.gbk:md5,041c705e5ad5d4a6168b3d71fb157667", + "ERZ1664521.895-NODE-895-length-1964-cov-2.221058_cluster_1.gbk:md5,e08f19ed77e3ec2ad9b941b5a03ffb82", + "ERZ1664523.16-NODE-16-length-15072-cov-6.654591_cluster_1.gbk:md5,a99d1cc8d565ff2fb478363e1d830511", + "ERZ1664524.1150-NODE-1150-length-2386-cov-3.450879_cluster_1.gbk:md5,4b9b9b88b428357d510e652a47de957b", + "ERZ1664524.54-NODE-54-length-9607-cov-5.345582_cluster_1.gbk:md5,ec9f06b06ea5921e2e1c37acd9f6260b", + "ERZ1664528.138-NODE-138-length-5805-cov-4.599304_cluster_1.gbk:md5,2fb5b5e4f7042e66ce04d077386c790f", + "ERZ1664528.1641-NODE-1641-length-2049-cov-4.697091_cluster_1.gbk:md5,cbf89f809d489e3a0c8a9c2576b2cd47" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.1" + }, + "timestamp": "2024-07-12T08:17:29.27350638" + }, + "antismash": { + "content": [ + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-02T20:18:53.947865807" + }, + "macrel": { + "content": [ + "ERZ1664501.macrel.prediction.gz:md5,a553cb5d0745a01816c7b9c75822df29", + "ERZ1664503.macrel.prediction.gz:md5,3ca2cd9a6d999725b4a487c13ddb7fd9", + "ERZ1664504.macrel.prediction.gz:md5,52e9c1ec54f486765dea07d97b1c97b7", + "ERZ1664505.macrel.prediction.gz:md5,94fa17cce88549aab16555ee598c02bb", + "ERZ1664506.macrel.prediction.gz:md5,732be08d0236cf63641ef445a02cf1ee", + "ERZ1664507.macrel.prediction.gz:md5,eab2d426cf31a47597e61ddb25bf3d49", + "ERZ1664508.macrel.prediction.gz:md5,a0e40483e0136c3bb4abea9c9cba7d4b", + "ERZ1664509.macrel.prediction.gz:md5,47ca65c261cf402b390f6951bb1ed9dc", + "ERZ1664510.macrel.prediction.gz:md5,3e6ca785e579757616fe515efef1537e", + "ERZ1664511.macrel.prediction.gz:md5,df36fa0448591690fc6b7ded2517256e", + "ERZ1664515.macrel.prediction.gz:md5,b896ac50f6ebec1e725cff67bdff8fed", + "ERZ1664516.macrel.prediction.gz:md5,5dcbc87c6a44e8783dfe48b6385dfca8", + "ERZ1664517.macrel.prediction.gz:md5,02373e1b4383dc7501e7e142c9443b7a", + "ERZ1664518.macrel.prediction.gz:md5,7290477960af29a76563e8ded5d4a623", + "ERZ1664520.macrel.prediction.gz:md5,bdf1a379ee49e34b9a448762e5301926", + "ERZ1664521.macrel.prediction.gz:md5,91bd81f6c4e5c8ff4cc684ec04fa0a30", + "ERZ1664523.macrel.prediction.gz:md5,cee5ae9ba4a8a3879ab245b767815394", + "ERZ1664524.macrel.prediction.gz:md5,73f21254f4e4056a71ebf43851af3698", + "ERZ1664528.macrel.prediction.gz:md5,2e957f217c570a58ee61d97c690c1424" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.1" + }, + "timestamp": "2024-07-12T08:17:17.980360618" + }, + "amrfinderplus": { + "content": [ + "ERZ1664501.tsv:md5,dd81ffbf4ceddfd08df9c93d350d19fa", + "ERZ1664503.tsv:md5,7b1e3c4be2e369a2ca04fcd63da1acaa", + "ERZ1664504.tsv:md5,34f751f50617c9612b2e84ee61182ace", + "ERZ1664505.tsv:md5,195ee9875c095324bf9da03627551f71", + "ERZ1664506.tsv:md5,ab833bb2d72e4165130c590feeb81abc", + "ERZ1664507.tsv:md5,a416a831bcc9f2334064c45b04b65893", + "ERZ1664508.tsv:md5,7bf5af85e96374b92dec02986f55cd29", + "ERZ1664509.tsv:md5,90090405b63b9e4e6b115ad4d7658681", + "ERZ1664510.tsv:md5,5cf184c3f55fca8b2ab74fd8e2c68c8b", + "ERZ1664511.tsv:md5,caac6335c1ef383c33173a8a627c0a95", + "ERZ1664515.tsv:md5,cc8b7e5d2df434729a08b0aabefba91c", + "ERZ1664516.tsv:md5,1a92c5bec7ff819a6f830a1726894f7c", + "ERZ1664517.tsv:md5,d8c4989f198d6853e35820da21feffe2", + "ERZ1664518.tsv:md5,709d6bfb280c509b74f3c1b4d8a1c4bc", + "ERZ1664520.tsv:md5,2367abb0f961e00bf8dcdfe7e6083c2c", + "ERZ1664521.tsv:md5,12f6aee5987e86669534d3b64a62a840", + "ERZ1664523.tsv:md5,ba69795aaea671108bfa1e48c509dd79", + "ERZ1664524.tsv:md5,b0aa6f732ca2b922d2291deaba0d1312", + "ERZ1664528.tsv:md5,93249b05df4a0587db305684da8a1f8e" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-02T20:18:33.421040838" + } +} \ No newline at end of file diff --git a/tests/test_nothing.nf.test b/tests/test_nothing.nf.test new file mode 100644 index 00000000..a141d401 --- /dev/null +++ b/tests/test_nothing.nf.test @@ -0,0 +1,25 @@ +nextflow_pipeline { + + name "Test pipeline: NFCORE_FUNCSCAN" + script "main.nf" + tag "pipeline" + tag "nfcore_funcscan" + tag "test_nothing" + + test("test_nothing_profile") { + + when { + params { + outdir = "$outputDir" + } + } + + then { + assertAll( + { assert workflow.success }, + { assert new File("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml").exists() }, + { assert new File("$outputDir/multiqc/multiqc_report.html").exists() }, + ) + } + } +} diff --git a/tests/test_preannotated.nf.test b/tests/test_preannotated.nf.test new file mode 100644 index 00000000..a415ef8b --- /dev/null +++ b/tests/test_preannotated.nf.test @@ -0,0 +1,128 @@ +nextflow_pipeline { + + name "Test pipeline: NFCORE_FUNCSCAN" + script "main.nf" + tag "pipeline" + tag "nfcore_funcscan" + tag "test_preannotated" + + test("test_preannotated_profile") { + + when { + params { + outdir = "$outputDir" + } + } + + then { + assertAll( + { assert workflow.success }, + { assert new File("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml").exists() }, + { assert new File("$outputDir/multiqc/multiqc_report.html").exists() }, + + // AMPir + { assert snapshot( + path("$outputDir/amp/ampir/sample_1/sample_1.ampir.tsv").text.contains("MRWGYPLSLVLMALSVAAPMIYFRRKGWLR"), + path("$outputDir/amp/ampir/sample_1/sample_1.ampir.faa"), + path("$outputDir/amp/ampir/sample_2/sample_2.ampir.tsv").text.contains("MRWGYPLSLVLMALSVAAPMIYFRRKGWLR"), + path("$outputDir/amp/ampir/sample_2/sample_2.ampir.faa"), + path("$outputDir/amp/ampir/sample_3/sample_3.ampir.tsv").text.contains("IPELEMRWGYPLSLVLMALSVAAPMIYFRRKGWLR"), + path("$outputDir/amp/ampir/sample_3/sample_3.ampir.faa") + ).match("ampir") }, + + // AMPlify + { assert snapshot( + path("$outputDir/amp/amplify/sample_1/sample_1.amplify.tsv").text.contains("MRWGYPLSLVLMALSVAAPMIYFRRKGWLR"), + path("$outputDir/amp/amplify/sample_2/sample_2.amplify.tsv").text.contains("MRWGYPLSLVLMALSVAAPMIYFRRKGWLR"), + path("$outputDir/amp/amplify/sample_3/sample_3.amplify.tsv").text.contains("IPELEMRWGYPLSLVLMALSVAAPMIYFRRKGWLR") + ).match("amplify") }, + + // HMMsearch + { assert new File("$outputDir/amp/hmmer_hmmsearch/sample_1/sample_1_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + { assert new File("$outputDir/amp/hmmer_hmmsearch/sample_2/sample_2_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + { assert new File("$outputDir/amp/hmmer_hmmsearch/sample_3/sample_3_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + + // Macrel + { assert snapshot( + path("$outputDir/amp/macrel/sample_1.macrel/sample_1.macrel.smorfs.faa.gz"), + path("$outputDir/amp/macrel/sample_2.macrel/sample_2.macrel.smorfs.faa.gz"), + path("$outputDir/amp/macrel/sample_3.macrel/sample_3.macrel.smorfs.faa.gz"), + path("$outputDir/amp/macrel/sample_1.macrel/sample_1.macrel.all_orfs.faa.gz"), + path("$outputDir/amp/macrel/sample_2.macrel/sample_2.macrel.all_orfs.faa.gz"), + path("$outputDir/amp/macrel/sample_3.macrel/sample_3.macrel.all_orfs.faa.gz"), + path("$outputDir/amp/macrel/sample_1.macrel/sample_1.macrel.prediction.gz"), + path("$outputDir/amp/macrel/sample_2.macrel/sample_2.macrel.prediction.gz"), + path("$outputDir/amp/macrel/sample_3.macrel/sample_3.macrel.prediction.gz"), + path("$outputDir/amp/macrel/sample_1.macrel/README.md"), + path("$outputDir/amp/macrel/sample_2.macrel/README.md"), + path("$outputDir/amp/macrel/sample_3.macrel/README.md"), + path("$outputDir/amp/macrel/sample_1.macrel/sample_1.macrel_log.txt"), + path("$outputDir/amp/macrel/sample_2.macrel/sample_2.macrel_log.txt"), + path("$outputDir/amp/macrel/sample_3.macrel/sample_3.macrel_log.txt") + ).match("macrel") }, + + // AMPcombi + { assert snapshot( + path("$outputDir/reports/ampcombi2/Ampcombi_cluster.log"), + path("$outputDir/reports/ampcombi2/Ampcombi_complete.log"), + path("$outputDir/reports/ampcombi2/Ampcombi_summary.tsv").text.contains("NODE_515831_length_303_cov_1.532258_1"), + path("$outputDir/reports/ampcombi2/Ampcombi_parse_tables.log").text.contains(" \$\$\$\$\$\$\\ \$\$\\ \$\$\\") + ).match("ampcombi") }, + + // DeepARG + { assert snapshot( + path("$outputDir/arg/deeparg/sample_1/sample_1.align.daa.tsv"), + path("$outputDir/arg/deeparg/sample_2/sample_2.align.daa.tsv"), + path("$outputDir/arg/deeparg/sample_3/sample_3.align.daa.tsv"), + path("$outputDir/arg/deeparg/sample_1/sample_1.mapping.ARG").text.contains("#ARG"), + path("$outputDir/arg/deeparg/sample_2/sample_2.mapping.ARG").text.contains("#ARG"), + path("$outputDir/arg/deeparg/sample_3/sample_3.mapping.ARG").text.contains("#ARG") + ).match("deeparg") }, + { assert file("$outputDir/arg/deeparg/sample_1/sample_1.align.daa").name }, + { assert file("$outputDir/arg/deeparg/sample_2/sample_2.align.daa").name }, + { assert file("$outputDir/arg/deeparg/sample_3/sample_3.align.daa").name }, + { assert path("$outputDir/arg/deeparg/sample_1/sample_1.mapping.potential.ARG").text.contains("#ARG") }, + { assert path("$outputDir/arg/deeparg/sample_2/sample_2.mapping.potential.ARG").text.contains("#ARG") }, + { assert path("$outputDir/arg/deeparg/sample_3/sample_3.mapping.potential.ARG").text.contains("#ARG") }, + + // ABRicate + { assert snapshot( + path("$outputDir/arg/abricate/sample_1/sample_1.txt"), + path("$outputDir/arg/abricate/sample_2/sample_2.txt"), + path("$outputDir/arg/abricate/sample_3/sample_3.txt") + ).match("abricate") }, + + // AMRFinderPlus + { assert snapshot( + path("$outputDir/arg/amrfinderplus/sample_1/sample_1.tsv"), + path("$outputDir/arg/amrfinderplus/sample_2/sample_2.tsv"), + path("$outputDir/arg/amrfinderplus/sample_3/sample_3.tsv") + ).match("amrfinderplus") }, + + // RGI + { assert snapshot( + path("$outputDir/arg/rgi/sample_1/sample_1.txt"), + path("$outputDir/arg/rgi/sample_2/sample_2.txt"), + path("$outputDir/arg/rgi/sample_3/sample_3.txt") + ).match("rgi") }, + + // fARGene + { assert snapshot( + path("$outputDir/arg/fargene/sample_1/class_a/results_summary.txt"), + path("$outputDir/arg/fargene/sample_2/class_a/results_summary.txt"), + path("$outputDir/arg/fargene/sample_3/class_a/results_summary.txt"), + path("$outputDir/arg/fargene/sample_1/class_b_1_2/results_summary.txt"), + path("$outputDir/arg/fargene/sample_2/class_b_1_2/results_summary.txt"), + path("$outputDir/arg/fargene/sample_3/class_b_1_2/results_summary.txt") + ).match("fargene") + }, + { assert path("$outputDir/arg/fargene/sample_1/fargene_analysis.log").text.contains("fARGene is done.") }, + { assert path("$outputDir/arg/fargene/sample_2/fargene_analysis.log").text.contains("fARGene is done.") }, + { assert path("$outputDir/arg/fargene/sample_3/fargene_analysis.log").text.contains("fARGene is done.") }, + + // hAMRonization + { assert snapshot(path("$outputDir/reports/hamronization_summarize/hamronization_combined_report.tsv")).match("hamronization_summarize") }, + ) + } + } +} diff --git a/tests/test_preannotated.nf.test.snap b/tests/test_preannotated.nf.test.snap new file mode 100644 index 00000000..3b32173d --- /dev/null +++ b/tests/test_preannotated.nf.test.snap @@ -0,0 +1,142 @@ +{ + "hamronization_summarize": { + "content": [ + "hamronization_combined_report.tsv:md5,d86ae2e8d42ed6090234b8f5aa7c6a18" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-04T22:23:20.891751" + }, + "abricate": { + "content": [ + "sample_1.txt:md5,427cec26e354ac6b0ab6047ec6621202", + "sample_2.txt:md5,4c140c932a48a22bcd8ae911bda8f4c7", + "sample_3.txt:md5,d6534efe3d03173749d003bf9e624e68" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-04T22:23:20.743136" + }, + "fargene": { + "content": [ + "results_summary.txt:md5,2c8a073d2a7938e8aedcc097e6df2aa5", + "results_summary.txt:md5,3b86a5513e89e22a4c8b9279678ce0c0", + "results_summary.txt:md5,2c8a073d2a7938e8aedcc097e6df2aa5", + "results_summary.txt:md5,59f2e69c670d72f0c0a401e0dc90cbeb", + "results_summary.txt:md5,59f2e69c670d72f0c0a401e0dc90cbeb", + "results_summary.txt:md5,59f2e69c670d72f0c0a401e0dc90cbeb" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-04T22:23:20.849995" + }, + "rgi": { + "content": [ + "sample_1.txt:md5,dde77ae2dc240ee4717d8d33a92dfb66", + "sample_2.txt:md5,0e652d35ef6e9272aa194b55db609e75", + "sample_3.txt:md5,dde77ae2dc240ee4717d8d33a92dfb66" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-04T22:23:20.809033" + }, + "deeparg": { + "content": [ + "sample_1.align.daa.tsv:md5,0e71c37318bdc6cba792196d0455293d", + "sample_2.align.daa.tsv:md5,1092ecd3cd6931653168b46c7afeb9e3", + "sample_3.align.daa.tsv:md5,b79070fe26acd1a10ae3aaf06b0d5901", + true, + true, + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-04T22:23:20.699516" + }, + "ampir": { + "content": [ + true, + "sample_1.ampir.faa:md5,ab02c6e9c5f36ba9c31af97f95f9c317", + true, + "sample_2.ampir.faa:md5,12826875bd18623da78770187a7bbd2c", + true, + "sample_3.ampir.faa:md5,0a36691485930a1b77c4b68a738fd98d" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-04T22:23:20.560802" + }, + "ampcombi": { + "content": [ + "Ampcombi_cluster.log:md5,4c78f5f134edf566f39e04e3ab7d8558", + "Ampcombi_complete.log:md5,3dabfea4303bf94bd4f5d78c5b8c83c1", + true, + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-04T22:23:20.663035" + }, + "amplify": { + "content": [ + true, + true, + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-04T22:23:20.593242" + }, + "macrel": { + "content": [ + "sample_1.macrel.smorfs.faa.gz:md5,9cddad1e4b6dbcb76888f1a87db388ec", + "sample_2.macrel.smorfs.faa.gz:md5,e055dd2a9e44f3dcaa8af7198600349c", + "sample_3.macrel.smorfs.faa.gz:md5,9cddad1e4b6dbcb76888f1a87db388ec", + "sample_1.macrel.all_orfs.faa.gz:md5,c276fb1ec494ff53ded1e6fc118e25b9", + "sample_2.macrel.all_orfs.faa.gz:md5,e75e434a30922d80169d0666fd07e446", + "sample_3.macrel.all_orfs.faa.gz:md5,c276fb1ec494ff53ded1e6fc118e25b9", + "sample_1.macrel.prediction.gz:md5,0277725512f7d2954a99692bb65f1475", + "sample_2.macrel.prediction.gz:md5,06f7ce99cfe6f364d38743aae094402a", + "sample_3.macrel.prediction.gz:md5,0277725512f7d2954a99692bb65f1475", + "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", + "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", + "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", + "sample_1.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "sample_2.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "sample_3.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-04T22:23:20.606679" + }, + "amrfinderplus": { + "content": [ + "sample_1.tsv:md5,29cfb6f34f420d802eda95c6d9daa361", + "sample_2.tsv:md5,d9b6565167d603a1f07cff2374db8eb2", + "sample_3.tsv:md5,29cfb6f34f420d802eda95c6d9daa361" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-04T22:23:20.777384" + } +} \ No newline at end of file diff --git a/tests/test_preannotated_bgc.nf.test b/tests/test_preannotated_bgc.nf.test new file mode 100644 index 00000000..0e9ca618 --- /dev/null +++ b/tests/test_preannotated_bgc.nf.test @@ -0,0 +1,73 @@ +nextflow_pipeline { + + name "Test pipeline: NFCORE_FUNCSCAN" + script "main.nf" + tag "pipeline" + tag "nfcore_funcscan" + tag "test_preannotated_bgc" + + test("test_preannotated_bgc_profile") { + + when { + params { + outdir = "$outputDir" + } + } + + then { + assertAll( + { assert workflow.success }, + { assert new File("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml").exists() }, + { assert new File("$outputDir/multiqc/multiqc_report.html").exists() }, + + // antiSMASH + { assert snapshot( + path("$outputDir/bgc/antismash/sample_1/css"), + path("$outputDir/bgc/antismash/sample_2/css"), + path("$outputDir/bgc/antismash/sample_3/css") + ).match("antismash_css") }, // parts of channel: html_accessory_files + { assert path("$outputDir/bgc/antismash/sample_1/sample_1.gbk").text.contains("##antiSMASH-Data-START##") }, // channel: gbk_input + { assert path("$outputDir/bgc/antismash/sample_1/sample_1.zip").exists() }, // channel: zip + { assert path("$outputDir/bgc/antismash/sample_1/index.html").text.contains("https://antismash.secondarymetabolites.org/") }, // channel: html + { assert path("$outputDir/bgc/antismash/sample_1/regions.js").text.contains('PROKKA_859') }, // channel: json_sideloading + { assert path("$outputDir/bgc/antismash/sample_1/sample_1.log").text.contains("antiSMASH status: SUCCESS") }, // channel: log + { assert path("$outputDir/bgc/antismash/sample_2/sample_2.gbk").text.contains("##antiSMASH-Data-START##") }, // channel: gbk_input + { assert path("$outputDir/bgc/antismash/sample_2/sample_2.zip").exists() }, // channel: zip + { assert path("$outputDir/bgc/antismash/sample_2/index.html").text.contains("https://antismash.secondarymetabolites.org/") }, // channel: html + { assert path("$outputDir/bgc/antismash/sample_2/regions.js").text.contains('PROKKA_859') }, // channel: json_sideloading + { assert path("$outputDir/bgc/antismash/sample_2/sample_2.log").text.contains("antiSMASH status: SUCCESS") }, // channel: log + { assert path("$outputDir/bgc/antismash/sample_3/sample_3.gbk").text.contains("##antiSMASH-Data-START##") }, // channel: gbk_input + { assert path("$outputDir/bgc/antismash/sample_3/sample_3.zip").exists() }, // channel: zip + { assert path("$outputDir/bgc/antismash/sample_3/index.html").text.contains("https://antismash.secondarymetabolites.org/") }, // channel: html + { assert path("$outputDir/bgc/antismash/sample_3/regions.js").text.contains('NODE_1328_length_3730_cov_3.647347') }, // channel: json_sideloading + { assert path("$outputDir/bgc/antismash/sample_3/sample_3.log").text.contains("antiSMASH status: SUCCESS") }, // channel: log + + // DeepBGC + { assert snapshot( + path("$outputDir/bgc/deepbgc/sample_1/sample_1.bgc.gbk"), + path("$outputDir/bgc/deepbgc/sample_2/sample_2.bgc.gbk"), + path("$outputDir/bgc/deepbgc/sample_3/sample_3.bgc.gbk") + ).match("deepbgc_bgc_gbk") }, // channel: bgc_gbk + { assert path("$outputDir/bgc/deepbgc/sample_1/sample_1.antismash.json").text.contains("Putative BGCs predicted using DeepBGC") }, // channel: json + { assert path("$outputDir/bgc/deepbgc/sample_1/LOG.txt").text.contains('Saved DeepBGC result to:') }, // channel: log + { assert path("$outputDir/bgc/deepbgc/sample_1/sample_1.full.gbk").text.contains('1 ttcgccagga gtggcgaagc gatgcgaggt') }, // channel: full_gbk + { assert path("$outputDir/bgc/deepbgc/sample_2/sample_2.antismash.json").text.contains("Putative BGCs predicted using DeepBGC") }, // channel: json + { assert path("$outputDir/bgc/deepbgc/sample_2/LOG.txt").text.contains('Saved DeepBGC result to:') }, // channel: log + { assert path("$outputDir/bgc/deepbgc/sample_2/sample_2.full.gbk").text.contains('1 aaggggtatg gagcagcgac gtctacccgt') }, // channel: full_gbk + { assert path("$outputDir/bgc/deepbgc/sample_3/sample_3.antismash.json").text.contains("NODE_1328_length_3730_cov_3.647347") }, // channel: json + { assert path("$outputDir/bgc/deepbgc/sample_3/LOG.txt").text.contains('Saved DeepBGC result to:') }, // channel: log + { assert path("$outputDir/bgc/deepbgc/sample_3/sample_3.full.gbk").text.contains('1 tgaatctgtt ttaaagcaaa ttgatctcgc') }, // channel: full_gbk + + // GECCO + { assert snapshot( + path("$outputDir/bgc/gecco/sample_1/sample_1.genes.tsv"), // channel: genes + path("$outputDir/bgc/gecco/sample_1/sample_1.features.tsv"), // channel: features + path("$outputDir/bgc/gecco/sample_2/sample_2.genes.tsv"), // channel: genes + path("$outputDir/bgc/gecco/sample_2/sample_2.features.tsv"), // channel: features + path("$outputDir/bgc/gecco/sample_3/sample_3.genes.tsv"), // channel: genes + path("$outputDir/bgc/gecco/sample_3/sample_3.features.tsv") // channel: features + ).match("gecco") } + ) + } + } +} diff --git a/tests/test_preannotated_bgc.nf.test.snap b/tests/test_preannotated_bgc.nf.test.snap new file mode 100644 index 00000000..b2bb672d --- /dev/null +++ b/tests/test_preannotated_bgc.nf.test.snap @@ -0,0 +1,47 @@ +{ + "antismash_css": { + "content": [ + [ + "bacteria.css:md5,39c0ca9cbc64cb824dc958b26b5b4ab8" + ], + [ + "bacteria.css:md5,39c0ca9cbc64cb824dc958b26b5b4ab8" + ], + [ + "bacteria.css:md5,39c0ca9cbc64cb824dc958b26b5b4ab8" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T17:16:00.343547789" + }, + "deepbgc_bgc_gbk": { + "content": [ + "sample_1.bgc.gbk:md5,e50e429959e9c4bf0c4b97d9dcd54a08", + "sample_2.bgc.gbk:md5,effe3cfc91772eb4e4b50ac46f13a941", + "sample_3.bgc.gbk:md5,c9028aca1282b314d296091e1f0b8e52" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T17:16:00.388012579" + }, + "gecco": { + "content": [ + "sample_1.genes.tsv:md5,804af8236a7148baf8919e3acf30947d", + "sample_1.features.tsv:md5,a84d59fd63e2593dc5872b4f9bb268b2", + "sample_2.genes.tsv:md5,5a2b20c5c1cd821a2af405229c4c0f78", + "sample_2.features.tsv:md5,579a27490188f5bc47a4deb4d1d1b8dc", + "sample_3.genes.tsv:md5,6874723404b3326f0f73e59f03b96837", + "sample_3.features.tsv:md5,490f98655089b3c73f88b93347cca465" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T17:16:00.44526019" + } +} \ No newline at end of file diff --git a/tests/test_prokka.nf.test b/tests/test_prokka.nf.test new file mode 100644 index 00000000..94e65ae2 --- /dev/null +++ b/tests/test_prokka.nf.test @@ -0,0 +1,108 @@ +nextflow_pipeline { + + name "Test pipeline: NFCORE_FUNCSCAN" + script "main.nf" + tag "pipeline" + tag "nfcore_funcscan" + tag "test_prokka" + + test("test_prokka_profile") { + + when { + params { + outdir = "$outputDir" + } + } + + then { + assertAll( + { assert workflow.success }, + { assert new File("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml").exists() }, + { assert new File("$outputDir/multiqc/multiqc_report.html").exists() }, + + // AMPir + { assert snapshot( + file("$outputDir/amp/ampir/sample_1/sample_1.ampir.tsv").text.contains("NODE_882919_length_258_cov_0.935961_1"), + file("$outputDir/amp/ampir/sample_1/sample_1.ampir.faa").text.contains("NODE_882919_length_258_cov_0.935961_1"), + file("$outputDir/amp/ampir/sample_2/sample_2.ampir.tsv").text.contains("NODE_882919_length_258_cov_0.935961_1"), + file("$outputDir/amp/ampir/sample_2/sample_2.ampir.faa").text.contains("NODE_882919_length_258_cov_0.935961_1") + ).match("ampir") }, + + // AMPlify + { assert snapshot( + file("$outputDir/amp/amplify/sample_1/sample_1.amplify.tsv").text.contains("NODE_882919_length_258_cov_0.935961_1"), + file("$outputDir/amp/amplify/sample_2/sample_2.amplify.tsv").text.contains("NODE_882919_length_258_cov_0.935961_1") + ).match("amplify") }, + + // HMMsearch + { assert new File("$outputDir/amp/hmmer_hmmsearch/sample_1/sample_1_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + { assert new File("$outputDir/amp/hmmer_hmmsearch/sample_2/sample_2_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + + // Macrel + { assert snapshot( + path("$outputDir/amp/macrel/sample_1.macrel/sample_1.macrel.smorfs.faa.gz"), + path("$outputDir/amp/macrel/sample_2.macrel/sample_2.macrel.smorfs.faa.gz"), + path("$outputDir/amp/macrel/sample_1.macrel/sample_1.macrel.all_orfs.faa.gz"), + path("$outputDir/amp/macrel/sample_2.macrel/sample_2.macrel.all_orfs.faa.gz"), + path("$outputDir/amp/macrel/sample_1.macrel/sample_1.macrel.prediction.gz"), + path("$outputDir/amp/macrel/sample_2.macrel/sample_2.macrel.prediction.gz"), + path("$outputDir/amp/macrel/sample_1.macrel/README.md"), + path("$outputDir/amp/macrel/sample_1.macrel/README.md"), + path("$outputDir/amp/macrel/sample_1.macrel/sample_1.macrel_log.txt"), + path("$outputDir/amp/macrel/sample_2.macrel/sample_2.macrel_log.txt") + ).match("macrel") }, + + // AMPcombi + { assert path("$outputDir/reports/ampcombi2/Ampcombi_summary.tsv").text.contains("PROKKA_00019") }, + { assert snapshot( + path("$outputDir/reports/ampcombi2/Ampcombi_cluster.log"), + path("$outputDir/reports/ampcombi2/Ampcombi_complete.log"), + path("$outputDir/reports/ampcombi2/Ampcombi_parse_tables.log") + ).match("ampcombi_logfiles") }, + + // DeepARG + { assert snapshot( + path("$outputDir/arg/deeparg/sample_1/sample_1.align.daa.tsv"), + path("$outputDir/arg/deeparg/sample_2/sample_2.align.daa.tsv"), + path("$outputDir/arg/deeparg/sample_1/sample_1.mapping.ARG"), + path("$outputDir/arg/deeparg/sample_2/sample_2.mapping.ARG") + ).match("deeparg_tsv_ARG") }, + { assert file("$outputDir/arg/deeparg/sample_1/sample_1.align.daa").name }, + { assert file("$outputDir/arg/deeparg/sample_2/sample_2.align.daa").name }, + { assert path("$outputDir/arg/deeparg/sample_1/sample_1.mapping.potential.ARG").text.contains("#ARG") }, + { assert path("$outputDir/arg/deeparg/sample_2/sample_2.mapping.potential.ARG").text.contains("#ARG") }, + + // ABRicate + { assert snapshot( + path("$outputDir/arg/abricate/sample_1/sample_1.txt"), + path("$outputDir/arg/abricate/sample_2/sample_2.txt"), + ).match("abricate") }, + + // AMRFinderPlus + { assert snapshot( + path("$outputDir/arg/amrfinderplus/sample_1/sample_1.tsv"), + path("$outputDir/arg/amrfinderplus/sample_2/sample_2.tsv"), + ).match("amrfinderplus") }, + + // RGI + { assert snapshot( + path("$outputDir/arg/rgi/sample_1/sample_1.txt"), + path("$outputDir/arg/rgi/sample_2/sample_2.txt"), + ).match("rgi") }, + + // fARGene + { assert snapshot( + path("$outputDir/arg/fargene/sample_1/class_a/results_summary.txt"), + path("$outputDir/arg/fargene/sample_2/class_a/results_summary.txt"), + path("$outputDir/arg/fargene/sample_1/class_b_1_2/results_summary.txt"), + path("$outputDir/arg/fargene/sample_2/class_b_1_2/results_summary.txt") + ).match("fargene") }, + { assert path("$outputDir/arg/fargene/sample_1/fargene_analysis.log").text.contains("fARGene is done.") }, + { assert path("$outputDir/arg/fargene/sample_2/fargene_analysis.log").text.contains("fARGene is done.") }, + + // hAMRonization + { assert snapshot(path("$outputDir/reports/hamronization_summarize/hamronization_combined_report.tsv")).match("hamronization_summarize") }, + ) + } + } +} diff --git a/tests/test_prokka.nf.test.snap b/tests/test_prokka.nf.test.snap new file mode 100644 index 00000000..bdb6fb22 --- /dev/null +++ b/tests/test_prokka.nf.test.snap @@ -0,0 +1,126 @@ +{ + "hamronization_summarize": { + "content": [ + "hamronization_combined_report.tsv:md5,864466b0fb1acfc0e6b3425271f78ecb" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:06:45.990722943" + }, + "abricate": { + "content": [ + "sample_1.txt:md5,69af3321b0bc808b7ef85f102395736f", + "sample_2.txt:md5,69af3321b0bc808b7ef85f102395736f" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:06:45.941179691" + }, + "fargene": { + "content": [ + "results_summary.txt:md5,690d351cfc52577263ef4cfab1c81f50", + "results_summary.txt:md5,690d351cfc52577263ef4cfab1c81f50", + "results_summary.txt:md5,f69af9b0e18a0cfc934eb18b7e4bffe1", + "results_summary.txt:md5,f69af9b0e18a0cfc934eb18b7e4bffe1" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:06:45.978326519" + }, + "rgi": { + "content": [ + "sample_1.txt:md5,fce130af51f93cccfc09ddaf9caf623f", + "sample_2.txt:md5,fce130af51f93cccfc09ddaf9caf623f" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:06:45.964420301" + }, + "deeparg_tsv_ARG": { + "content": [ + "sample_1.align.daa.tsv:md5,d41d8cd98f00b204e9800998ecf8427e", + "sample_2.align.daa.tsv:md5,06648de08caca0b7f42eab9576615226", + "sample_1.mapping.ARG:md5,0e049e99eab4c55666062df21707d5b9", + "sample_2.mapping.ARG:md5,0e049e99eab4c55666062df21707d5b9" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:06:45.928505029" + }, + "ampir": { + "content": [ + false, + false, + false, + false + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:06:45.879791305" + }, + "ampcombi_logfiles": { + "content": [ + "Ampcombi_cluster.log:md5,4c78f5f134edf566f39e04e3ab7d8558", + "Ampcombi_complete.log:md5,3dabfea4303bf94bd4f5d78c5b8c83c1", + "Ampcombi_parse_tables.log:md5,1e2b5abad7d17e03428066f345b91117" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:06:45.914363724" + }, + "amplify": { + "content": [ + false, + false + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:06:45.889521968" + }, + "macrel": { + "content": [ + "sample_1.macrel.smorfs.faa.gz:md5,1b5e2434860e635e95324d1804a3be7b", + "sample_2.macrel.smorfs.faa.gz:md5,38108b5cdfdc2196afe67418b9b04682", + "sample_1.macrel.all_orfs.faa.gz:md5,86f6b3b590d1b22d9c5aa164f8a14080", + "sample_2.macrel.all_orfs.faa.gz:md5,fdb384925af50ecade05dccaff68afd8", + "sample_1.macrel.prediction.gz:md5,0c4b16e0838be56e012b99169863a168", + "sample_2.macrel.prediction.gz:md5,440deffd6b6d9986ce098e44c66db9ae", + "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", + "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", + "sample_1.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "sample_2.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:06:45.892460736" + }, + "amrfinderplus": { + "content": [ + "sample_1.tsv:md5,b4d261ace9be7d013c19d1f5c0005bfe", + "sample_2.tsv:md5,b4d261ace9be7d013c19d1f5c0005bfe" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T11:06:45.952983609" + } +} \ No newline at end of file diff --git a/tests/test_taxonomy_bakta.nf.test b/tests/test_taxonomy_bakta.nf.test new file mode 100644 index 00000000..5a412fa9 --- /dev/null +++ b/tests/test_taxonomy_bakta.nf.test @@ -0,0 +1,101 @@ +nextflow_pipeline { + + name "Test pipeline: NFCORE_FUNCSCAN" + script "main.nf" + tag "pipeline" + tag "nfcore_funcscan" + tag "test_taxonomy_bakta" + + test("test_taxonomy_bakta") { + + when { + params { + outdir = "$outputDir" + run_taxa_classification = true + } + } + + then { + assertAll( + { assert workflow.success }, + { assert new File("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml").exists() }, + { assert new File("$outputDir/multiqc/multiqc_report.html").exists() }, + + // ampir + { assert snapshot( + file("$outputDir/amp/ampir/sample_1/sample_1.ampir.tsv").text.contains("KKEJHB_00005"), + file("$outputDir/amp/ampir/sample_1/sample_1.ampir.faa").text.contains("KKEJHB_00005"), + file("$outputDir/amp/ampir/sample_2/sample_2.ampir.tsv").text.contains("KDEMFK_00005"), + file("$outputDir/amp/ampir/sample_2/sample_2.ampir.faa").text.contains("KDEMFK_00005") + ).match("ampir") }, + + // AMPlify + { assert snapshot( + file("$outputDir/amp/amplify/sample_1/sample_1.amplify.tsv").text.contains("KKEJHB_00005"), + file("$outputDir/amp/amplify/sample_2/sample_2.amplify.tsv").text.contains("KDEMFK_00005") + ).match("amplify") }, + + // Macrel + { assert snapshot ( + path("$outputDir/amp/macrel/sample_1.macrel/sample_1.macrel.smorfs.faa.gz"), + path("$outputDir/amp/macrel/sample_2.macrel/sample_2.macrel.smorfs.faa.gz"), + path("$outputDir/amp/macrel/sample_1.macrel/sample_1.macrel.all_orfs.faa.gz"), + path("$outputDir/amp/macrel/sample_2.macrel/sample_2.macrel.all_orfs.faa.gz"), + path("$outputDir/amp/macrel/sample_1.macrel/sample_1.macrel.prediction.gz"), + path("$outputDir/amp/macrel/sample_2.macrel/sample_2.macrel.prediction.gz"), + path("$outputDir/amp/macrel/sample_1.macrel/README.md"), + path("$outputDir/amp/macrel/sample_2.macrel/README.md"), + path("$outputDir/amp/macrel/sample_1.macrel/sample_1.macrel_log.txt"), + path("$outputDir/amp/macrel/sample_2.macrel/sample_2.macrel_log.txt") + ).match("macrel") }, + + // hmmsearch (AMP) + { assert new File("$outputDir/amp/hmmer_hmmsearch/sample_1/sample_1_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + { assert new File("$outputDir/amp/hmmer_hmmsearch/sample_2/sample_2_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + + // AMPcombi + { assert snapshot ( + file("$outputDir/reports/ampcombi2/sample_2/sample_2_ampcombi.tsv").text.contains("KDEMFK_00575"), + ).match("ampcombi") }, + { assert new File("$outputDir/reports/ampcombi2/ampcombi_complete_summary_taxonomy.tsv.gz").exists() }, + + // RGI + { assert snapshot ( + path("$outputDir/arg/rgi/sample_1/sample_1.txt"), + path("$outputDir/arg/rgi/sample_2/sample_2.txt") + ).match("rgi") }, + + // ABRicate + { assert snapshot ( + file("$outputDir/arg/abricate/sample_1/sample_1.txt").text.contains("COVERAGE_MAP"), + file("$outputDir/arg/abricate/sample_2/sample_2.txt").text.contains("COVERAGE_MAP") + ).match("abricate") }, + + // fARGene + { assert snapshot ( + path("$outputDir/arg/fargene/sample_1/class_b_1_2/results_summary.txt"), + file("$outputDir/arg/fargene/sample_2/class_b_3/results_summary.txt").text.contains("class_B_3.hmm"), + file("$outputDir/arg/fargene/sample_2/tet_efflux/results_summary.txt").text.contains("tet_efflux.hmm") + ).match("fargene") }, + + // hAMRonization + { assert new File("$outputDir/reports/hamronization_summarize/hamronization_combined_report.tsv.gz").exists() }, + + // antiSMASH + { assert snapshot ( + file("$outputDir/bgc/antismash/sample_2/sample_2.gbk").text.contains("##antiSMASH-Data-START##"), + file("$outputDir/bgc/antismash/sample_2/sample_2.log").text.contains("antiSMASH status: SUCCESS") + ).match("antismash") }, + + // GECCO + { assert snapshot ( + path("$outputDir/bgc/gecco/sample_2/sample_2.genes.tsv").text.contains("sequence_id"), + path("$outputDir/bgc/gecco/sample_2/sample_2.features.tsv").text.contains("cluster_probability") + ).match("gecco") }, + + // hmmsearch (BGC) + { assert new File("$outputDir/bgc/hmmer_hmmsearch/sample_2/sample_2_ToyB.txt.gz").exists() } + ) + } + } +} diff --git a/tests/test_taxonomy_bakta.nf.test.snap b/tests/test_taxonomy_bakta.nf.test.snap new file mode 100644 index 00000000..035a5218 --- /dev/null +++ b/tests/test_taxonomy_bakta.nf.test.snap @@ -0,0 +1,111 @@ +{ + "abricate": { + "content": [ + true, + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T09:31:30.025771" + }, + "fargene": { + "content": [ + "results_summary.txt:md5,f69af9b0e18a0cfc934eb18b7e4bffe1", + true, + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T09:31:30.025771" + }, + "rgi": { + "content": [ + "sample_1.txt:md5,fce130af51f93cccfc09ddaf9caf623f", + "sample_2.txt:md5,fce130af51f93cccfc09ddaf9caf623f" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T09:31:30.025771" + }, + "ampir": { + "content": [ + true, + true, + true, + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T09:31:30.025771" + }, + "gecco": { + "content": [ + true, + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T09:31:30.025771" + }, + "ampcombi": { + "content": [ + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T09:31:30.025771" + }, + "antismash": { + "content": [ + true, + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T09:31:30.025771" + }, + "amplify": { + "content": [ + true, + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-09T13:10:06.451885596" + }, + "macrel": { + "content": [ + "sample_1.macrel.smorfs.faa.gz:md5,1b5e2434860e635e95324d1804a3be7b", + "sample_2.macrel.smorfs.faa.gz:md5,38108b5cdfdc2196afe67418b9b04682", + "sample_1.macrel.all_orfs.faa.gz:md5,86f6b3b590d1b22d9c5aa164f8a14080", + "sample_2.macrel.all_orfs.faa.gz:md5,fdb384925af50ecade05dccaff68afd8", + "sample_1.macrel.prediction.gz:md5,0c4b16e0838be56e012b99169863a168", + "sample_2.macrel.prediction.gz:md5,440deffd6b6d9986ce098e44c66db9ae", + "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", + "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", + "sample_1.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "sample_2.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T09:31:30.025771" + } +} \ No newline at end of file diff --git a/tests/test_taxonomy_prokka.nf.test b/tests/test_taxonomy_prokka.nf.test new file mode 100644 index 00000000..e0992dbf --- /dev/null +++ b/tests/test_taxonomy_prokka.nf.test @@ -0,0 +1,101 @@ +nextflow_pipeline { + + name "Test pipeline: NFCORE_FUNCSCAN" + script "main.nf" + tag "pipeline" + tag "nfcore_funcscan" + tag "test_taxonomy_prokka" + + test("test_taxonomy_prokka") { + + when { + params { + outdir = "$outputDir" + run_taxa_classification = true + } + } + + then { + assertAll( + { assert workflow.success }, + { assert new File("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml").exists() }, + { assert new File("$outputDir/multiqc/multiqc_report.html").exists() }, + + // ampir + { assert snapshot( + file("$outputDir/amp/ampir/sample_1/sample_1.ampir.tsv").text.contains("PROKKA_00001"), + file("$outputDir/amp/ampir/sample_1/sample_1.ampir.faa").text.contains("PROKKA_00001"), + file("$outputDir/amp/ampir/sample_2/sample_2.ampir.tsv").text.contains("PROKKA_00001"), + file("$outputDir/amp/ampir/sample_2/sample_2.ampir.faa").text.contains("PROKKA_00001") + ).match("ampir") }, + + // AMPlify + { assert snapshot( + file("$outputDir/amp/amplify/sample_1/sample_1.amplify.tsv").text.contains("PROKKA_00001"), + file("$outputDir/amp/amplify/sample_2/sample_2.amplify.tsv").text.contains("PROKKA_00001") + ).match("amplify") }, + + // Macrel + { assert snapshot ( + path("$outputDir/amp/macrel/sample_1.macrel/sample_1.macrel.smorfs.faa.gz"), + path("$outputDir/amp/macrel/sample_2.macrel/sample_2.macrel.smorfs.faa.gz"), + path("$outputDir/amp/macrel/sample_1.macrel/sample_1.macrel.all_orfs.faa.gz"), + path("$outputDir/amp/macrel/sample_2.macrel/sample_2.macrel.all_orfs.faa.gz"), + path("$outputDir/amp/macrel/sample_1.macrel/sample_1.macrel.prediction.gz"), + path("$outputDir/amp/macrel/sample_2.macrel/sample_2.macrel.prediction.gz"), + path("$outputDir/amp/macrel/sample_1.macrel/README.md"), + path("$outputDir/amp/macrel/sample_2.macrel/README.md"), + path("$outputDir/amp/macrel/sample_1.macrel/sample_1.macrel_log.txt"), + path("$outputDir/amp/macrel/sample_2.macrel/sample_2.macrel_log.txt") + ).match("macrel") }, + + // hmmsearch (AMP) + { assert new File("$outputDir/amp/hmmer_hmmsearch/sample_1/sample_1_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + { assert new File("$outputDir/amp/hmmer_hmmsearch/sample_2/sample_2_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + + // AMPcombi + { assert snapshot ( + file("$outputDir/reports/ampcombi2/sample_2/sample_2_ampcombi.tsv").text.contains("PROKKA_00109"), + ).match("ampcombi") }, + { assert new File("$outputDir/reports/ampcombi2/ampcombi_complete_summary_taxonomy.tsv.gz").exists() }, + + // RGI + { assert snapshot ( + path("$outputDir/arg/rgi/sample_1/sample_1.txt"), + path("$outputDir/arg/rgi/sample_2/sample_2.txt") + ).match("rgi") }, + + // ABRicate + { assert snapshot ( + file("$outputDir/arg/abricate/sample_1/sample_1.txt").text.contains("COVERAGE_MAP"), + file("$outputDir/arg/abricate/sample_2/sample_2.txt").text.contains("COVERAGE_MAP") + ).match("abricate") }, + + // fARGene + { assert snapshot ( + path("$outputDir/arg/fargene/sample_1/class_b_1_2/results_summary.txt"), + file("$outputDir/arg/fargene/sample_2/class_b_3/results_summary.txt").text.contains("class_B_3.hmm"), + file("$outputDir/arg/fargene/sample_2/tet_efflux/results_summary.txt").text.contains("tet_efflux.hmm") + ).match("fargene") }, + + // hAMRonization + { assert new File("$outputDir/reports/hamronization_summarize/hamronization_combined_report.tsv.gz").exists() }, + + // antiSMASH + { assert snapshot ( + file("$outputDir/bgc/antismash/sample_2/sample_2.gbk").text.contains("##antiSMASH-Data-START##"), + file("$outputDir/bgc/antismash/sample_2/sample_2.log").text.contains("antiSMASH status: SUCCESS") + ).match("antismash") }, + + // GECCO + { assert snapshot ( + path("$outputDir/bgc/gecco/sample_2/sample_2.genes.tsv").text.contains("sequence_id"), + path("$outputDir/bgc/gecco/sample_2/sample_2.features.tsv").text.contains("cluster_probability") + ).match("gecco") }, + + // hmmsearch (BGC) + { assert new File("$outputDir/bgc/hmmer_hmmsearch/sample_2/sample_2_ToyB.txt.gz").exists() } + ) + } + } +} diff --git a/tests/test_taxonomy_prokka.nf.test.snap b/tests/test_taxonomy_prokka.nf.test.snap new file mode 100644 index 00000000..035a5218 --- /dev/null +++ b/tests/test_taxonomy_prokka.nf.test.snap @@ -0,0 +1,111 @@ +{ + "abricate": { + "content": [ + true, + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T09:31:30.025771" + }, + "fargene": { + "content": [ + "results_summary.txt:md5,f69af9b0e18a0cfc934eb18b7e4bffe1", + true, + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T09:31:30.025771" + }, + "rgi": { + "content": [ + "sample_1.txt:md5,fce130af51f93cccfc09ddaf9caf623f", + "sample_2.txt:md5,fce130af51f93cccfc09ddaf9caf623f" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T09:31:30.025771" + }, + "ampir": { + "content": [ + true, + true, + true, + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T09:31:30.025771" + }, + "gecco": { + "content": [ + true, + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T09:31:30.025771" + }, + "ampcombi": { + "content": [ + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T09:31:30.025771" + }, + "antismash": { + "content": [ + true, + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T09:31:30.025771" + }, + "amplify": { + "content": [ + true, + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-09T13:10:06.451885596" + }, + "macrel": { + "content": [ + "sample_1.macrel.smorfs.faa.gz:md5,1b5e2434860e635e95324d1804a3be7b", + "sample_2.macrel.smorfs.faa.gz:md5,38108b5cdfdc2196afe67418b9b04682", + "sample_1.macrel.all_orfs.faa.gz:md5,86f6b3b590d1b22d9c5aa164f8a14080", + "sample_2.macrel.all_orfs.faa.gz:md5,fdb384925af50ecade05dccaff68afd8", + "sample_1.macrel.prediction.gz:md5,0c4b16e0838be56e012b99169863a168", + "sample_2.macrel.prediction.gz:md5,440deffd6b6d9986ce098e44c66db9ae", + "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", + "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", + "sample_1.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "sample_2.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T09:31:30.025771" + } +} \ No newline at end of file diff --git a/tests/test_taxonomy_pyrodigal.nf.test b/tests/test_taxonomy_pyrodigal.nf.test new file mode 100644 index 00000000..3cc5535e --- /dev/null +++ b/tests/test_taxonomy_pyrodigal.nf.test @@ -0,0 +1,101 @@ +nextflow_pipeline { + + name "Test pipeline: NFCORE_FUNCSCAN" + script "main.nf" + tag "pipeline" + tag "nfcore_funcscan" + tag "test_taxonomy_pyrodigal" + + test("test_taxonomy_pyrodigal") { + + when { + params { + outdir = "$outputDir" + run_taxa_classification = true + } + } + + then { + assertAll( + { assert workflow.success }, + { assert new File("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml").exists() }, + { assert new File("$outputDir/multiqc/multiqc_report.html").exists() }, + + // ampir + { assert snapshot( + file("$outputDir/amp/ampir/sample_1/sample_1.ampir.tsv").text.contains("NODE_882919_length_258_cov_0.935961_1"), + file("$outputDir/amp/ampir/sample_1/sample_1.ampir.faa").text.contains("NODE_882919_length_258_cov_0.935961_1"), + file("$outputDir/amp/ampir/sample_2/sample_2.ampir.tsv").text.contains("NODE_882919_length_258_cov_0.935961_1"), + file("$outputDir/amp/ampir/sample_2/sample_2.ampir.faa").text.contains("NODE_882919_length_258_cov_0.935961_1") + ).match("ampir") }, + + // AMPlify + { assert snapshot( + file("$outputDir/amp/amplify/sample_1/sample_1.amplify.tsv").text.contains("NODE_882919_length_258_cov_0.935961_1"), + file("$outputDir/amp/amplify/sample_2/sample_2.amplify.tsv").text.contains("NODE_882919_length_258_cov_0.935961_1") + ).match("amplify") }, + + // Macrel + { assert snapshot ( + path("$outputDir/amp/macrel/sample_1.macrel/sample_1.macrel.smorfs.faa.gz"), + path("$outputDir/amp/macrel/sample_2.macrel/sample_2.macrel.smorfs.faa.gz"), + path("$outputDir/amp/macrel/sample_1.macrel/sample_1.macrel.all_orfs.faa.gz"), + path("$outputDir/amp/macrel/sample_2.macrel/sample_2.macrel.all_orfs.faa.gz"), + path("$outputDir/amp/macrel/sample_1.macrel/sample_1.macrel.prediction.gz"), + path("$outputDir/amp/macrel/sample_2.macrel/sample_2.macrel.prediction.gz"), + path("$outputDir/amp/macrel/sample_1.macrel/README.md"), + path("$outputDir/amp/macrel/sample_2.macrel/README.md"), + path("$outputDir/amp/macrel/sample_1.macrel/sample_1.macrel_log.txt"), + path("$outputDir/amp/macrel/sample_2.macrel/sample_2.macrel_log.txt") + ).match("macrel") }, + + // hmmsearch (AMP) + { assert new File("$outputDir/amp/hmmer_hmmsearch/sample_1/sample_1_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + { assert new File("$outputDir/amp/hmmer_hmmsearch/sample_2/sample_2_mybacteriocin.hmmer_hmmsearch.txt.gz").exists() }, + + // AMPcombi + { assert snapshot ( + file("$outputDir/reports/ampcombi2/sample_2/sample_2_ampcombi.tsv").text.contains("NODE_515831_length_303_cov_1.532258_1"), + ).match("ampcombi") }, + { assert new File("$outputDir/reports/ampcombi2/ampcombi_complete_summary_taxonomy.tsv.gz").exists() }, + + // RGI + { assert snapshot ( + path("$outputDir/arg/rgi/sample_1/sample_1.txt"), + path("$outputDir/arg/rgi/sample_2/sample_2.txt") + ).match("rgi") }, + + // ABRicate + { assert snapshot ( + file("$outputDir/arg/abricate/sample_1/sample_1.txt").text.contains("COVERAGE_MAP"), + file("$outputDir/arg/abricate/sample_2/sample_2.txt").text.contains("COVERAGE_MAP") + ).match("abricate") }, + + // fARGene + { assert snapshot ( + path("$outputDir/arg/fargene/sample_1/class_b_1_2/results_summary.txt"), + file("$outputDir/arg/fargene/sample_2/class_b_3/results_summary.txt").text.contains("class_B_3.hmm"), + file("$outputDir/arg/fargene/sample_2/tet_efflux/results_summary.txt").text.contains("tet_efflux.hmm") + ).match("fargene") }, + + // hAMRonization + { assert new File("$outputDir/reports/hamronization_summarize/hamronization_combined_report.tsv.gz").exists() }, + + // antiSMASH + { assert snapshot ( + file("$outputDir/bgc/antismash/sample_2/sample_2.gbk").text.contains("##antiSMASH-Data-START##"), + file("$outputDir/bgc/antismash/sample_2/sample_2.log").text.contains("antiSMASH status: SUCCESS") + ).match("antismash") }, + + // GECCO + { assert snapshot ( + path("$outputDir/bgc/gecco/sample_2/sample_2.genes.tsv").text.contains("sequence_id"), + path("$outputDir/bgc/gecco/sample_2/sample_2.features.tsv").text.contains("cluster_probability") + ).match("gecco") }, + + // hmmsearch (BGC) + { assert new File("$outputDir/bgc/hmmer_hmmsearch/sample_2/sample_2_ToyB.txt.gz").exists() } + ) + } + } +} diff --git a/tests/test_taxonomy_pyrodigal.nf.test.snap b/tests/test_taxonomy_pyrodigal.nf.test.snap new file mode 100644 index 00000000..035a5218 --- /dev/null +++ b/tests/test_taxonomy_pyrodigal.nf.test.snap @@ -0,0 +1,111 @@ +{ + "abricate": { + "content": [ + true, + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T09:31:30.025771" + }, + "fargene": { + "content": [ + "results_summary.txt:md5,f69af9b0e18a0cfc934eb18b7e4bffe1", + true, + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T09:31:30.025771" + }, + "rgi": { + "content": [ + "sample_1.txt:md5,fce130af51f93cccfc09ddaf9caf623f", + "sample_2.txt:md5,fce130af51f93cccfc09ddaf9caf623f" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T09:31:30.025771" + }, + "ampir": { + "content": [ + true, + true, + true, + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T09:31:30.025771" + }, + "gecco": { + "content": [ + true, + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T09:31:30.025771" + }, + "ampcombi": { + "content": [ + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T09:31:30.025771" + }, + "antismash": { + "content": [ + true, + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T09:31:30.025771" + }, + "amplify": { + "content": [ + true, + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-09T13:10:06.451885596" + }, + "macrel": { + "content": [ + "sample_1.macrel.smorfs.faa.gz:md5,1b5e2434860e635e95324d1804a3be7b", + "sample_2.macrel.smorfs.faa.gz:md5,38108b5cdfdc2196afe67418b9b04682", + "sample_1.macrel.all_orfs.faa.gz:md5,86f6b3b590d1b22d9c5aa164f8a14080", + "sample_2.macrel.all_orfs.faa.gz:md5,fdb384925af50ecade05dccaff68afd8", + "sample_1.macrel.prediction.gz:md5,0c4b16e0838be56e012b99169863a168", + "sample_2.macrel.prediction.gz:md5,440deffd6b6d9986ce098e44c66db9ae", + "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", + "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", + "sample_1.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "sample_2.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T09:31:30.025771" + } +} \ No newline at end of file