owned this note changed 3 years ago
Published Linked with GitHub

#34: Updates on the new DSL2 syntax

Maxime U Garcia ▸ @gau | @maxulysse
Karolinska Institutet | Science for Life Laboratory
Sweden


Overview

  • 🍬 What's new?
  • 🧙 What can be done?
  • 🚀 What should be done?

Disclaimer

  • My own takes on the new syntax
    • Other developers might have other ideas
  • We're trying to forge the best practices
    • Syntax and/or logic might (and probably will) evolve

All the new stuff

  • Modules are fully self-contained
    • No need for any functions.nf anymore
  • New usage of task.ext directive:
    • ext.args
    • ext.args2
    • ext.args3
    • ext.prefix
    • ext.when
  • To be used with a withName selector

A brand new world

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Closures are your new best friends

  • Can be used to decide args
  • Can be used to decide prefix
  • Can be used to decide when to run modules

What is the downside

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

What should be done

  • Beware when settings up task.args
  • Write comments to explain logic
    • Good for future you
      • You will forget about it
    • Good for other developers
      • They need to understand what you did and why

Examples with Sarek


Acknowledgements

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →



Need help?

Get involved:
https://nf-co.re/join

Select a repo