diff --git a/modules/nf-core/sentieon/README.md b/modules/nf-core/sentieon/README.md index 892aa9167f0..967613a1abe 100644 --- a/modules/nf-core/sentieon/README.md +++ b/modules/nf-core/sentieon/README.md @@ -67,8 +67,18 @@ The Server IP doesn't matter either because they would also need the `SENTIEON_E ## Local Testing ```bash -export SENTIEON_AUTH_MECH="GitHub Actions - token" export SENTIEON_LICSRVR_IP=$(op read "op://Dev/Sentieon License Server/SENTIEON_LICSRVR_IP") +``` + +For `SENTIEON_LICSRVR_IP` you can use your own server IP. + +Additionally, the following may be necessary. If you don't know either key, you probably don't need it: + +
+Optional configuration + +```bash +export SENTIEON_AUTH_MECH="GitHub Actions - token" SENTIEON_ENCRYPTION_KEY=$(op read "op://Dev/Sentieon License Server/GitHub Secrets/SENTIEON_ENCRYPTION_KEY") SENTIEON_LICENSE_MESSAGE=$(op read "op://Dev/Sentieon License Server/GitHub Secrets/SENTIEON_LICENSE_MESSAGE") nextflow secrets set SENTIEON_AUTH_DATA $(python3 tests/modules/nf-core/sentieon/license_message.py encrypt --key "$SENTIEON_ENCRYPTION_KEY" --message "$SENTIEON_LICENSE_MESSAGE") @@ -76,3 +86,5 @@ nextflow secrets set SENTIEON_AUTH_DATA $(python3 tests/modules/nf-core/sentieon > [!NOTE] > If this fails run `op signin` to flip to nf-core account + +
diff --git a/modules/nf-core/sentieon/bwamem/tests/main.nf.test b/modules/nf-core/sentieon/bwamem/tests/main.nf.test index 159fde8cb69..a55a2a0dd1f 100644 --- a/modules/nf-core/sentieon/bwamem/tests/main.nf.test +++ b/modules/nf-core/sentieon/bwamem/tests/main.nf.test @@ -48,151 +48,173 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - process.out.bam_and_bai, - process.out.versions, - file(process.out.bam_and_bai[0][1]).name - ).match() + { assert snapshot(process.out).match() } + ) + } + + } + + test("Paired-End") { + config "./nextflow.config" + + setup { + run("SENTIEON_BWAINDEX") { + script "../../bwaindex/main.nf" + process { + """ + input[0] = [ + [id: 'test'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + """ } + } + } + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) + ] + ] + input[1] = SENTIEON_BWAINDEX.out.index + input[2] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] + input[3] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)] + """ + } + } + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) + ] + ] + input[1] = SENTIEON_BWAINDEX.out.index + input[2] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] + input[3] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("Single-End - stub") { + config "./nextflow.config" + options "-stub" + + setup { + run("SENTIEON_BWAINDEX") { + script "../../bwaindex/main.nf" + process { + """ + input[0] = [ + [id: 'test'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + """ + } + } + } + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:true ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) + ] + ] + input[1] = SENTIEON_BWAINDEX.out.index + input[2] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] + input[3] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } ) } } - // TODO - // test("Paired-End") { - - // setup { - // run("BWA_INDEX") { - // script "../../index/main.nf" - // process { - // """ - // input[0] = [ - // [id: 'test'], - // file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - // ] - // """ - // } - // } - // } - - // when { - // process { - // """ - // input[0] = [ - // [ id:'test', single_end:false ], // meta map - // [ - // file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), - // file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) - // ] - // ] - // input[1] = BWA_INDEX.out.index - // input[2] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] - // input[3] = false - // """ - // } - // } - - // then { - // assertAll( - // { assert process.success }, - // { assert snapshot( - // process.out.cram, - // process.out.csi, - // process.out.crai, - // process.out.versions, - // file(process.out.bam[0][1]).name - // ).match() - // } - // ) - // } - - // } - - // test("Single-end - stub") { - // options "-stub" - // setup { - // run("BWA_INDEX") { - // script "../../index/main.nf" - // process { - // """ - // input[0] = [ - // [id: 'test'], - // file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - // ] - // """ - // } - // } - // } - // when { - // process { - // """ - // input[0] = [ - // [ id:'test', single_end:true ], // meta map - // [ - // file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) - // ] - // ] - // input[1] = BWA_INDEX.out.index - // input[2] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] - // input[3] = false - // """ - // } - // } - - // then { - // assertAll( - // { assert process.success }, - // { assert snapshot( - // file(process.out.bam[0][1]).name, - // file(process.out.csi[0][1]).name, - // process.out.versions - // ).match() } - // ) - // } - // } - - // test("Paired-end - stub") { - // options "-stub" - // setup { - // run("BWA_INDEX") { - // script "../../index/main.nf" - // process { - // """ - // input[0] = [ - // [id: 'test'], - // file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - // ] - // """ - // } - // } - // } - // when { - // process { - // """ - // input[0] = [ - // [ id:'test', single_end:false ], // meta map - // [ - // file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), - // file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) - // ] - // ] - // input[1] = BWA_INDEX.out.index - // input[2] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] - // input[3] = false - // """ - // } - // } - - // then { - // assertAll( - // { assert process.success }, - // { assert snapshot( - // file(process.out.bam[0][1]).name, - // file(process.out.csi[0][1]).name, - // process.out.versions - // ).match() } - // ) - // } - // } + test("Paired-End - stub") { + config "./nextflow.config" + options "-stub" + + setup { + run("SENTIEON_BWAINDEX") { + script "../../bwaindex/main.nf" + process { + """ + input[0] = [ + [id: 'test'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + """ + } + } + } + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) + ] + ] + input[1] = SENTIEON_BWAINDEX.out.index + input[2] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] + input[3] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)] + """ + } + } + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) + ] + ] + input[1] = SENTIEON_BWAINDEX.out.index + input[2] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] + input[3] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + } diff --git a/modules/nf-core/sentieon/bwamem/tests/main.nf.test.snap b/modules/nf-core/sentieon/bwamem/tests/main.nf.test.snap index bc5824c0c2c..bb22cf4ecb8 100644 --- a/modules/nf-core/sentieon/bwamem/tests/main.nf.test.snap +++ b/modules/nf-core/sentieon/bwamem/tests/main.nf.test.snap @@ -1,25 +1,150 @@ { "Single-End": { "content": [ - [ - [ - { - "id": "test", - "single_end": true - }, - "test.bam:md5,58bc2194d084cf8462a3a7f6114c303a", - "test.bam.bai:md5,4fd9b026ff2306cc292cd695e11d5628" + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bam:md5,58bc2194d084cf8462a3a7f6114c303a", + "test.bam.bai:md5,4fd9b026ff2306cc292cd695e11d5628" + ] + ], + "1": [ + "versions.yml:md5,6095ad80036c5d876c2616504a21efcc" + ], + "bam_and_bai": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bam:md5,58bc2194d084cf8462a3a7f6114c303a", + "test.bam.bai:md5,4fd9b026ff2306cc292cd695e11d5628" + ] + ], + "versions": [ + "versions.yml:md5,6095ad80036c5d876c2616504a21efcc" ] - ], - [ - "versions.yml:md5,6095ad80036c5d876c2616504a21efcc" - ], - "test.bam" + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-07-02T21:21:33.954680566" + "timestamp": "2024-07-23T19:02:39.182612" + }, + "Paired-End - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,6095ad80036c5d876c2616504a21efcc" + ], + "bam_and_bai": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,6095ad80036c5d876c2616504a21efcc" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-23T19:03:13.132829" + }, + "Paired-End": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam:md5,3418d864f42215d1c0c8d604d9571b0d", + "test.bam.bai:md5,be4ad85790468042f7fc01ca2e36a919" + ] + ], + "1": [ + "versions.yml:md5,6095ad80036c5d876c2616504a21efcc" + ], + "bam_and_bai": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam:md5,3418d864f42215d1c0c8d604d9571b0d", + "test.bam.bai:md5,be4ad85790468042f7fc01ca2e36a919" + ] + ], + "versions": [ + "versions.yml:md5,6095ad80036c5d876c2616504a21efcc" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-23T19:02:50.152082" + }, + "Single-End - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,6095ad80036c5d876c2616504a21efcc" + ], + "bam_and_bai": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,6095ad80036c5d876c2616504a21efcc" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-23T19:03:01.770585" } } \ No newline at end of file