Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parabricks/applybqsr version updated and tests migrated to nf-test #6881

Merged
merged 63 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
4b55454
parabricks/applybqsr version updated and tests migrated to pytest
Oct 29, 2024
25ec4d7
parabricks/applybqsr version updated and tests migrated to pytest
Oct 29, 2024
a8043d6
modules update & possibly anything more
Oct 29, 2024
a70eddd
modules update & possibly anything more
Oct 29, 2024
a4fd085
modules update & possibly anything more
Oct 29, 2024
30e64e7
modules update & possibly anything more
Oct 29, 2024
6172df3
modules update & possibly anything more
Oct 29, 2024
4812ab0
Merge branch 'master' into master
gitanoqevaporelmundoentero Oct 29, 2024
e88e39f
parabricks/applybqsr version updated and tests migrated to pytest
Oct 30, 2024
83cb106
update snaps
famosab Oct 30, 2024
859edc7
parabricks/applybqsr version updated and tests migrated to pytest
Oct 30, 2024
d66d301
parabricks/applybqsr version updated and tests migrated to pytest
Oct 30, 2024
09b2728
Merge branch 'master' of github.com:gitanoqevaporelmundoentero/modules
famosab Oct 30, 2024
b6be04d
parabricks/applybqsr version updated and tests migrated to pytest
Oct 30, 2024
7c99f70
new snap
famosab Oct 30, 2024
8330497
parabricks/applybqsr version updated and tests migrated to pytest
Oct 30, 2024
2e37b2d
parabricks/applybqsr version updated and tests migrated to pytest
Oct 30, 2024
b127b2a
parabricks/applybqsr version updated and tests migrated to pytest
Oct 30, 2024
26785bf
update snap
famosab Oct 30, 2024
7daf17c
Merge branch 'master' into master
famosab Oct 30, 2024
1dedc49
parabricks/applybqsr version updated and tests migrated to pytest
Oct 30, 2024
143d6e6
Merge remote-tracking branch 'origin/master'
Oct 30, 2024
c4adce9
parabricks/applybqsr version updated and tests migrated to pytest
Oct 30, 2024
f3c42f4
update snap
famosab Oct 31, 2024
55f4774
parabricks/applybqsr version updated and tests migrated to pytest
Oct 31, 2024
b23cc9f
Merge branch 'master' of github.com:nf-core/modules
Oct 31, 2024
1e8669b
Merge branch 'master' into master
gitanoqevaporelmundoentero Oct 31, 2024
e835e99
Merge branch 'master' of github.com:gitanoqevaporelmundoentero/modules
Oct 31, 2024
b1a19d6
parabricks/applybqsr version updated and tests migrated to pytest
Oct 31, 2024
f9f0aac
add other parabricks modules
famosab Oct 31, 2024
64bc0ed
add gpu label
famosab Oct 31, 2024
f8c4f56
remove old txt file
famosab Oct 31, 2024
46e2ea3
remove parabricks from normal nf-test
famosab Oct 31, 2024
9cbfbf1
exclude parabricks from conda
famosab Oct 31, 2024
e532a9d
Merge branch 'master' into master
famosab Oct 31, 2024
329817a
fix excluding
famosab Oct 31, 2024
6ac4193
simplify excluding
famosab Oct 31, 2024
d3fc24d
add docker debugging step
mashehu Nov 4, 2024
d847c10
more debbuging
mashehu Nov 4, 2024
6f45dcd
more debugging
mashehu Nov 4, 2024
c8857ae
Merge branch 'master' into master
mashehu Nov 4, 2024
39606c3
add ssh step
mashehu Nov 4, 2024
d24c1b5
Merge branch 'master' of https://github.com/gitanoqevaporelmundoenter…
mashehu Nov 4, 2024
bb7f0e4
move ssh debugging
mashehu Nov 4, 2024
74b7fe7
remove ssh debugging
mashehu Nov 4, 2024
4cc267a
fix debugging step
mashehu Nov 5, 2024
0e9c0fd
Merge branch 'master' into master
mashehu Nov 5, 2024
70f6e8f
Merge branch 'master' into master
mashehu Nov 5, 2024
aa140ed
add ssh-tunnel back
mashehu Nov 7, 2024
f083c43
Merge branch 'master' of https://github.com/gitanoqevaporelmundoenter…
mashehu Nov 7, 2024
6260c63
Merge branch 'master' into master
mashehu Nov 7, 2024
bef9f05
remove debugging
mashehu Nov 7, 2024
6509b16
Merge branch 'master' of https://github.com/gitanoqevaporelmundoenter…
mashehu Nov 7, 2024
20a7c91
add gpu profile to test
mashehu Nov 7, 2024
432351b
Merge branch 'master' into master
mashehu Nov 7, 2024
d91fc46
Merge branch 'master' into master
famosab Nov 11, 2024
90db43b
modify test inclusion
famosab Nov 12, 2024
069963f
Merge branch 'master' into master
famosab Nov 12, 2024
49ddeb1
update fq2bam snap
famosab Nov 12, 2024
337e79e
update snap fq2bammeth
famosab Nov 12, 2024
cfde0ab
Merge branch 'master' into master
famosab Nov 12, 2024
d01dd80
remove fq2bammeth
famosab Nov 12, 2024
39fde0d
Merge branch 'master' into master
famosab Nov 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 128 additions & 16 deletions .github/workflows/test.yml
famosab marked this conversation as resolved.
Show resolved Hide resolved
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
Loading