Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subworkflow alias not being recognized in module.config #5621

Open
bielasilva opened this issue Dec 19, 2024 · 0 comments
Open

Subworkflow alias not being recognized in module.config #5621

bielasilva opened this issue Dec 19, 2024 · 0 comments

Comments

@bielasilva
Copy link

Hi. I have been facing an issue and I am not sure if it's indeed a bug, or just not how Nextflow operates.

Since Nextflow cannot reuse the same subworkflow, I have imported it multiple times.

include { RACON_POLISHER as RACON_POLISHER1 } from './polishing/racon_polisher'
include { RACON_POLISHER as RACON_POLISHER2 } from './polishing/racon_polisher'

if ( params.polishIterations >= 1 ) {
    RACON_POLISHER1( ch_reads, ch_polish )
    ch_polish = RACON_POLISHER1.out.genome
}
 if ( params.polishIterations >= 2 ) {
    RACON_POLISHER2( ch_reads, ch_polish )
    ch_polish = RACON_POLISHER2.out.genome
} 

This works, however, since the intake file for RACON_POLISHER2 has the output name, it's marked as already existing when that process finishes

gzip: ${prefix}_assembly_consensus.fasta.gz already exists;     not overwritten

To solve that, I have tried to make the prefix different for each run in the modules.config file. But it's failing to recognize each call and change the prefix.

process {
withName: 'RACON_POLISHER1:RACON' {
        ext.prefix = { "${meta.id}_polisher1" }
    }

    withName: 'RACON_POLISHER2:RACON' {
        ext.prefix = { "${meta.id}_polisher2" }
    }
}

When I just specify the RACON module, it does change, but then again, I can't reuse the file as it has the same name for all RACON runs.

process {
withName: 'RACON' {
        ext.prefix = { "${meta.id}_polisher1" }
    }
}

Shouldn't SUBWORKFLOW:PROCESS be recognized and change the parameters for the PROCESS call?

Environment

  • Nextflow version: 24.10.3
  • Java version: openjdk 21.0.5 2024-10-15 LTS
  • Operating system: CentOS Linux 7
  • Bash version: zsh 5.9 (x86_64-pc-linux-gnu)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants