Skip to content

Commit

Permalink
parabricks/applybqsr version updated and tests migrated to nf-test (#…
Browse files Browse the repository at this point in the history
…6881)

* parabricks/applybqsr version updated and tests migrated to pytest

* parabricks/applybqsr version updated and tests migrated to pytest

* modules update & possibly anything more

* modules update & possibly anything more

* modules update & possibly anything more

* modules update & possibly anything more

* parabricks/applybqsr version updated and tests migrated to pytest

* update snaps

* parabricks/applybqsr version updated and tests migrated to pytest

* parabricks/applybqsr version updated and tests migrated to pytest

* new snap

* parabricks/applybqsr version updated and tests migrated to pytest

* parabricks/applybqsr version updated and tests migrated to pytest

* parabricks/applybqsr version updated and tests migrated to pytest

* update snap

* parabricks/applybqsr version updated and tests migrated to pytest

* parabricks/applybqsr version updated and tests migrated to pytest

* update snap

* parabricks/applybqsr version updated and tests migrated to pytest

* parabricks/applybqsr version updated and tests migrated to pytest

* add other parabricks modules

* add gpu label

* remove old txt file

* remove parabricks from normal nf-test

* exclude parabricks from conda

* fix excluding

* simplify excluding

* add docker debugging step

* more debbuging

* more debugging

* add ssh step

* move ssh debugging

* remove ssh debugging

* fix debugging step

* add ssh-tunnel back

* remove debugging

* add gpu profile to test

* modify test inclusion

* update fq2bam snap

* update snap fq2bammeth

* remove fq2bammeth

---------

Co-authored-by: orodrig3 <oscar.rodriguez-cruz@t-systems.com>
Co-authored-by: famosab <famke.baeuerle@gmail.com>
Co-authored-by: Famke Bäuerle <45968370+famosab@users.noreply.github.com>
Co-authored-by: Matthias Hörtenhuber <mashehu3@gmail.com>
Co-authored-by: Matthias Hörtenhuber <mashehu@users.noreply.github.com>
  • Loading branch information
6 people authored Nov 15, 2024
1 parent 7548250 commit 4a76db9
Show file tree
Hide file tree
Showing 16 changed files with 544 additions and 133 deletions.
144 changes: 128 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down
3 changes: 0 additions & 3 deletions modules/nf-core/parabricks/applybqsr/environment.yml

This file was deleted.

13 changes: 9 additions & 4 deletions modules/nf-core/parabricks/applybqsr/main.nf
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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.
Expand All @@ -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
Expand Down
17 changes: 16 additions & 1 deletion modules/nf-core/parabricks/applybqsr/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit 4a76db9

Please sign in to comment.