diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 4bcb559..ed49905 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -82,6 +82,12 @@ If you wish to contribute a new step, please use the following coding standards: 9. Update MultiQC config `assets/multiqc_config.yml` so relevant suffixes, file name clean up and module plots are in the appropriate order. If applicable, add a [MultiQC](https://https://multiqc.info/) module. 10. Add a description of the output files and if relevant any appropriate images from the MultiQC report to `docs/output.md`. +### Things to consider regarding displaying results for a new tool + +- If a MultiQC module exist for the tool, use the standard settings for it to start with. +- If no Multiqc module exists, the results of the tool should be made available in the results directory. +- If a tool doesn’t produce output files, the stdout should be channeled into a output file that can be accessible from the outdir of the pipeline. + ### Default values Parameters should be initialised / defined with default values in `nextflow.config` under the `params` scope. diff --git a/.github/workflows/nf-test.yml b/.github/workflows/nf-test.yml new file mode 100644 index 0000000..b0d7b8e --- /dev/null +++ b/.github/workflows/nf-test.yml @@ -0,0 +1,32 @@ +name: nf-test + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + shard: [1, 2, 3, 4] + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: "11" + distribution: "adopt" + + - name: Setup Nextflow latest-edge + uses: nf-core/setup-nextflow@v1 + with: + version: "latest-edge" + + - name: Install nf-test + run: | + wget -qO- https://get.nf-test.com | bash + sudo mv nf-test /usr/local/bin/ + + - name: Run Tests (Shard ${{ matrix.shard }}/${{ strategy.job-total }}) + run: nf-test test --ci --shard ${{ matrix.shard }}/${{ strategy.job-total }} . diff --git a/.nf-core.yml b/.nf-core.yml index fb85600..3765b89 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -1,5 +1,7 @@ bump_version: null -lint: null +lint: + files_unchanged: + - .github/CONTRIBUTING.md nf_core_version: 3.0.2 org_path: null repository_type: pipeline diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a40ac3..40859d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,11 @@ Initial release of nf-core/seqinspector, created with the [nf-core](https://nf-c - [#20](https://github.com/nf-core/seqinspector/pull/20) Use tags to generate group reports - [#13](https://github.com/nf-core/seqinspector/pull/13) Generate reports per run, per project and per lane. - [#49](https://github.com/nf-core/seqinspector/pull/49) Merge with template 3.0.2. -- [#40](https://github.com/nf-core/seqinspector/pull/59) Seqkit Stats TSV output. + <<<<<<< HEAD +- # [#40](https://github.com/nf-core/seqinspector/pull/59) Seqkit Stats TSV output. +- [#51](https://github.com/nf-core/seqinspector/pull/51) Add nf-test to CI. +- [#63](https://github.com/nf-core/seqinspector/pull/63) Contribution guidelines added about displaying results for new tools + > > > > > > > 1ca5e188c2fc4f501b3bb123e97ebfc743ae5b06 ### `Fixed` diff --git a/docs/output.md b/docs/output.md index 659bf9d..e65f58c 100644 --- a/docs/output.md +++ b/docs/output.md @@ -70,7 +70,7 @@ Results generated by MultiQC collate pipeline QC from supported tools e.g. FastQ -[SeqkitStats](https://bioinf.shenwei.me/seqkit/usage/#stats) it gives general quality metrics about your sequenced reads including average read lengths, GC(%) and n50's. For further reading and documentation see the [Seqkit help pages]([Seqkit help](https://bioinf.shenwei.me/seqkit/)). +[SeqkitStats](https://bioinf.shenwei.me/seqkit/usage/#stats) it gives simple statistics such as number of sequences, min/max_len, N50, Q20%, Q30% and GC%. For further reading and documentation see the [Seqkit help pages]([Seqkit help](https://bioinf.shenwei.me/seqkit/)). ### Pipeline information diff --git a/modules.json b/modules.json index 6e3f6b0..334f22d 100644 --- a/modules.json +++ b/modules.json @@ -26,7 +26,7 @@ "nf-core": { "utils_nextflow_pipeline": { "branch": "master", - "git_sha": "3aa0aec1d52d492fe241919f0c6100ebf0074082", + "git_sha": "56372688d8979092cafbe0c5c3895b491166ca1c", "installed_by": ["subworkflows"] }, "utils_nfcore_pipeline": { @@ -36,7 +36,7 @@ }, "utils_nfschema_plugin": { "branch": "master", - "git_sha": "bbd5a41f4535a8defafe6080e00ea74c45f4f96c", + "git_sha": "2fd2cd6d0e7b273747f32e465fdc6bcc3ae0814e", "installed_by": ["subworkflows"] } } diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.workflow.nf.test b/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.workflow.nf.test index ca964ce..02dbf09 100644 --- a/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.workflow.nf.test +++ b/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.workflow.nf.test @@ -52,10 +52,12 @@ nextflow_workflow { } then { - assertAll( - { assert workflow.success }, - { assert workflow.stdout.contains("nextflow_workflow v9.9.9") } - ) + expect { + with(workflow) { + assert success + assert "nextflow_workflow v9.9.9" in stdout + } + } } } diff --git a/subworkflows/nf-core/utils_nfschema_plugin/tests/main.nf.test b/subworkflows/nf-core/utils_nfschema_plugin/tests/main.nf.test index 842dc43..8fb3016 100644 --- a/subworkflows/nf-core/utils_nfschema_plugin/tests/main.nf.test +++ b/subworkflows/nf-core/utils_nfschema_plugin/tests/main.nf.test @@ -42,7 +42,7 @@ nextflow_workflow { params { test_data = '' - outdir = 1 + outdir = null } workflow { @@ -94,7 +94,7 @@ nextflow_workflow { params { test_data = '' - outdir = 1 + outdir = null } workflow { diff --git a/tests/MiSeq.main.nf.test b/tests/MiSeq.main.nf.test index 8fbff4a..246a05a 100644 --- a/tests/MiSeq.main.nf.test +++ b/tests/MiSeq.main.nf.test @@ -21,7 +21,6 @@ nextflow_pipeline { path("$outputDir/multiqc/global_report/multiqc_data/multiqc_citations.txt"), path("$outputDir/multiqc/global_report/multiqc_data/multiqc_fastqc.txt"), path("$outputDir/multiqc/global_report/multiqc_data/multiqc_general_stats.txt"), - path("$outputDir/multiqc/global_report/multiqc_data/multiqc_software_versions.txt"), ).match() } ) diff --git a/tests/MiSeq.main.nf.test.snap b/tests/MiSeq.main.nf.test.snap index 4613d52..0742b5a 100644 --- a/tests/MiSeq.main.nf.test.snap +++ b/tests/MiSeq.main.nf.test.snap @@ -3,8 +3,7 @@ "content": [ "multiqc_citations.txt:md5,4c806e63a283ec1b7e78cdae3a923d4f", "multiqc_fastqc.txt:md5,7b1b7fd457b60404768045b148d4c0a8", - "multiqc_general_stats.txt:md5,5b28a83b14cb2fe88d084d08900ebdbf", - "multiqc_software_versions.txt:md5,a3698a2d32e8695c38d50e3d17de5fe3" + "multiqc_general_stats.txt:md5,5b28a83b14cb2fe88d084d08900ebdbf" ], "meta": { "nf-test": "0.9.0", @@ -12,4 +11,4 @@ }, "timestamp": "2024-10-28T13:18:10.3675973" } -} \ No newline at end of file +} diff --git a/tests/NovaSeq6000.main.nf.test b/tests/NovaSeq6000.main.nf.test index d050399..e24637c 100644 --- a/tests/NovaSeq6000.main.nf.test +++ b/tests/NovaSeq6000.main.nf.test @@ -21,27 +21,22 @@ nextflow_pipeline { path("$outputDir/multiqc/global_report/multiqc_data/multiqc_citations.txt"), path("$outputDir/multiqc/global_report/multiqc_data/multiqc_fastqc.txt"), path("$outputDir/multiqc/global_report/multiqc_data/multiqc_general_stats.txt"), - path("$outputDir/multiqc/global_report/multiqc_data/multiqc_software_versions.txt"), path("$outputDir/multiqc/group_reports/lane1/multiqc_data/multiqc_citations.txt"), path("$outputDir/multiqc/group_reports/lane1/multiqc_data/multiqc_fastqc.txt"), path("$outputDir/multiqc/group_reports/lane1/multiqc_data/multiqc_general_stats.txt"), - path("$outputDir/multiqc/group_reports/lane1/multiqc_data/multiqc_software_versions.txt"), path("$outputDir/multiqc/group_reports/group1/multiqc_data/multiqc_citations.txt"), path("$outputDir/multiqc/group_reports/group1/multiqc_data/multiqc_fastqc.txt"), path("$outputDir/multiqc/group_reports/group1/multiqc_data/multiqc_general_stats.txt"), - path("$outputDir/multiqc/group_reports/group1/multiqc_data/multiqc_software_versions.txt"), path("$outputDir/multiqc/group_reports/group2/multiqc_data/multiqc_citations.txt"), path("$outputDir/multiqc/group_reports/group2/multiqc_data/multiqc_fastqc.txt"), path("$outputDir/multiqc/group_reports/group2/multiqc_data/multiqc_general_stats.txt"), - path("$outputDir/multiqc/group_reports/group2/multiqc_data/multiqc_software_versions.txt"), path("$outputDir/multiqc/group_reports/test/multiqc_data/multiqc_citations.txt"), path("$outputDir/multiqc/group_reports/test/multiqc_data/multiqc_fastqc.txt"), path("$outputDir/multiqc/group_reports/test/multiqc_data/multiqc_general_stats.txt"), - path("$outputDir/multiqc/group_reports/test/multiqc_data/multiqc_software_versions.txt"), ).match() }, ) diff --git a/tests/NovaSeq6000.main.nf.test.snap b/tests/NovaSeq6000.main.nf.test.snap index ee3c22b..fc38ac5 100644 --- a/tests/NovaSeq6000.main.nf.test.snap +++ b/tests/NovaSeq6000.main.nf.test.snap @@ -4,23 +4,18 @@ "multiqc_citations.txt:md5,4c806e63a283ec1b7e78cdae3a923d4f", "multiqc_fastqc.txt:md5,3730f9046b20ac5c17a86db0a33f8d5d", "multiqc_general_stats.txt:md5,25abe0f6a35eb4a3b056fc3cf5c13732", - "multiqc_software_versions.txt:md5,a3698a2d32e8695c38d50e3d17de5fe3", "multiqc_citations.txt:md5,4c806e63a283ec1b7e78cdae3a923d4f", "multiqc_fastqc.txt:md5,8284e25ccc21041cf3b5a32eb6a51e78", "multiqc_general_stats.txt:md5,90ee35137492b80aab36ef67f72d8921", - "multiqc_software_versions.txt:md5,a3698a2d32e8695c38d50e3d17de5fe3", "multiqc_citations.txt:md5,4c806e63a283ec1b7e78cdae3a923d4f", "multiqc_fastqc.txt:md5,f38ffdc112c73af3a41ed15848a3761f", "multiqc_general_stats.txt:md5,d62a2fc39e674d98783d408791803148", - "multiqc_software_versions.txt:md5,a3698a2d32e8695c38d50e3d17de5fe3", "multiqc_citations.txt:md5,4c806e63a283ec1b7e78cdae3a923d4f", "multiqc_fastqc.txt:md5,7ff71ceb8ecdf086331047f8860c3347", "multiqc_general_stats.txt:md5,2f09b8f199ac40cf67ba50843cebd29c", - "multiqc_software_versions.txt:md5,a3698a2d32e8695c38d50e3d17de5fe3", "multiqc_citations.txt:md5,4c806e63a283ec1b7e78cdae3a923d4f", "multiqc_fastqc.txt:md5,519ff344a896ac369bba4d5c5b8be7b5", - "multiqc_general_stats.txt:md5,6a1c16f068d7ba3a9225a17eb570ed9a", - "multiqc_software_versions.txt:md5,a3698a2d32e8695c38d50e3d17de5fe3" + "multiqc_general_stats.txt:md5,6a1c16f068d7ba3a9225a17eb570ed9a" ], "meta": { "nf-test": "0.9.0", @@ -28,4 +23,4 @@ }, "timestamp": "2024-10-28T13:19:13.226135825" } -} \ No newline at end of file +} diff --git a/tests/PromethION.main.nf.test b/tests/PromethION.main.nf.test index 8fec8b3..ad6fe6d 100644 --- a/tests/PromethION.main.nf.test +++ b/tests/PromethION.main.nf.test @@ -21,7 +21,6 @@ nextflow_pipeline { path("$outputDir/multiqc/global_report/multiqc_data/multiqc_citations.txt"), path("$outputDir/multiqc/global_report/multiqc_data/multiqc_fastqc.txt"), path("$outputDir/multiqc/global_report/multiqc_data/multiqc_general_stats.txt"), - path("$outputDir/multiqc/global_report/multiqc_data/multiqc_software_versions.txt"), ).match() }, ) diff --git a/tests/PromethION.main.nf.test.snap b/tests/PromethION.main.nf.test.snap index 026a8cd..875673c 100644 --- a/tests/PromethION.main.nf.test.snap +++ b/tests/PromethION.main.nf.test.snap @@ -3,8 +3,7 @@ "content": [ "multiqc_citations.txt:md5,4c806e63a283ec1b7e78cdae3a923d4f", "multiqc_fastqc.txt:md5,1a4b472e13cadc770832b0e20d1de7b0", - "multiqc_general_stats.txt:md5,409cefc7f17f95d176ced6032bf8fb32", - "multiqc_software_versions.txt:md5,a3698a2d32e8695c38d50e3d17de5fe3" + "multiqc_general_stats.txt:md5,409cefc7f17f95d176ced6032bf8fb32" ], "meta": { "nf-test": "0.9.0", @@ -12,4 +11,4 @@ }, "timestamp": "2024-10-28T13:19:57.261730412" } -} \ No newline at end of file +} diff --git a/tests/nextflow.config b/tests/nextflow.config index 8d9ef46..1e56f44 100644 --- a/tests/nextflow.config +++ b/tests/nextflow.config @@ -8,14 +8,8 @@ params { config_profile_name = 'nf-test profile' config_profile_description = 'Configuration profile to use for nf-test.' - // Limit resources so that this can run on GitHub Actions - max_cpus = 2 - max_memory = '3.GB' - max_time = '2.h' - pipelines_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/' + modules_testdata_base_path = 's3://ngi-igenomes/testdata/nf-core/modules/' validationSchemaIgnoreParams = 'genomes,igenomes_base,pipelines_testdata_base_path' - - } diff --git a/workflows/seqinspector.nf b/workflows/seqinspector.nf index 74cb536..ebbf88a 100644 --- a/workflows/seqinspector.nf +++ b/workflows/seqinspector.nf @@ -89,10 +89,10 @@ workflow SEQINSPECTOR { .mix(ch_multiqc_extra_files) .collect(), ch_multiqc_config.toList(), - Channel.empty().toList(), + [], ch_multiqc_logo.toList(), - Channel.empty().toList(), - Channel.empty().toList() + [], + [] ) ch_tags = ch_multiqc_files @@ -148,9 +148,9 @@ workflow SEQINSPECTOR { ch_versions = ch_versions.mix(SEQKIT_STATS.out.versions.first()) emit: - global_report = MULTIQC_GLOBAL.out.report.toList() // channel: /path/to/multiqc_report.html + global_report = MULTIQC_GLOBAL.out.report.toList() // channel: [ /path/to/multiqc_report.html ] grouped_reports = MULTIQC_PER_TAG.out.report.toList() // channel: [ /path/to/multiqc_report.html ] - versions = ch_versions // channel: [ path(versions.yml) ] + versions = ch_versions // channel: [ path(versions.yml) ] } /*