Skip to content

Add module for Circlator (all)#11013

Open
cwoodside1278 wants to merge 3 commits intonf-core:masterfrom
cwoodside1278:add_circlator_all
Open

Add module for Circlator (all)#11013
cwoodside1278 wants to merge 3 commits intonf-core:masterfrom
cwoodside1278:add_circlator_all

Conversation

@cwoodside1278
Copy link
Copy Markdown
Contributor

PR checklist

Closes #11010

  • 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

Description

Adds a new module for circlator all, which runs the full Circlator pipeline to circularise genome assemblies from long reads (PacBio/Oxford Nanopore). The module takes an input assembly (FASTA) and long reads (FASTA/FASTQ) and outputs a circularised assembly. A stub test is used as the tool requires substantial real long-read data to run successfully.

Note

Singularity not available on local dev machine. Conda test fails due to a known libcrypto incompatibility with the circlator 1.5.5 conda package on modern systems — this is an upstream issue. Docker test passes successfully.

@cwoodside1278 cwoodside1278 self-assigned this Mar 22, 2026
@cwoodside1278 cwoodside1278 added the new module Adding a new module label Mar 22, 2026
Copy link
Copy Markdown
Contributor

@famosab famosab left a comment

Choose a reason for hiding this comment

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

I realized that the any2fasta is actually in a separate PR (right??) can you use this PR to only add the cirlator one please?

Comment on lines +27 to +29
{ 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.

You can use

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

to clean up the snapshot using nft-utils. It is used to clean process and workflow outputs by removing the numbered keys. This will create snapshots that are more easy to read by humans.

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

Comment on lines +51 to +53
{ 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() }

Comment on lines +77 to +79
{ 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() }

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.

You can run

nextflow lint -format -sort-declarations -spaces 4 -harshil-alignment

on this file to clean this up nicely.

@famosab
Copy link
Copy Markdown
Contributor

famosab commented Apr 2, 2026

Please just remove the any2fasta files because that was done here: #10994

I'll review the other module directly :)

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.

You can run

nextflow lint -format -sort-declarations -spaces 4 -harshil-alignment

on this file to clean this up nicely.

Comment on lines +11 to +12
tuple val(meta), path(assembly)
tuple val(meta2), path(reads)
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.

Can we put all these inputs into one tuple? That will make sure you're sure that EVERY time everything comes together in the right combination.


output:
tuple val(meta), path("${prefix}"), emit: results
tuple val(meta), path("${prefix}/*.fasta"), emit: fasta
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.

Can we move the output fasta out of that folder and emit just the fasta?

What are other outputs of this module?

name: "circlator_all"
description: >
Runs the full Circlator pipeline to circularise genome assemblies from long reads.
Sequentially runs: mapreads, bam2reads, assemble, merge, clean, and fixstart.
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 there a possibility to have each of these modules separate? Because that seems like a hard to find failure if something goes wrong

@cwoodside1278
Copy link
Copy Markdown
Contributor Author

I realized that the any2fasta is actually in a separate PR (right??) can you use this PR to only add the cirlator one please?

Oh my gosh! I didn't realize that I hadn't switched brands! So sorry, yes I will.

@cwoodside1278 cwoodside1278 mentioned this pull request Apr 2, 2026
14 tasks
@cwoodside1278
Copy link
Copy Markdown
Contributor Author

@famosab I realized the easiest way for me was to create a new clean PR: #11116
If there was a better way to go about this please let me know! Otherwise, I can close this PR and have you approve the other

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

Labels

new module Adding a new module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

new module: circlator

2 participants