Skip to content

Commit

Permalink
Make using sample ID as locustag optional
Browse files Browse the repository at this point in the history
  • Loading branch information
dfornika committed May 17, 2024
1 parent c8b63aa commit 94d68c0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
3 changes: 2 additions & 1 deletion modules/bakta.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -39,7 +40,7 @@ process bakta {
--db ${params.bakta_db} \
--compliant \
--keep-contig-headers \
--locus-tag ${sample_id} \
${locustag} \
--prefix "${sample_id}" \
${assembly}
Expand Down
9 changes: 8 additions & 1 deletion modules/prokka.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
}
Expand Down

0 comments on commit 94d68c0

Please sign in to comment.