Skip to content

Conversation

@dwells-eit
Copy link
Contributor

Adds subworkflow for post assembly autocycler to make it easier to run autocycler in an nf-core pipeline. Takes a list of assemblies from different assemblers or different read subsamples of a single sample. Runs autocycler compress, cluster, trim, resolve and combine. Channel manipulation to label clusters and rename files to avoid collisions.

Closes #9785

PR checklist

  • This comment contains a description of changes (with reason).
  • Remove all TODO statements.
  • Broadcast software version numbers to topic: versions - See version_topics
  • Follow the naming conventions.
  • 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

Copy link
Contributor

@d4straub d4straub left a comment

Choose a reason for hiding this comment

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

Thanks for that great addition! Looking forward to that subworkflow!
I have a few comments though.

Comment on lines +71 to +85
process RENAME {
tag "$meta.id"

input:
tuple val(meta), path(file)
val key

output:
tuple val(meta), path("${key}_${file}"), emit: renamed

script:
"""
ln -s ${file} "${key}_${file}"
"""
}
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks unusual to me to have a process in here. I havent seen a precedence among nf-core subworkflows. Maybe that can be solved differently?

Comment on lines +43 to +46
RENAME(
AUTOCYCLER_RESOLVE.out.resolved,
AUTOCYCLER_RESOLVE.out.resolved.map{meta, file -> "${meta.id}_${meta.cluster}"}
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Potentially that could be fixed in the AUTOCYCLER_RESOLVE module? Instead of having
https://github.com/nf-core/modules/blob/e6f6c211fed71038331afa8ed963e006f9acdbc9/modules/nf-core/autocycler/resolve/main.nf#L16C5-L16C67
it could be tuple val(meta), path("${prefix}_5_final.gfa"), emit: resolved (and name the files in the module script appropriately)?
I understand that this doesnt follow the tutorial of the tool, but wont most users of that module need to fix the output naming similar to here?

delete commented out lines and add indents
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 subworkflow: fasta/consensus/autocycler

2 participants