Skip to content

Conversation

@emmcauley
Copy link

@emmcauley emmcauley commented Sep 4, 2025

This PR adds a new module, samclip, and corresponding tests. samclip is used to filter SAM files for soft and hard clipped alignments. Test data is derived from nf-core test-datasets.

PR checklist

Closes #8342

  • 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.
  • Emit the versions.yml file.
  • 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 fulfill 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

@emmcauley emmcauley force-pushed the samclip branch 3 times, most recently from a8c551d to 5b0fa90 Compare September 4, 2025 18:13
@emmcauley emmcauley marked this pull request as ready for review September 4, 2025 18:20
@emmcauley emmcauley added the new module Adding a new module label Sep 4, 2025
Copy link
Contributor

@SPPearce SPPearce left a comment

Choose a reason for hiding this comment

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

This tool only works on sam files and only outputs sam tools?
I think this should be piped in and out of samtools inside the module.
Potentially also samtools fixmate to fix paired end reads.

@emmcauley emmcauley requested a review from SPPearce September 14, 2025 19:03
Copy link
Contributor

@SPPearce SPPearce left a comment

Choose a reason for hiding this comment

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

Other things to consider:

  • I think it would be good to add args to the samtools commands, which would allow for e.g. sorting ready for tools that require name-sorted or template-coordinate sorted, or filtering via that first samtools view.
  • Do we want to support making cram files?
  • Do we want to support index creation inside the final samtools sort?

@emmcauley emmcauley requested a review from SPPearce January 8, 2026 15:25
Copy link
Contributor

@SPPearce SPPearce left a comment

Choose a reason for hiding this comment

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

Left comments for the versions.
Need to fix the meta as well.

{ assert process.success },
{ assert snapshot(
process.out,
process.out.versions.collect{ path(it).yaml }
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
process.out.versions.collect{ path(it).yaml }

Copy link
Contributor

@SPPearce SPPearce left a comment

Choose a reason for hiding this comment

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

Thank you.

if [ "${is_compressed}" = "true" ]; then
rm -f ${ref_filename}
fi

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

@emmcauley emmcauley added this pull request to the merge queue Jan 11, 2026
@emmcauley emmcauley removed this pull request from the merge queue due to a manual request Jan 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

new module: samclip

2 participants