Skip to content

Add new component: trtools_dumpstr#11848

Open
KondratievaOlesya wants to merge 3 commits into
nf-core:masterfrom
KondratievaOlesya:trtools_dumpstr
Open

Add new component: trtools_dumpstr#11848
KondratievaOlesya wants to merge 3 commits into
nf-core:masterfrom
KondratievaOlesya:trtools_dumpstr

Conversation

@KondratievaOlesya
Copy link
Copy Markdown

@KondratievaOlesya KondratievaOlesya commented Jun 3, 2026

Description of changes

This PR adds a new nf-core module for dumpSTR from the TRTools package.

PR checklist

Closes #11847

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the module conventions in the contribution docs
  • [xIf necessary, include test data in your PR.
  • Remove all TODO statements.
  • Broadcast software version numbers to topic: versions - See version_topics
  • Follow the naming conventions.
  • Follow the parameters requirements.
  • Follow the input/output options guidelines.
  • Add a resource label
  • Use BioConda and BioContainers if possible to fulfil software requirements.
  • Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky:
    • For modules:
      • nf-core modules test <MODULE> --profile docker
      • nf-core modules test <MODULE> --profile singularity
      • nf-core modules test <MODULE> --profile conda

Copilot AI review requested due to automatic review settings June 3, 2026 12:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new nf-core DSL2 module wrapping dumpSTR (TRTools) and includes nf-test coverage to validate expected outputs and version reporting.

Changes:

  • Introduces TRTOOLS_DUMPSTR module with optional filter-regions support and versions topic emission.
  • Adds conda environment pinning (trtools=6.1.0) and container selection for Docker/Singularity/Apptainer.
  • Adds nf-test workflow tests (including stub mode) and snapshots for expected outputs.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
modules/nf-core/trtools/dumpstr/main.nf New Nextflow module process implementing dumpSTR execution, outputs, and stub behavior
modules/nf-core/trtools/dumpstr/meta.yml Module metadata (inputs/outputs/tool info/version topics)
modules/nf-core/trtools/dumpstr/environment.yml Conda environment definition for TRTools
modules/nf-core/trtools/dumpstr/tests/main.nf.test nf-test definitions invoking GangSTR then dumpSTR
modules/nf-core/trtools/dumpstr/tests/main.nf.test.snap Stored snapshots for real + stub test assertions
modules/nf-core/trtools/dumpstr/tests/nextflow.config Test-only process config (sets ext.prefix)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread modules/nf-core/trtools/dumpstr/main.nf Outdated
Comment thread modules/nf-core/trtools/dumpstr/meta.yml
Comment thread modules/nf-core/trtools/dumpstr/meta.yml Outdated
Comment thread modules/nf-core/trtools/dumpstr/main.nf Outdated
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
{ assert snapshot(process.out).match() }
{ assert snapshot(sanitizeOutput(process.out)).match() }


script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
def prefix = task.ext.prefix ?: "${meta.id}"
def prefix = task.ext.prefix ?: "${meta.id}_dumpstr"

"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
def prefix = task.ext.prefix ?: "${meta.id}"
def prefix = task.ext.prefix ?: "${meta.id}_dumpstr"

--vcf $vcf \\
--out $prefix \\
--zip \\
$optional_args
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
$optional_args
${filter_regions_arg} \\
${filter_regions_names_arg} \\
${args}


// Optional inputs
tuple path(filter_regions), path(filter_regions_tbi)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change

Comment on lines +12 to +13

// Optional inputs
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Optional inputs

Comment on lines +36 to +42

def optional_args = [
filter_regions_arg,
filter_regions_names_arg,
args
].findAll { it }
.join(" ")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
def optional_args = [
filter_regions_arg,
filter_regions_names_arg,
args
].findAll { it }
.join(" ")

def prefix = task.ext.prefix ?: "${meta.id}"


def region_files = filter_regions ? (filter_regions instanceof List ? filter_regions : [filter_regions]) : []
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this required?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

new module: trtools/dumpstr

3 participants