diff --git a/modules/bakta.nf b/modules/bakta.nf index 5dc44f9..966d060 100644 --- a/modules/bakta.nf +++ b/modules/bakta.nf @@ -17,6 +17,7 @@ process bakta { tuple val(sample_id), path("${sample_id}_${assembler}_${assembly_mode}_bakta_provenance.yml"), emit: provenance script: + locustag = params.use_sample_id_as_locus_tag ? "--locust-tag \"${sample_id}\"" : "" """ printf -- "- process_name: bakta\\n" >> ${sample_id}_${assembler}_${assembly_mode}_bakta_provenance.yml printf -- " tools:\\n" >> ${sample_id}_${assembler}_${assembly_mode}_bakta_provenance.yml @@ -39,7 +40,7 @@ process bakta { --db ${params.bakta_db} \ --compliant \ --keep-contig-headers \ - --locus-tag ${sample_id} \ + ${locustag} \ --prefix "${sample_id}" \ ${assembly} diff --git a/modules/prokka.nf b/modules/prokka.nf index 5c75277..56c3037 100644 --- a/modules/prokka.nf +++ b/modules/prokka.nf @@ -15,6 +15,7 @@ process prokka { tuple val(sample_id), path("${sample_id}_${assembler}_${assembly_mode}_prokka_provenance.yml"), emit: provenance script: + locustag = params.use_sample_id_as_annotation_locustag ? "--locustag \"${sample_id}\"" : "" """ printf -- "- process_name: prokka\\n" >> ${sample_id}_${assembler}_${assembly_mode}_prokka_provenance.yml printf -- " tools:\\n" >> ${sample_id}_${assembler}_${assembly_mode}_prokka_provenance.yml @@ -24,7 +25,13 @@ process prokka { printf -- " - parameter: --compliant\\n" >> ${sample_id}_${assembler}_${assembly_mode}_prokka_provenance.yml printf -- " value: null\\n" >> ${sample_id}_${assembler}_${assembly_mode}_prokka_provenance.yml - prokka --cpus ${task.cpus} --compliant --locustag ${sample_id} --centre "BCCDC-PHL" --prefix "${sample_id}" ${assembly} + prokka \ + --cpus ${task.cpus} \ + --compliant \ + ${locustag} \ + --centre "${params.annotation_centre}" \ + --prefix "${sample_id}" \ + ${assembly} cp ${sample_id}/${sample_id}.gbk ${sample_id}_${assembler}_${assembly_mode}_prokka.gbk cp ${sample_id}/${sample_id}.gff ${sample_id}_${assembler}_${assembly_mode}_prokka.gff diff --git a/nextflow.config b/nextflow.config index 22228f6..dee24de 100644 --- a/nextflow.config +++ b/nextflow.config @@ -23,6 +23,8 @@ params { filtlong_min_length = 1000 filtlong_keep_percent = 90 samplesheet_input = 'NO_FILE' + use_sample_id_as_annotation_locustag = false + annotation_centre = 'BCCDC-PHL' pipeline_short_name = parsePipelineName(manifest.toMap().get('name')) pipeline_minor_version = parseMinorVersion(manifest.toMap().get('version')) }