diff --git a/CHANGELOG.md b/CHANGELOG.md index 856667de..43c15bec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ Thank you to everyone else that has contributed by reporting bugs, enhancements - [PR #259](https://github.com/nf-core/fetchngs/pull/259) - Add Aspera CLI download support to pipeline ([#68](https://github.com/nf-core/fetchngs/issues/68)) - [PR #261](https://github.com/nf-core/fetchngs/pull/261) - Revert sratools fasterqdump version ([#221](https://github.com/nf-core/fetchngs/issues/221)) - [PR #262](https://github.com/nf-core/fetchngs/pull/262) - Use nf-test version v0.8.4 and remove implicit tags +- [PR #263](https://github.com/nf-core/fetchngs/pull/263) - Refine tags used for workflows ### Software dependencies diff --git a/modules.json b/modules.json index 9190e3f5..14bd461f 100644 --- a/modules.json +++ b/modules.json @@ -7,7 +7,7 @@ "nf-core": { "custom/sratoolsncbisettings": { "branch": "master", - "git_sha": "e719354ba77df0a1bd310836aa2039b45c29d620", + "git_sha": "3aa09ac8899d7735cb5bc004da0ef5f35f9a7901", "installed_by": ["fastq_download_prefetch_fasterqdump_sratools"] }, "sratools/fasterqdump": { @@ -32,7 +32,7 @@ "nf-core": { "fastq_download_prefetch_fasterqdump_sratools": { "branch": "master", - "git_sha": "bdfd7bc8d2e5a93531e14bd94c4128d9a72a2435", + "git_sha": "3aa09ac8899d7735cb5bc004da0ef5f35f9a7901", "installed_by": ["subworkflows"] }, "utils_nextflow_pipeline": { diff --git a/modules/nf-core/custom/sratoolsncbisettings/main.nf b/modules/nf-core/custom/sratoolsncbisettings/main.nf index ba9441c9..577117ed 100644 --- a/modules/nf-core/custom/sratoolsncbisettings/main.nf +++ b/modules/nf-core/custom/sratoolsncbisettings/main.nf @@ -7,6 +7,9 @@ process CUSTOM_SRATOOLSNCBISETTINGS { 'https://depot.galaxyproject.org/singularity/sra-tools:3.0.8--h9f5acd7_0' : 'biocontainers/sra-tools:3.0.8--h9f5acd7_0' }" + input: + val ids + output: path('*.mkfg') , emit: ncbi_settings path 'versions.yml', emit: versions diff --git a/modules/nf-core/custom/sratoolsncbisettings/tests/main.nf.test b/modules/nf-core/custom/sratoolsncbisettings/tests/main.nf.test index 11899742..8cd0de8a 100644 --- a/modules/nf-core/custom/sratoolsncbisettings/tests/main.nf.test +++ b/modules/nf-core/custom/sratoolsncbisettings/tests/main.nf.test @@ -4,18 +4,19 @@ nextflow_process { script "../main.nf" process "CUSTOM_SRATOOLSNCBISETTINGS" config "modules/nf-core/custom/sratoolsncbisettings/tests/nextflow.config" - + test("Should run without failures") { when { params { settings_path = '/tmp/.ncbi' settings_file = "${params.settings_path}/user-settings.mkfg" - outdir = "$outputDir" + outdir = "$outputDir" } process { """ + input[0] = ["SRX6725035"] file(params.settings_path).mkdirs() def settings = file(params.modules_testdata_base_path + 'generic/config/ncbi_user_settings.mkfg', checkIfExists: true) settings.copyTo(params.settings_file) diff --git a/subworkflows/local/utils_nfcore_fetchngs_pipeline/tests/main.workflow_pipeline_completion.test b/subworkflows/local/utils_nfcore_fetchngs_pipeline/tests/main.workflow_pipeline_completion.nf.test similarity index 96% rename from subworkflows/local/utils_nfcore_fetchngs_pipeline/tests/main.workflow_pipeline_completion.test rename to subworkflows/local/utils_nfcore_fetchngs_pipeline/tests/main.workflow_pipeline_completion.nf.test index cfbfab4c..b41fca23 100644 --- a/subworkflows/local/utils_nfcore_fetchngs_pipeline/tests/main.workflow_pipeline_completion.test +++ b/subworkflows/local/utils_nfcore_fetchngs_pipeline/tests/main.workflow_pipeline_completion.nf.test @@ -3,6 +3,7 @@ nextflow_workflow { name "Test Workflow PIPELINE_COMPLETION" script "subworkflows/local/utils_nfcore_fetchngs_pipeline/main.nf" workflow "PIPELINE_COMPLETION" + tag "UTILS_NFCORE_FETCHNGS_PIPELINE" test("Should run") { diff --git a/subworkflows/local/utils_nfcore_fetchngs_pipeline/tests/main.workflow_pipeline_initialisation.nf.test b/subworkflows/local/utils_nfcore_fetchngs_pipeline/tests/main.workflow_pipeline_initialisation.nf.test index 611eaee7..3d107f3c 100644 --- a/subworkflows/local/utils_nfcore_fetchngs_pipeline/tests/main.workflow_pipeline_initialisation.nf.test +++ b/subworkflows/local/utils_nfcore_fetchngs_pipeline/tests/main.workflow_pipeline_initialisation.nf.test @@ -3,6 +3,7 @@ nextflow_workflow { name "Test Workflow PIPELINE_INITIALISATION" script "subworkflows/local/utils_nfcore_fetchngs_pipeline/main.nf" workflow "PIPELINE_INITIALISATION" + tag "UTILS_NFCORE_FETCHNGS_PIPELINE" test("Should run") { diff --git a/subworkflows/nf-core/fastq_download_prefetch_fasterqdump_sratools/main.nf b/subworkflows/nf-core/fastq_download_prefetch_fasterqdump_sratools/main.nf index de31637e..fbeacf4a 100644 --- a/subworkflows/nf-core/fastq_download_prefetch_fasterqdump_sratools/main.nf +++ b/subworkflows/nf-core/fastq_download_prefetch_fasterqdump_sratools/main.nf @@ -17,7 +17,7 @@ workflow FASTQ_DOWNLOAD_PREFETCH_FASTERQDUMP_SRATOOLS { // // Detect existing NCBI user settings or create new ones. // - CUSTOM_SRATOOLSNCBISETTINGS() + CUSTOM_SRATOOLSNCBISETTINGS ( ch_sra_ids.collect() ) ch_ncbi_settings = CUSTOM_SRATOOLSNCBISETTINGS.out.ncbi_settings ch_versions = ch_versions.mix(CUSTOM_SRATOOLSNCBISETTINGS.out.versions) diff --git a/subworkflows/nf-core/fastq_download_prefetch_fasterqdump_sratools/tests/main.nf.test.snap b/subworkflows/nf-core/fastq_download_prefetch_fasterqdump_sratools/tests/main.nf.test.snap index 63ba2e99..d64857ef 100644 --- a/subworkflows/nf-core/fastq_download_prefetch_fasterqdump_sratools/tests/main.nf.test.snap +++ b/subworkflows/nf-core/fastq_download_prefetch_fasterqdump_sratools/tests/main.nf.test.snap @@ -3,7 +3,11 @@ "content": [ 19996 ], - "timestamp": "2024-01-30T18:05:15.684489" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-01T08:34:54.56022" }, "test_pe_reads_2_lines": { "content": [ @@ -16,13 +20,21 @@ "GTGCACTCACGCAGTATAATTAATAACTAATTACTGTCGTTGACAGGACACGAGTAACTCGTCTATCTTCTGCAGGCTGCTTACGGTTTCGTCCGTGTTGCAGCCGATCATCAGCACATCTAGGTTTCGTCCGGGTGTGACCGAAAGGTAAGATGGAGAGCCTTGTCCCTGGTTTCAACGAGAAAACACACGTCCAACTCAGTTTGCCTGTTTTACAGGTTCGCGACGTGCTCGTACG" ] ], - "timestamp": "2024-01-30T18:05:15.670447" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-01T08:34:54.532626" }, "test_pe_reads_2_size": { "content": [ 2011460 ], - "timestamp": "2024-01-30T18:05:15.675771" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-01T08:34:54.542804" }, "versions": { "content": [ @@ -32,13 +44,21 @@ "versions.yml:md5,98d78bba9f3da39a0b7db6e9c7dcc224" ] ], - "timestamp": "2024-01-30T18:05:15.692165" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-01T08:34:54.570734" }, "test_pe_reads_1_size": { "content": [ 2013376 ], - "timestamp": "2024-01-30T18:05:15.666916" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-01T08:34:54.525795" }, "test_se_reads_lines": { "content": [ @@ -51,7 +71,11 @@ "ACGCAGGTGCCAGCAGCCGCGGTAATACGGAGGGAGCTAGCGTTGTTCGGAATTACTGGGCGTAAAGCGCACGTAGGCGGCTTTTCAAGTCAGGGGTGGAAATACCCGGGGCCGTCAACCCGACCG" ] ], - "timestamp": "2024-01-30T18:05:15.679779" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-01T08:34:54.550392" }, "test_pe_reads_1_lines": { "content": [ @@ -64,6 +88,10 @@ "CGTACGAGCACGTCGCGAACCTGTAAAACAGGCAAACTGAGTTGGACGTGTGTTTTCTCGTTGAAACCAGGGACAAGGCTCTCCATCTTACCTTTCGGTCACACCCGGACGAAACCTAGATGTGCTGATGATCGGCTGCAACACGGACGAAACCGTAAGCAGCCTGCAGAAGATAGACGAGTTACTCGTGTCCTGTCAACGACAGTAATTAGTTATTAATTATACTGCGTGAGTGCAC" ] ], - "timestamp": "2024-01-30T18:05:15.654112" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-01T08:34:54.509486" } } \ No newline at end of file diff --git a/workflows/sra/tests/main.nf.test b/workflows/sra/tests/main.nf.test index c08f345a..69ad7f42 100644 --- a/workflows/sra/tests/main.nf.test +++ b/workflows/sra/tests/main.nf.test @@ -3,14 +3,14 @@ nextflow_workflow { name "Test workflow: sra/main.nf" script "../main.nf" workflow "SRA" + tag "SRA_DEFAULT" // Dependencies - tag "MULTIQC_MAPPINGS_CONFIG" - tag "ASPERA_CLI" - tag "SRA_FASTQ_FTP" tag "SRA_IDS_TO_RUNINFO" tag "SRA_RUNINFO_TO_FTP" + tag "ASPERA_CLI" tag "SRA_TO_SAMPLESHEET" + tag "MULTIQC_MAPPINGS_CONFIG" test("Parameters: default") { diff --git a/workflows/sra/tests/sra_custom_ena_metadata_fields.nf.test b/workflows/sra/tests/sra_custom_ena_metadata_fields.nf.test index 5fd4882b..98d1432d 100644 --- a/workflows/sra/tests/sra_custom_ena_metadata_fields.nf.test +++ b/workflows/sra/tests/sra_custom_ena_metadata_fields.nf.test @@ -3,17 +3,14 @@ nextflow_workflow { name "Test workflow: sra/main.nf" script "../main.nf" workflow "SRA" + tag "SRA_CUSTOM_ENA_METADATA_FIELDS" - // Subworkflows - tag "SRA" - - // Modules - tag "MULTIQC_MAPPINGS_CONFIG" - tag "ASPERA_CLI" - tag "SRA_FASTQ_FTP" + // Dependencies tag "SRA_IDS_TO_RUNINFO" tag "SRA_RUNINFO_TO_FTP" + tag "SRA_FASTQ_FTP" tag "SRA_TO_SAMPLESHEET" + tag "MULTIQC_MAPPINGS_CONFIG" test("Parameters: --nf_core_pipeline rnaseq --ena_metadata_fields ... --sample_mapping_fields ...") { diff --git a/workflows/sra/tests/sra_force_ftp_download.nf.test b/workflows/sra/tests/sra_force_ftp_download.nf.test new file mode 100644 index 00000000..357bd180 --- /dev/null +++ b/workflows/sra/tests/sra_force_ftp_download.nf.test @@ -0,0 +1,56 @@ +nextflow_workflow { + + name "Test workflow: sra/main.nf" + script "../main.nf" + workflow "SRA" + tag "SRA_FORCE_FTP_DOWNLOAD" + + // Dependencies + tag "SRA_IDS_TO_RUNINFO" + tag "SRA_RUNINFO_TO_FTP" + tag "SRA_FASTQ_FTP" + tag "SRA_TO_SAMPLESHEET" + tag "MULTIQC_MAPPINGS_CONFIG" + + test("Parameters: --force_ftp_download") { + + when { + workflow { + """ + input[0] = Channel.from("DRX026011", "ERX1234253", "SRX6725035") + """ + } + params { + outdir = "$outputDir" + force_ftp_download = true + } + } + + then { + assert workflow.success + + assertAll( + { + with(workflow.out.samplesheet) { + assert path(get(0)).readLines().size() == 4 + assert path(get(0)).readLines()*.split(',')[0].take(4) == ['"sample"', '"fastq_1"', '"fastq_2"', '"run_accession"'] + assert path(get(0)).readLines()*.split(',').collect { it[0] } == ['"sample"', '"DRX026011"', '"ERX1234253"', '"SRX6725035"'] + assert path(get(0)).text.contains('Illumina HiSeq 2500') + } + }, + { + with(workflow.out.mappings) { + assert path(get(0)).readLines().size() == 4 + assert path(get(0)).readLines()*.split(',').collect { it[0] } == ['"sample"', '"DRX026011"', '"ERX1234253"', '"SRX6725035"'] + assert path(get(0)).text.contains('Illumina HiSeq 2500') + } + }, + { + with(workflow.out.sample_mappings) { + assert path(get(0)[0]).md5 == "1ac06bb95b503703430e74660bbdd768" + } + } + ) + } + } +} diff --git a/workflows/sra/tests/sra_force_sratools_download.nf.test b/workflows/sra/tests/sra_force_sratools_download.nf.test index 2d01c694..62d499df 100644 --- a/workflows/sra/tests/sra_force_sratools_download.nf.test +++ b/workflows/sra/tests/sra_force_sratools_download.nf.test @@ -3,16 +3,14 @@ nextflow_workflow { name "Test workflow: sra/main.nf" script "../main.nf" workflow "SRA" + tag "SRA_FORCE_SRATOOLS_DOWNLOAD" - // Subworkflows - tag "SRA" - - // Modules - tag "MULTIQC_MAPPINGS_CONFIG" - tag "SRA_FASTQ_FTP" + // Dependencies + tag "FASTQ_DOWNLOAD_PREFETCH_FASTERQDUMP_SRATOOLS" tag "SRA_IDS_TO_RUNINFO" tag "SRA_RUNINFO_TO_FTP" tag "SRA_TO_SAMPLESHEET" + tag "MULTIQC_MAPPINGS_CONFIG" test("Parameters: --force_sratools_download") { diff --git a/workflows/sra/tests/sra_nf_core_pipeline_atacseq.nf.test b/workflows/sra/tests/sra_nf_core_pipeline_atacseq.nf.test index ce77baa2..26cac4b9 100644 --- a/workflows/sra/tests/sra_nf_core_pipeline_atacseq.nf.test +++ b/workflows/sra/tests/sra_nf_core_pipeline_atacseq.nf.test @@ -3,17 +3,14 @@ nextflow_workflow { name "Test workflow: sra/main.nf" script "../main.nf" workflow "SRA" + tag "SRA_NF_CORE_PIPELINE_ATACSEQ" - // Subworkflows - tag "SRA" - - // Modules - tag "MULTIQC_MAPPINGS_CONFIG" - tag "ASPERA_CLI" - tag "SRA_FASTQ_FTP" + // Dependencies tag "SRA_IDS_TO_RUNINFO" tag "SRA_RUNINFO_TO_FTP" + tag "ASPERA_CLI" tag "SRA_TO_SAMPLESHEET" + tag "MULTIQC_MAPPINGS_CONFIG" test("Parameters: --nf_core_pipeline atacseq") { diff --git a/workflows/sra/tests/sra_nf_core_pipeline_rnaseq.nf.test b/workflows/sra/tests/sra_nf_core_pipeline_rnaseq.nf.test index 99c7dbc5..b5a49dd4 100644 --- a/workflows/sra/tests/sra_nf_core_pipeline_rnaseq.nf.test +++ b/workflows/sra/tests/sra_nf_core_pipeline_rnaseq.nf.test @@ -3,17 +3,14 @@ nextflow_workflow { name "Test workflow: sra/main.nf" script "../main.nf" workflow "SRA" + tag "SRA_NF_CORE_PIPELINE_RNASEQ" - // Subworkflows - tag "SRA" - - // Modules - tag "MULTIQC_MAPPINGS_CONFIG" - tag "ASPERA_CLI" - tag "SRA_FASTQ_FTP" + // Dependencies tag "SRA_IDS_TO_RUNINFO" tag "SRA_RUNINFO_TO_FTP" + tag "ASPERA_CLI" tag "SRA_TO_SAMPLESHEET" + tag "MULTIQC_MAPPINGS_CONFIG" test("Parameters: --nf_core_pipeline rnaseq") { diff --git a/workflows/sra/tests/sra_nf_core_pipeline_taxprofiler.nf.test b/workflows/sra/tests/sra_nf_core_pipeline_taxprofiler.nf.test index d48a714e..0a92b446 100644 --- a/workflows/sra/tests/sra_nf_core_pipeline_taxprofiler.nf.test +++ b/workflows/sra/tests/sra_nf_core_pipeline_taxprofiler.nf.test @@ -3,17 +3,14 @@ nextflow_workflow { name "Test workflow: sra/main.nf" script "../main.nf" workflow "SRA" + tag "SRA_NF_CORE_PIPELINE_TAXPROFILER" - // Subworkflows - tag "SRA" - - // Modules - tag "MULTIQC_MAPPINGS_CONFIG" - tag "ASPERA_CLI" - tag "SRA_FASTQ_FTP" + // Dependencies tag "SRA_IDS_TO_RUNINFO" tag "SRA_RUNINFO_TO_FTP" + tag "ASPERA_CLI" tag "SRA_TO_SAMPLESHEET" + tag "MULTIQC_MAPPINGS_CONFIG" test("Parameters: --nf_core_pipeline taxprofiler") { diff --git a/workflows/sra/tests/sra_nf_core_pipeline_viralrecon.nf.test b/workflows/sra/tests/sra_nf_core_pipeline_viralrecon.nf.test index def5c3cf..f633e0d6 100644 --- a/workflows/sra/tests/sra_nf_core_pipeline_viralrecon.nf.test +++ b/workflows/sra/tests/sra_nf_core_pipeline_viralrecon.nf.test @@ -3,17 +3,14 @@ nextflow_workflow { name "Test workflow: sra/main.nf" script "../main.nf" workflow "SRA" + tag "SRA_NF_CORE_PIPELINE_VIRALRECON" - // Subworkflows - tag "SRA" - - // Modules - tag "MULTIQC_MAPPINGS_CONFIG" - tag "ASPERA_CLI" - tag "SRA_FASTQ_FTP" + // Dependencies tag "SRA_IDS_TO_RUNINFO" tag "SRA_RUNINFO_TO_FTP" + tag "ASPERA_CLI" tag "SRA_TO_SAMPLESHEET" + tag "MULTIQC_MAPPINGS_CONFIG" test("Parameters: --nf_core_pipeline viralrecon") { diff --git a/workflows/sra/tests/sra_skip_fastq_download.nf.test b/workflows/sra/tests/sra_skip_fastq_download.nf.test index f9a79e15..245dbb80 100644 --- a/workflows/sra/tests/sra_skip_fastq_download.nf.test +++ b/workflows/sra/tests/sra_skip_fastq_download.nf.test @@ -3,16 +3,13 @@ nextflow_workflow { name "Test workflow: sra/main.nf" script "../main.nf" workflow "SRA" + tag "SRA_SKIP_FASTQ_DOWNLOAD" - // Subworkflows - tag "SRA" - - // Modules - tag "MULTIQC_MAPPINGS_CONFIG" - tag "SRA_FASTQ_FTP" + // Dependencies tag "SRA_IDS_TO_RUNINFO" tag "SRA_RUNINFO_TO_FTP" tag "SRA_TO_SAMPLESHEET" + tag "MULTIQC_MAPPINGS_CONFIG" test("Parameters: --skip_fastq_download") {