Nf-core modules best practice

Hi everyone, newcomer here. I currently have a nextflow workflow for bioimage analysis and would like to some of the modules to the nf-core ecosystem. My question is if it would be considered best practice to upload a module that also contains say a python script that helps in some way to processing the data. I need this python script since the software I am using in the module (ITKElastix) has very limited usability in the CLI for the intended use I have for it. Thanks in advance!

I don’t see a problem with that. With what you shared, it should be fine.

Multiple nf-core modules consist basically of a Python or an R script. If you need to do some preprocessing with R or Python before calling a software, I don’t see an issue, but if you can share more, I can answer with more confidence.

1 Like

I think for now this answers the question but if you could also point me to a nf-core module that does this that would be really helpful since I could use this as a blueprint for myself.

This module (catadditionalfasta) makes use of a Python script, for example. This other one (mcquant) runs a Python script with arguments. In the second case, you could have the script block running two Python scripts, for example. Ideally, I would say you have the two steps in the same Python script and run it like in the first case, making use of the template keyword.

This module (rapidnj) is one example that runs Python and then something else.

1 Like

Thank you very much @mribeirodantas ! Now I see that if when wanting to add custom python scripts then they should live in some repository instead of adding them in a bin/ folder along with the nextflow script :slight_smile:

I’m not sure I understand what you mean, but I would recommend reading the following sections in the Nextflow documentation:

  1. Modules templates
  2. Modules binaries

This applies both if you host your pipeline on GitHub or not.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.