Skip to content

Instantly share code, notes, and snippets.

@tomraulet
Last active June 3, 2022 09:09
Show Gist options
  • Save tomraulet/1605908900700aabeebf9ae8aad854d5 to your computer and use it in GitHub Desktop.
Save tomraulet/1605908900700aabeebf9ae8aad854d5 to your computer and use it in GitHub Desktop.
nextflow subworkflow config on the fly
process AWESOME_PROCESS {
input:
path fasta
val args
output:
path "*", emit: output
script:
"""
cmd_line -in $fasta -dbtype ${args.dbtype} ${args.parameters}
"""
}
include { SUBWORKFLOW } from './modules/subworkflow'
fasta_reference = channel.fromPath(params.reference)
workflow {
SUBWORKFLOW(fasta_reference, params.subworkflow)
}
// 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