nf-core / tools

Python package with helper tools for the nf-core community.
https://nf-co.re
MIT License
232 stars 187 forks source link

Components: allow spaces at the betinning of include statements #3115

Closed mirpedrol closed 1 month ago

mirpedrol commented 1 month ago

Changing match to search will look for the component name even if the include keyword is not at the beginning of the line. This is to allow spaces for cases such as the following, where we have indentation.

if ( params.aligner == "clustalo/align" ) {
    include { CLUSTALO_ALIGN as ALIGNER } from '../../../modules/mirpedrol/clustalo/align/main'
} else if ( params.aligner == "famsa/align" ) {
    include { FAMSA_ALIGN    as ALIGNER } from '../../../modules/mirpedrol/famsa/align/main'
}