James Fellows Yates
02/26/2026, 7:45 AM--clean is a native parameter of RGI, we would be happy to add this as a pipeline level parameter (it would be easy to implement as you see below) - please could you make an issue on GitHub)
Otherwise, to implement what I would do in the pipeline code itself anyway: as a temporary work around you can manually add --clean yourself to the args2.
Make a cusotmn config file (e.g. custom.conf) with the code block below and supply this to the nextflow run command with -c custom.conf.
process {
withName: RGI_MAIN {
publishDir = [
[
path: { "${params.outdir}/arg/rgi/${meta.id}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
pattern: "*.{txt}",
],
[
path: { "${params.outdir}/arg/rgi/${meta.id}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
pattern: "*.{json}",
enabled: params.arg_rgi_savejson,
],
[
path: { "${params.outdir}/arg/rgi/${meta.id}/" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
pattern: "*temp*",
enabled: params.arg_rgi_savetmpfiles,
],
]
ext.args2 = [
"--alignment_tool ${params.arg_rgi_alignmenttool}",
"--data ${params.arg_rgi_data}",
params.arg_rgi_includeloose ? '--include_loose' : '',
params.arg_rgi_includenudge ? '--include_nudge' : '',
params.arg_rgi_lowquality ? '--low_quality' : '',
params.arg_rgi_split_prodigal_jobs ? '--split_prodigal_jobs' : '',
"--clean",
].join(' ').trim()
}
}