diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 43fe9733d3a..4c22ed82bed 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -344,14 +344,10 @@ jobs: tags: nanoplot - profile: conda tags: ncbitools/vecscreen - - profile: conda - tags: parabricks/applybqsr - profile: conda tags: parabricks/dbsnp - profile: conda tags: parabricks/deepvariant - - profile: conda - tags: parabricks/fq2bam - profile: conda tags: parabricks/genotypegvcf - profile: conda @@ -648,18 +644,6 @@ jobs: path: modules/nf-core/islandpath - profile: conda path: modules/nf-core/scimap/mcmicro - - profile: conda - path: modules/nf-core/parabricks/fq2bammeth - - profile: docker_self_hosted - path: modules/nf-core/parabricks/fq2bammeth - - profile: singularity - path: modules/nf-core/parabricks/fq2bammeth - - profile: conda - path: modules/nf-core/parabricks/fq2bam - - profile: docker_self_hosted - path: modules/nf-core/parabricks/fq2bam - - profile: singularity - path: modules/nf-core/parabricks/fq2bam - profile: conda path: subworkflows/nf-core/vcf_annotate_ensemblvep - profile: conda @@ -672,6 +656,9 @@ jobs: path: subworkflows/nf-core/fastq_align_bwa - profile: conda path: subworkflows/nf-core/fasta_newick_epang_gappa + - path: modules/nf-core/parabricks/fq2bammeth + - path: modules/nf-core/parabricks/fq2bam + - path: modules/nf-core/parabricks/applybqsr - profile: conda path: modules/nf-core/xeniumranger/relabel - profile: conda @@ -786,6 +773,131 @@ jobs: run: | sudo rm -rf /home/ubuntu/tests/ + nf-test-gpu: + runs-on: ${{ github.event.inputs.runners || 'gpu' }} + name: nf-test with GPUs + needs: [nf-test-changes] + if: ( needs.nf-test-changes.outputs.paths != '[]' ) + strategy: + fail-fast: false + matrix: + path: ["${{ fromJson(needs.nf-test-changes.outputs.paths) }}"] + profile: [conda, docker_self_hosted, singularity] + include: + - path: modules/nf-core/parabricks/applybqsr + - path: modules/nf-core/parabricks/fq2bam + # - path: modules/nf-core/parabricks/fq2bammeth excluded - tackle in different PR + exclude: + - profile: conda + path: modules/nf-core/parabricks/fq2bam + - profile: conda + path: modules/nf-core/parabricks/fq2bammeth + - profile: conda + path: modules/nf-core/parabricks/applybqsr + env: + NXF_ANSI_LOG: false + NFTEST_VER: "0.9.0" + SENTIEON_LICENSE_MESSAGE: ${{ secrets.SENTIEON_LICENSE_MESSAGE }} + SENTIEON_ENCRYPTION_KEY: ${{ secrets.SENTIEON_ENCRYPTION_KEY }} + + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + + - uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4 + with: + distribution: "temurin" + java-version: "17" + - name: Setup Nextflow + uses: nf-core/setup-nextflow@v2 + + - name: Install nf-test + uses: nf-core/setup-nf-test@v1 + with: + version: ${{ env.NFTEST_VER }} + + - name: Setup apptainer + if: matrix.profile == 'singularity' + uses: eWaterCycle/setup-apptainer@main + + - name: Set up Singularity + if: matrix.profile == 'singularity' + run: | + mkdir -p $NXF_SINGULARITY_CACHEDIR + mkdir -p $NXF_SINGULARITY_LIBRARYDIR + + - name: Set up Python + uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5 + with: + python-version: "3.11" + + - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4 + id: cache-pip-pdiff + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-pdiff + restore-keys: | + ${{ runner.os }}-pip-pdiff + + - name: Install Python dependencies + run: python -m pip install --upgrade pip pdiff cryptography + + - name: Set up miniconda + if: matrix.profile == 'conda' + uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3 + with: + miniconda-version: "latest" + auto-update-conda: true + channels: conda-forge,bioconda + + - name: Conda setup + if: matrix.profile == 'conda' + run: | + conda clean -a + conda install -n base conda-libmamba-solver + conda config --set solver libmamba + echo $(realpath $CONDA)/condabin >> $GITHUB_PATH + echo $(realpath python) >> $GITHUB_PATH + + # Set up secrets + - name: Set up nextflow secrets + # TODO Only run if the tag includes `sentieon` + if: env.SENTIEON_ENCRYPTION_KEY != null && env.SENTIEON_LICENSE_MESSAGE != null + run: | + nextflow secrets set SENTIEON_AUTH_DATA $(python3 tests/modules/nf-core/sentieon/license_message.py encrypt --key "${{ secrets.SENTIEON_ENCRYPTION_KEY }}" --message "${{ secrets.SENTIEON_LICENSE_MESSAGE }}") + # Test the module + - name: Run nf-test + if: ${{ matrix.path != '' }} + env: + NFT_DIFF: "pdiff" + NFT_DIFF_ARGS: "--line-numbers --width 120 --expand-tabs=2" + SENTIEON_LICSRVR_IP: ${{ secrets.SENTIEON_LICSRVR_IP }} + SENTIEON_AUTH_MECH: "GitHub Actions - token" + run: | + # use "docker_self_hosted" if it runs on self-hosted runner and matrix.profile=docker + if [ "${{ matrix.profile }}" == "docker" ]; then + PROFILE="docker_self_hosted" + else + PROFILE=${{ matrix.profile }} + fi + + NFT_WORKDIR=~ \ + nf-test test \ + --profile=${{ matrix.profile }},gpu \ + --tap=test.tap \ + --verbose \ + ${{ matrix.path }} + + - uses: pcolby/tap-summary@0959cbe1d4422e62afc65778cdaea6716c41d936 # v1 + if: ${{ matrix.path != '' }} + with: + path: >- + test.tap + + - name: Clean up + if: always() + run: | + sudo rm -rf /home/ubuntu/tests/ + confirm-pass: runs-on: ubuntu-latest needs: diff --git a/modules/nf-core/parabricks/applybqsr/environment.yml b/modules/nf-core/parabricks/applybqsr/environment.yml deleted file mode 100644 index 3cebeff05bf..00000000000 --- a/modules/nf-core/parabricks/applybqsr/environment.yml +++ /dev/null @@ -1,3 +0,0 @@ -channels: - - conda-forge - - bioconda diff --git a/modules/nf-core/parabricks/applybqsr/main.nf b/modules/nf-core/parabricks/applybqsr/main.nf index b545297d89a..38b2af002b8 100644 --- a/modules/nf-core/parabricks/applybqsr/main.nf +++ b/modules/nf-core/parabricks/applybqsr/main.nf @@ -1,12 +1,16 @@ process PARABRICKS_APPLYBQSR { tag "$meta.id" label 'process_high' + label 'process_gpu' - container "nvcr.io/nvidia/clara/clara-parabricks:4.3.0-1" + container "nvcr.io/nvidia/clara/clara-parabricks:4.3.2-1" input: - tuple val(meta), path(bam), path(bam_index), path(bqsr_table), path(intervals) - tuple val(meta2), path(fasta) + tuple val(meta), path(bam) + tuple val(meta2), path(bam_index) + tuple val(meta3), path(bqsr_table) + tuple val(meta4), path(intervals) + tuple val(meta5), path(fasta) output: tuple val(meta), path("*.bam"), emit: bam @@ -25,6 +29,7 @@ process PARABRICKS_APPLYBQSR { def prefix = task.ext.prefix ?: "${meta.id}" def interval_command = intervals ? intervals.collect{"--interval-file $it"}.join(' ') : "" def copy_index_command = bam_index ? "cp -L $bam_index `readlink -f $bam`.bai" : "" + def num_gpus = task.accelerator ? "--num-gpus $task.accelerator.request" : '' """ # parabricks complains when index is not a regular file in the same directory as the bam # copy the index to this path. @@ -38,7 +43,7 @@ process PARABRICKS_APPLYBQSR { $interval_command \\ --out-bam ${prefix}.bam \\ --num-threads $task.cpus \\ - --num-gpus $task.accelerator.request \\ + $num_gpus \\ $args cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/parabricks/applybqsr/meta.yml b/modules/nf-core/parabricks/applybqsr/meta.yml index 09fdbacab1b..22f0c4c2067 100644 --- a/modules/nf-core/parabricks/applybqsr/meta.yml +++ b/modules/nf-core/parabricks/applybqsr/meta.yml @@ -23,18 +23,33 @@ input: type: file description: BAM file pattern: "*.bam" + - - meta2: + type: map + description: | + Groovy Map containing sample information. + e.g. [ id:'test' ] - bam_index: type: file description: BAM index file pattern: "*.bai" + - - meta3: + type: map + description: | + Groovy Map containing sample information. + e.g. [ id:'test' ] - bqsr_table: type: file description: Table from calculating BQSR. Output from parabricks/fq2bam or gatk4/baserecalibrator. pattern: "*.table" + - - meta4: + type: map + description: | + Groovy Map containing sample information. + e.g. [ id:'test' ] - intervals: type: file description: intervals - - - meta2: + - - meta5: type: map description: | Groovy Map containing sample information diff --git a/modules/nf-core/parabricks/applybqsr/tests/main.nf.test b/modules/nf-core/parabricks/applybqsr/tests/main.nf.test new file mode 100644 index 00000000000..c85fd447b3d --- /dev/null +++ b/modules/nf-core/parabricks/applybqsr/tests/main.nf.test @@ -0,0 +1,213 @@ +nextflow_process { + + name "Test Process PARABRICKS_APPLYBQSR" + script "../main.nf" + process "PARABRICKS_APPLYBQSR" + + tag "modules" + tag "modules_nfcore" + tag "parabricks" + tag "parabricks/applybqsr" + + test("sarscov2 - bam - pe") { + + when { + process { + """ + input[0] = [ + [ id:'test'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true) + ] + input[1] = [ + [], [] // index not needed unless using intervals + ] + input[2] = [ + [ id:'bqsr_table'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/gatk/test.baserecalibrator.table', checkIfExists: true) + ] + input[3] = [ + [], [] // no intervals + ] + input[4] = [ + [ id:'reference'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + bam(process.out.bam[0][1]).getReadsMD5(), + file(process.out.bai[0][1]).name, + process.out.versions + ).match() } + ) + } + + } + + test("sarscov2 - bam - pe - intervals") { + + when { + process { + """ + input[0] = [ + [ id:'test'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true) + ] + input[1] = [ + [ id:'test-index'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true) + ] + input[2] = [ + [ id:'bqsr_table'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/gatk/test.baserecalibrator.table', checkIfExists: true) + ] + input[3] = [ + [ id:'intervals'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true) + ] + input[4] = [ + [ id:'reference'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + bam(process.out.bam[0][1]).getReadsMD5(), + file(process.out.bai[0][1]).name, + process.out.versions + ).match() } + ) + } + } + + test("human - cram - pe") { + + when { + process { + """ + input[0] = [ + [ id:'test'], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true) + ] + input[1] = [ + [], [] // index not needed unless using intervals + ] + input[2] = [ + [ id:'bqsr_table'], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/test.baserecalibrator.table', checkIfExists: true) + ] + input[3] = [ + [], [] // no intervals + ] + input[4] = [ + [ id:'reference'], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + bam(process.out.bam[0][1]).getReadsMD5(), + file(process.out.bai[0][1]).name, + process.out.versions + ).match() } + ) + } + + } + + test("human - cram - pe - intervals - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test'], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true) + ] + input[1] = [ + [ id:'test-index'], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true) + ] + input[2] = [ + [ id:'bqsr_table'], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/test.baserecalibrator.table', checkIfExists: true) + ] + input[3] = [ + [ id:'intervals'], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed', checkIfExists: true) + ] + input[4] = [ + [ id:'reference'], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - bam - pe - intervals - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true) + ] + input[1] = [ + [ id:'test-index'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true) + ] + input[2] = [ + [ id:'bqsr_table'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/gatk/test.baserecalibrator.table', checkIfExists: true) + ] + input[3] = [ + [ id:'intervals'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true) + ] + input[4] = [ + [ id:'reference'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/parabricks/applybqsr/tests/main.nf.test.snap b/modules/nf-core/parabricks/applybqsr/tests/main.nf.test.snap new file mode 100644 index 00000000000..c7a55002ac5 --- /dev/null +++ b/modules/nf-core/parabricks/applybqsr/tests/main.nf.test.snap @@ -0,0 +1,142 @@ +{ + "human - cram - pe": { + "content": [ + "2f11e4fe3390b8ad0a1852616fd1da04", + "test.bam.bai", + [ + "versions.yml:md5,139b8f2a0926a26cf843ac23daace6d0" + ] + ], + "meta": { + "nf-test": "0.9.1", + "nextflow": "24.10.0" + }, + "timestamp": "2024-10-31T08:40:58.540517299" + }, + "sarscov2 - bam - pe": { + "content": [ + "894549ee3ced6b5ca2eed2563a985217", + "test.bam.bai", + [ + "versions.yml:md5,139b8f2a0926a26cf843ac23daace6d0" + ] + ], + "meta": { + "nf-test": "0.9.1", + "nextflow": "24.10.0" + }, + "timestamp": "2024-10-30T10:55:02.759938278" + }, + "sarscov2 - bam - pe - intervals": { + "content": [ + "b194021b699cc5cf4b2b1f715e0b7b4c", + "test.bam.bai", + [ + "versions.yml:md5,139b8f2a0926a26cf843ac23daace6d0" + ] + ], + "meta": { + "nf-test": "0.9.1", + "nextflow": "24.10.0" + }, + "timestamp": "2024-10-30T11:20:43.476752722" + }, + "sarscov2 - bam - pe - intervals - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test" + }, + "test.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,139b8f2a0926a26cf843ac23daace6d0" + ], + "bai": [ + [ + { + "id": "test" + }, + "test.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "bam": [ + [ + { + "id": "test" + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,139b8f2a0926a26cf843ac23daace6d0" + ] + } + ], + "meta": { + "nf-test": "0.9.1", + "nextflow": "24.10.0" + }, + "timestamp": "2024-10-30T11:21:02.658767469" + }, + "human - cram - pe - intervals - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test" + }, + "test.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,139b8f2a0926a26cf843ac23daace6d0" + ], + "bai": [ + [ + { + "id": "test" + }, + "test.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "bam": [ + [ + { + "id": "test" + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,139b8f2a0926a26cf843ac23daace6d0" + ] + } + ], + "meta": { + "nf-test": "0.9.1", + "nextflow": "24.10.0" + }, + "timestamp": "2024-10-30T11:20:56.908929981" + } +} \ No newline at end of file diff --git a/modules/nf-core/parabricks/fq2bam/main.nf b/modules/nf-core/parabricks/fq2bam/main.nf index c1877bdf468..e6bf840c1f1 100644 --- a/modules/nf-core/parabricks/fq2bam/main.nf +++ b/modules/nf-core/parabricks/fq2bam/main.nf @@ -1,6 +1,7 @@ process PARABRICKS_FQ2BAM { tag "$meta.id" label 'process_high' + label 'process_gpu' container "nvcr.io/nvidia/clara/clara-parabricks:4.3.2-1" diff --git a/modules/nf-core/parabricks/fq2bam/tests/main.nf.test.snap b/modules/nf-core/parabricks/fq2bam/tests/main.nf.test.snap index 50d96e78ffb..8d455f0efde 100644 --- a/modules/nf-core/parabricks/fq2bam/tests/main.nf.test.snap +++ b/modules/nf-core/parabricks/fq2bam/tests/main.nf.test.snap @@ -21,10 +21,10 @@ ] ], "2": [ - "versions.yml:md5,c054e8254095319b660a92bdc07d990f" + ], "3": [ - + "versions.yml:md5,c054e8254095319b660a92bdc07d990f" ], "4": [ @@ -65,10 +65,10 @@ } ], "meta": { - "nf-test": "0.9.1", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-10-30T00:20:56.208782" + "timestamp": "2024-11-12T11:09:05.670189769" }, "sarscov2 - fastq - pe - stub": { "content": [ @@ -92,10 +92,10 @@ ] ], "2": [ - "versions.yml:md5,c054e8254095319b660a92bdc07d990f" + ], "3": [ - + "versions.yml:md5,c054e8254095319b660a92bdc07d990f" ], "4": [ @@ -136,10 +136,10 @@ } ], "meta": { - "nf-test": "0.9.1", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-10-30T00:35:07.267293" + "timestamp": "2024-11-12T11:09:56.252425453" }, "sarscov2 - fastq - pe": { "content": [ diff --git a/modules/nf-core/parabricks/fq2bammeth/tests/main.nf.test.snap b/modules/nf-core/parabricks/fq2bammeth/tests/main.nf.test.snap index 265bb4bf917..cf06f28c7b3 100644 --- a/modules/nf-core/parabricks/fq2bammeth/tests/main.nf.test.snap +++ b/modules/nf-core/parabricks/fq2bammeth/tests/main.nf.test.snap @@ -21,15 +21,13 @@ ] ], "2": [ - [ - "alignment.txt:md5,d41d8cd98f00b204e9800998ecf8427e" - ] + ], "3": [ ], "4": [ - "duplicate-metrics.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ], "5": [ "versions.yml:md5,882d996a64ad457fcaf85e3a75514baf" @@ -56,12 +54,10 @@ ], "duplicate_metrics": [ - "duplicate-metrics.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ], "qc_metrics": [ - [ - "alignment.txt:md5,d41d8cd98f00b204e9800998ecf8427e" - ] + ], "versions": [ "versions.yml:md5,882d996a64ad457fcaf85e3a75514baf" @@ -69,10 +65,10 @@ } ], "meta": { - "nf-test": "0.9.1", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-10-26T21:29:35.546741" + "timestamp": "2024-11-12T11:20:10.809580487" }, "E. coli - fastq - pe - stub": { "content": [ @@ -96,15 +92,13 @@ ] ], "2": [ - [ - "alignment.txt:md5,d41d8cd98f00b204e9800998ecf8427e" - ] + ], "3": [ ], "4": [ - "duplicate-metrics.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ], "5": [ "versions.yml:md5,882d996a64ad457fcaf85e3a75514baf" @@ -131,12 +125,10 @@ ], "duplicate_metrics": [ - "duplicate-metrics.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ], "qc_metrics": [ - [ - "alignment.txt:md5,d41d8cd98f00b204e9800998ecf8427e" - ] + ], "versions": [ "versions.yml:md5,882d996a64ad457fcaf85e3a75514baf" @@ -144,10 +136,10 @@ } ], "meta": { - "nf-test": "0.9.1", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-10-26T21:33:35.78287" + "timestamp": "2024-11-12T11:20:18.927598721" }, "SRR389222 - fastq - se": { "content": [ diff --git a/tests/config/nextflow.config b/tests/config/nextflow.config index c86fb134d75..de10acc9fb2 100644 --- a/tests/config/nextflow.config +++ b/tests/config/nextflow.config @@ -25,6 +25,11 @@ if ("$PROFILE" == "singularity") { podman.enabled = true podman.userEmulation = true podman.runOptions = "--runtime crun --platform linux/x86_64 --systemd=always" +} else if ("$PROFILE" == "gpu") { + docker.runOptions = '-u $(id -u):$(id -g) --gpus device=0' + apptainer.runOptions = '--no-mount tmp --writable-tmpfs --nv' + singularity.runOptions = '--no-mount tmp --writable-tmpfs --nv' + use_gpu = true } else { docker.enabled = true docker.userEmulation = false diff --git a/tests/config/nf-test.config b/tests/config/nf-test.config index 0bbe5e5b0c0..1bdf57d23c1 100644 --- a/tests/config/nf-test.config +++ b/tests/config/nf-test.config @@ -32,6 +32,12 @@ profiles { docker.enabled = true docker.runOptions = '-u $(id -u):$(id -g) --platform=linux/amd64' } + gpu { + docker.runOptions = '-u $(id -u):$(id -g) --gpus device=0' + apptainer.runOptions = '--no-mount tmp --writable-tmpfs --nv' + singularity.runOptions = '--no-mount tmp --writable-tmpfs --nv' + use_gpu = true + } docker_self_hosted { docker.enabled = true docker.fixOwnership = true diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 887e215cbe8..8a781b0c78c 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -449,9 +449,6 @@ ncbitools/vecscreen: oncocnv: - modules/nf-core/oncocnv/** - tests/modules/nf-core/oncocnv/** -parabricks/applybqsr: - - modules/nf-core/parabricks/applybqsr/** - - tests/modules/nf-core/parabricks/applybqsr/** parabricks/dbsnp: - modules/nf-core/parabricks/dbsnp/** - tests/modules/nf-core/parabricks/dbsnp/** diff --git a/tests/modules/nf-core/parabricks/applybqsr/main.nf b/tests/modules/nf-core/parabricks/applybqsr/main.nf deleted file mode 100644 index 8da248632f8..00000000000 --- a/tests/modules/nf-core/parabricks/applybqsr/main.nf +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { PARABRICKS_APPLYBQSR } from '../../../../../modules/nf-core/parabricks/applybqsr/main.nf' - -workflow test_parabricks_applybqsr { - - input = [ - [ id:'test'], - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - [], // index not needed unless using intervals - file(params.test_data['sarscov2']['illumina']['test_baserecalibrator_table'], checkIfExists: true), - [] - ] - fasta = [ - [ id:'test'], - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - ] - - PARABRICKS_APPLYBQSR ( input, fasta ) -} - -workflow test_parabricks_applybqsr_intervals { - - input = [ - [ id:'test'], - 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), - file(params.test_data['sarscov2']['illumina']['test_baserecalibrator_table'], checkIfExists: true), - file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) - ] - fasta = [ - [ id:'test'], - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - ] - - PARABRICKS_APPLYBQSR ( input, fasta ) -} diff --git a/tests/modules/nf-core/parabricks/applybqsr/nextflow.config b/tests/modules/nf-core/parabricks/applybqsr/nextflow.config deleted file mode 100644 index 8730f1c4b93..00000000000 --- a/tests/modules/nf-core/parabricks/applybqsr/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} diff --git a/tests/modules/nf-core/parabricks/applybqsr/test.yml b/tests/modules/nf-core/parabricks/applybqsr/test.yml deleted file mode 100644 index 11c821cae01..00000000000 --- a/tests/modules/nf-core/parabricks/applybqsr/test.yml +++ /dev/null @@ -1,21 +0,0 @@ -- name: parabricks applybqsr test_parabricks_applybqsr - command: nextflow run ./tests/modules/nf-core/parabricks/applybqsr/ -entry test_parabricks_applybqsr -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/parabricks/applybqsr/nextflow.config -stub-run - tags: - - parabricks/applybqsr - - parabricks - files: - - path: output/parabricks/test.bam - should_exist: true - - path: output/parabricks/test.bam.bai - should_exist: true - -- name: parabricks applybqsr test_parabricks_applybqsr_intervals - command: nextflow run ./tests/modules/nf-core/parabricks/applybqsr/ -entry test_parabricks_applybqsr_intervals -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/parabricks/applybqsr/nextflow.config -stub-run - tags: - - parabricks/applybqsr - - parabricks - files: - - path: output/parabricks/test.bam - should_exist: true - - path: output/parabricks/test.bam.bai - should_exist: true diff --git a/tests/modules/nf-core/parabricks/applybqsr/test_GPU_config.txt b/tests/modules/nf-core/parabricks/applybqsr/test_GPU_config.txt deleted file mode 100644 index 093a8b1afd1..00000000000 --- a/tests/modules/nf-core/parabricks/applybqsr/test_GPU_config.txt +++ /dev/null @@ -1,9 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - memory = "15 GB" - cpus = 4 - accelerator = 1 -} -docker.runOptions = "--gpus all" -singularity.runOptions = "--nv" \ No newline at end of file