Skip to content

feature/srwgs - #18

Merged
rernst merged 17 commits into
mainfrom
feature/srwgs
Aug 28, 2026
Merged

feature/srwgs#18
rernst merged 17 commits into
mainfrom
feature/srwgs

Conversation

@rernst

@rernst rernst commented Aug 14, 2026

Copy link
Copy Markdown
Member
  • Add dragen and dragenutils

@rernst
rernst marked this pull request as draft August 14, 2026 14:31
@rernst
rernst marked this pull request as ready for review August 26, 2026 09:11

@BasMonkey BasMonkey left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work overall! I've left a few comments below with some suggestions that I think could further improve the codebase.

Comment thread modules/UMCUGenetics/dragen/tests/main.nf.test Outdated
"nextflow": "25.10.2"
}
}
} No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing newline at the end of this file, see this StackOverflow thread on why it's important.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Snap files are automatically generated by nf-test. I don't think we should update/change these because they are compared using diff when running (automated) tests.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point, lets keep them as-is :)

Comment thread modules/UMCUGenetics/dragenutils/dxqc/tests/main.nf.test.snap
Comment thread modules/UMCUGenetics/dragenutils/fastqlist/tests/main.nf.test.snap
}

"""
mkdir -p /scratch/reference

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can imagine that hardcoding /scratch/reference could become problematic when multiple DRAGEN tasks run concurrently on the same node. This may increase the risk of race conditions or file collisions. I would suggest using task-specific scratch directories (for example /scratch/${task.workDir.name}) to priovide better isolation between tasks.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jorisvansteenbrugge is 'fixing' this by creating a separate process for untarring the reference genome, see: https://github.com/UMCUGenetics/NF-Modules/blob/feature/dragen_genome_untar/modules/UMCUGenetics/untar/genome/main.nf

This also makes sure that we only perform the untar once per pipeline excecution.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice solution @Jorisvansteenbrugge ! I think it's safe to keep this as-is too.

--fastq-list-sample-id ${meta.id} \\
--output-file-prefix ${prefix} \\
--output-directory ./ \\
--intermediate-results-dir /scratch \\

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the comment above about hardcoded /scratch.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for this module it is fine to just use /scratch, because this process can only run on ICA, where this /scratch is a special folder (see https://help.ica.illumina.com/project/p-flow/f-pipelines#scratch-space-notes). On ICA this scratch folder is unique to the job.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. You may ignore my comment.

tuple val(meta), path("${prefix}.mapping_metrics.csv"), optional: true, emit: mapping_metrics
tuple val(meta), path("${prefix}.ploidy_estimation_metrics.csv"), optional: true, emit: ploidy_estimation_metrics
tuple val(meta), path("${prefix}.gvcf_metrics.csv"), optional: true, emit: gvcf_metrics
tuple val("${task.process}"), val('dragen'), eval("dragen --version 2>&1 | sed 's/^dragen Version //'"), topic: versions, emit: versions_dragen

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dragen --version in the eval block fails because the dragen binary seems to be at /opt/edico/bin/dragen and is not in $PATH. I would suggest to update it to use the full path: /opt/edico/bin/dragen --version 2>&1 | sed 's/^dragen Version //'.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem here is that we can't run this test using the dragen container -> this proprietary software and we can't access it, furthermore we don't have FPGA nodes available within GitHub Actions. In order to make the stub test work (just testing in/output logic) we overwrite the container in https://github.com/UMCUGenetics/NF-Modules/blob/feature/srwgs/tests/config/modules.config with a simple container containing only bash.

See also nf-core example: https://github.com/nf-core/modules/blob/master/modules/nf-core/dragen/germline/tests/main.nf.test.snap

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense now. Thanks for the clarification!

Comment thread modules/UMCUGenetics/dragen/tests/main.nf.test.snap

@BasMonkey BasMonkey left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarifications! Looks all good now!

@rernst
rernst merged commit e7de76c into main Aug 28, 2026
11 checks passed
@rernst
rernst deleted the feature/srwgs branch August 28, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants