Last active
June 3, 2022 09:09
-
-
Save tomraulet/1605908900700aabeebf9ae8aad854d5 to your computer and use it in GitHub Desktop.
nextflow subworkflow config on the fly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
process AWESOME_PROCESS { | |
input: | |
path fasta | |
val args | |
output: | |
path "*", emit: output | |
script: | |
""" | |
cmd_line -in $fasta -dbtype ${args.dbtype} ${args.parameters} | |
""" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include { SUBWORKFLOW } from './modules/subworkflow' | |
fasta_reference = channel.fromPath(params.reference) | |
workflow { | |
SUBWORKFLOW(fasta_reference, params.subworkflow) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// some inclusions | |
include { AWESOME_PROCESS as NUCL_PROCESS; AWESOME_PROCESS as PROT_PROCESS } from 'modules/awesome_process' | |
// this does not work | |
on_the_fly_config.dtype = 'nucl' | |
on_the_fly_config.parameters = '' | |
on_the_fly_config_2.dtype = 'prot' | |
on_the_fly_config_2.parameters = '' | |
workflow PREDICT_GENES_STRUCTURE { | |
take: | |
genome | |
args | |
main: | |
NUCL_PROCESS(genome, on_the_fly_config) | |
PROT_PROCESS(genome, on_the_fly_config2) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment