diff --git a/subworkflows/nf-core/fasta_binning_concoct/main.nf b/subworkflows/nf-core/fasta_binning_concoct/main.nf index 94fae84b5ab..cdcf8826dce 100644 --- a/subworkflows/nf-core/fasta_binning_concoct/main.nf +++ b/subworkflows/nf-core/fasta_binning_concoct/main.nf @@ -35,7 +35,7 @@ workflow FASTA_BINNING_CONCOCT { ch_versions = ch_versions.mix( CONCOCT_MERGECUTUPCLUSTERING.out.versions.first()) ch_mergecutupclustering_for_extractfastabins = ch_fasta - .join(CONCOCT_MERGECUTUPCLUSTERING.out.csv, failOnMismatch: true) + .join(CONCOCT_MERGECUTUPCLUSTERING.out.csv, failOnMismatch: false) CONCOCT_EXTRACTFASTABINS ( ch_mergecutupclustering_for_extractfastabins ) ch_versions = ch_versions.mix(CONCOCT_EXTRACTFASTABINS.out.versions.first()) diff --git a/subworkflows/nf-core/fasta_binning_concoct/tests/main.nf.test b/subworkflows/nf-core/fasta_binning_concoct/tests/main.nf.test new file mode 100644 index 00000000000..ab5eb230820 --- /dev/null +++ b/subworkflows/nf-core/fasta_binning_concoct/tests/main.nf.test @@ -0,0 +1,46 @@ +nextflow_workflow { + + name "Test Subworkflow FASTA_BINNING_CONCOCT" + script "../main.nf" + workflow "FASTA_BINNING_CONCOCT" + + tag "subworkflows" + tag "subworkflows_nfcore" + tag "subworkflows/fasta_binning_concoct" + + tag "concoct" + tag "concoct/cutupfasta" + tag "concoct/concoctcoveragetable" + tag "concoct/concoct" + tag "concoct/mergecutupclustering" + tag "concoct/extractfastabins" + + + test("sarscov2 - genome - fasta") { + + when { + workflow { + """ + input[0] = Channel.of( + [[ id: 'test' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)], + [[ id: 'test2'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] + ) + + input[1] = Channel.of( + [[ id: 'test' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.single_end.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.single_end.sorted.bam.bai', checkIfExists: true)], + [[ id: 'test2'], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true)] + ) + """ + } + } + + then { + assertAll( + { assert workflow.success}, + { assert snapshot(workflow.out).match()} + ) + } + } +} diff --git a/subworkflows/nf-core/fasta_binning_concoct/tests/main.nf.test.snap b/subworkflows/nf-core/fasta_binning_concoct/tests/main.nf.test.snap new file mode 100644 index 00000000000..1e626dcfc5d --- /dev/null +++ b/subworkflows/nf-core/fasta_binning_concoct/tests/main.nf.test.snap @@ -0,0 +1,223 @@ +{ + "sarscov2 - genome - fasta": { + "content": [ + { + "0": [ + [ + { + "id": "test2" + }, + "test2.tsv:md5,3e0e31b009b3f4b4345df615a70a2835" + ], + [ + { + "id": "test" + }, + "test.tsv:md5,12b125c66c7e353fe206203d203f90be" + ] + ], + "1": [ + [ + { + "id": "test2" + }, + "test2_original_data_gt1000.csv:md5,afe4845db494e8c3d74c11950056c6b9" + ], + [ + { + "id": "test" + }, + "test_original_data_gt1000.csv:md5,5800a76203ca027b87ab14d323958ce2" + ] + ], + "2": [ + [ + { + "id": "test2" + }, + "test2_clustering_gt1000.csv:md5,8cb3e6901075bf07966d08e1816762ce" + ], + [ + { + "id": "test" + }, + "test_clustering_gt1000.csv:md5,8cb3e6901075bf07966d08e1816762ce" + ] + ], + "3": [ + [ + { + "id": "test2" + }, + "test2_PCA_components_data_gt1000.csv:md5,e935179f138edd7f4db6c8cd1fd90d48" + ], + [ + { + "id": "test" + }, + "test_PCA_components_data_gt1000.csv:md5,b4cae93ee69a00b366ab8d7c4e0d6191" + ] + ], + "4": [ + [ + { + "id": "test2" + }, + "test2_PCA_transformed_data_gt1000.csv:md5,7e39ef9d66adb948e75faa1c9a4d1542" + ], + [ + { + "id": "test" + }, + "test_PCA_transformed_data_gt1000.csv:md5,107ff5473b8b0479ede9043fc425e5ea" + ] + ], + "5": [ + [ + { + "id": "test2" + }, + "test2.csv:md5,ac57fce859cd28f5d18e1f4bbe056a35" + ], + [ + { + "id": "test" + }, + "test.csv:md5,ac57fce859cd28f5d18e1f4bbe056a35" + ] + ], + "6": [ + [ + { + "id": "test2" + }, + "test2_3.fa.gz:md5,483f4a5dfe60171c86ee9b7e6dff908b" + ], + [ + { + "id": "test" + }, + "test_3.fa.gz:md5,483f4a5dfe60171c86ee9b7e6dff908b" + ] + ], + "7": [ + "versions.yml:md5,02b573fc121beb734320d0e115ae4457", + "versions.yml:md5,4bc65b076c9549a3e935fbc16d7d33fe", + "versions.yml:md5,add0cb757a41623b081a19fad811b97e", + "versions.yml:md5,c8571a624e787edcad507c36c9dab06f", + "versions.yml:md5,f45abcb3924ba6847dea4997c62a7916" + ], + "bins": [ + [ + { + "id": "test2" + }, + "test2_3.fa.gz:md5,483f4a5dfe60171c86ee9b7e6dff908b" + ], + [ + { + "id": "test" + }, + "test_3.fa.gz:md5,483f4a5dfe60171c86ee9b7e6dff908b" + ] + ], + "cluster_table": [ + [ + { + "id": "test2" + }, + "test2.csv:md5,ac57fce859cd28f5d18e1f4bbe056a35" + ], + [ + { + "id": "test" + }, + "test.csv:md5,ac57fce859cd28f5d18e1f4bbe056a35" + ] + ], + "coverage_table": [ + [ + { + "id": "test2" + }, + "test2.tsv:md5,3e0e31b009b3f4b4345df615a70a2835" + ], + [ + { + "id": "test" + }, + "test.tsv:md5,12b125c66c7e353fe206203d203f90be" + ] + ], + "original_csv": [ + [ + { + "id": "test2" + }, + "test2_original_data_gt1000.csv:md5,afe4845db494e8c3d74c11950056c6b9" + ], + [ + { + "id": "test" + }, + "test_original_data_gt1000.csv:md5,5800a76203ca027b87ab14d323958ce2" + ] + ], + "pca_original": [ + [ + { + "id": "test2" + }, + "test2_PCA_components_data_gt1000.csv:md5,e935179f138edd7f4db6c8cd1fd90d48" + ], + [ + { + "id": "test" + }, + "test_PCA_components_data_gt1000.csv:md5,b4cae93ee69a00b366ab8d7c4e0d6191" + ] + ], + "pca_transformed": [ + [ + { + "id": "test2" + }, + "test2_PCA_transformed_data_gt1000.csv:md5,7e39ef9d66adb948e75faa1c9a4d1542" + ], + [ + { + "id": "test" + }, + "test_PCA_transformed_data_gt1000.csv:md5,107ff5473b8b0479ede9043fc425e5ea" + ] + ], + "raw_clustering_csv": [ + [ + { + "id": "test2" + }, + "test2_clustering_gt1000.csv:md5,8cb3e6901075bf07966d08e1816762ce" + ], + [ + { + "id": "test" + }, + "test_clustering_gt1000.csv:md5,8cb3e6901075bf07966d08e1816762ce" + ] + ], + "versions": [ + "versions.yml:md5,02b573fc121beb734320d0e115ae4457", + "versions.yml:md5,4bc65b076c9549a3e935fbc16d7d33fe", + "versions.yml:md5,add0cb757a41623b081a19fad811b97e", + "versions.yml:md5,c8571a624e787edcad507c36c9dab06f", + "versions.yml:md5,f45abcb3924ba6847dea4997c62a7916" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-25T18:40:35.774932002" + } +} \ No newline at end of file diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index fc75d4ba09a..dc4a8f8772d 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1663,9 +1663,6 @@ subworkflows/bam_variant_calling_sort_freebayes_bcftools: subworkflows/bed_scatter_bedtools: - subworkflows/nf-core/bed_scatter_bedtools/** - tests/subworkflows/nf-core/bed_scatter_bedtools/** -subworkflows/fasta_binning_concoct: - - subworkflows/nf-core/fasta_binning_concoct/** - - tests/subworkflows/nf-core/fasta_binning_concoct/** subworkflows/fasta_clean_fcs: - subworkflows/nf-core/fasta_clean_fcs/** - tests/subworkflows/nf-core/fasta_clean_fcs/** diff --git a/tests/subworkflows/nf-core/fasta_binning_concoct/main.nf b/tests/subworkflows/nf-core/fasta_binning_concoct/main.nf deleted file mode 100644 index 1b9ecca073d..00000000000 --- a/tests/subworkflows/nf-core/fasta_binning_concoct/main.nf +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { FASTA_BINNING_CONCOCT } from '../../../../subworkflows/nf-core/fasta_binning_concoct/main.nf' - -workflow test_fasta_binning_concoct { - - ch_fasta = Channel.of( - [[ id: 'test' ], file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)], - [[ id: 'test2'], file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)] - ) - ch_bam = Channel.of( - [[ id: 'test' ], file(params.test_data['sarscov2']['illumina']['test_single_end_sorted_bam'], checkIfExists: true), file(params.test_data['sarscov2']['illumina']['test_single_end_sorted_bam_bai'], checkIfExists: true)], - [[ id: 'test2'], file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true)] - ) - - FASTA_BINNING_CONCOCT ( ch_fasta, ch_bam ) -} diff --git a/tests/subworkflows/nf-core/fasta_binning_concoct/nextflow.config b/tests/subworkflows/nf-core/fasta_binning_concoct/nextflow.config deleted file mode 100644 index 8730f1c4b93..00000000000 --- a/tests/subworkflows/nf-core/fasta_binning_concoct/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} diff --git a/tests/subworkflows/nf-core/fasta_binning_concoct/test.yml b/tests/subworkflows/nf-core/fasta_binning_concoct/test.yml deleted file mode 100644 index 91c45b76c0b..00000000000 --- a/tests/subworkflows/nf-core/fasta_binning_concoct/test.yml +++ /dev/null @@ -1,56 +0,0 @@ -- name: fasta_binning_concoct test_fasta_binning_concoct - command: nextflow run ./tests/subworkflows/nf-core/fasta_binning_concoct -entry test_fasta_binning_concoct -c ./tests/config/nextflow.config - tags: - - concoct - - concoct/concoct - - concoct/concoctcoveragetable - - concoct/cutupfasta - - concoct/extractfastabins - - concoct/mergecutupclustering - - subworkflows - - subworkflows/fasta_binning_concoct - files: - - path: output/concoct/test/test_3.fa.gz - contains: ["MT192765.1"] - - path: output/concoct/test.bed - md5sum: 00fa42710340673c94b47fb9adada948 - - path: output/concoct/test.csv - md5sum: ac57fce859cd28f5d18e1f4bbe056a35 - - path: output/concoct/test.fasta - md5sum: b7d972e6efa0b306e02e46a685310c7f - - path: output/concoct/test.tsv - md5sum: 12b125c66c7e353fe206203d203f90be - - path: output/concoct/test2.bed - md5sum: 00fa42710340673c94b47fb9adada948 - - path: output/concoct/test2.csv - md5sum: ac57fce859cd28f5d18e1f4bbe056a35 - - path: output/concoct/test2.fasta - md5sum: b7d972e6efa0b306e02e46a685310c7f - - path: output/concoct/test2.tsv - md5sum: 3e0e31b009b3f4b4345df615a70a2835 - - path: output/concoct/test2_PCA_components_data_gt1000.csv - md5sum: 47065387891911c1aa29e399d3c01256 - - path: output/concoct/test2_PCA_transformed_data_gt1000.csv - md5sum: 36696aa9b1686ddfd70b2429cf681790 - - path: output/concoct/test2_args.txt - contains: ["basename"] - - path: output/concoct/test2_clustering_gt1000.csv - md5sum: 8cb3e6901075bf07966d08e1816762ce - - path: output/concoct/test2_log.txt - contains: - - "CONCOCT Finished, the log shows how it went." - - path: output/concoct/test2_original_data_gt1000.csv - md5sum: afe4845db494e8c3d74c11950056c6b9 - - path: output/concoct/test_PCA_components_data_gt1000.csv - md5sum: 94282dbd1febc0958ac87befaa4bc789 - - path: output/concoct/test_PCA_transformed_data_gt1000.csv - md5sum: bc243537afcce37bce45beca28cca75b - - path: output/concoct/test_args.txt - contains: ["basename"] - - path: output/concoct/test_clustering_gt1000.csv - md5sum: 8cb3e6901075bf07966d08e1816762ce - - path: output/concoct/test_log.txt - contains: - - "CONCOCT Finished, the log shows how it went." - - path: output/concoct/test_original_data_gt1000.csv - md5sum: 5800a76203ca027b87ab14d323958ce2