Skip to content

fix: a few purge_dups tweaks#10297

Open
prototaxites wants to merge 6 commits intonf-core:masterfrom
prototaxites:purge_dups_fix
Open

fix: a few purge_dups tweaks#10297
prototaxites wants to merge 6 commits intonf-core:masterfrom
prototaxites:purge_dups_fix

Conversation

@prototaxites
Copy link
Contributor

Noticed a couple of little points for purge_dups that could be fixed:

  • purgedups/purgedups outputs non-compressed BED file but purgedups/getseqs is able to read a compressed BED file, so this is compressed now.
  • purgedups/getseqs hard-codes the -e option, which is not necessary for operation. This removes this in favour of allowing its specification in $args.
  • Wrap all variables in ${} cause it's prettier :)

PR checklist

Closes #XXX

  • 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
  • If 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
    • For subworkflows:
      • nf-core subworkflows test <SUBWORKFLOW> --profile docker
      • nf-core subworkflows test <SUBWORKFLOW> --profile singularity
      • nf-core subworkflows test <SUBWORKFLOW> --profile conda

@prototaxites prototaxites requested a review from DLBPointon March 2, 2026 14:40
"""
get_seqs \\
$args \\
-e $bed \\
Copy link
Contributor

@PeterKneale PeterKneale Mar 3, 2026

Choose a reason for hiding this comment

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

given the below: do you think it would make sense to have the -e parameter set as a default if no other configuration is supplied? would that be a safer transition for people already consuming this module?

Image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's probably a good idea

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, fixed. I explicitly check if task.ext.args is a string, and if so we use it even if it's empty. Otherwise we fall back to -e, catching the case where it is unset and thus null.

@prototaxites
Copy link
Contributor Author

@nf-core-bot fix linting

@prototaxites prototaxites requested a review from PeterKneale March 3, 2026 11:41
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.

4 participants