Skip to content

Commit

Permalink
Merge pull request #159 from CDCgov/bakta_dev
Browse files Browse the repository at this point in the history
Bakta Refresh
  • Loading branch information
jessicarowell authored Feb 16, 2024
2 parents 45ab9b4 + 89d9704 commit 80fe673
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 35 deletions.
42 changes: 30 additions & 12 deletions conf/test_params.config
Original file line number Diff line number Diff line change
Expand Up @@ -140,21 +140,39 @@ params {
BAKTA
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
bakta_output_dir = "bakta_outputs"
bakta_db_type = "light" // light or full
download_bakta_db = false
proteins = ""
prodigal_tf = ""
bakta_output_dir = 'bakta_outputs'
bakta_min_contig_length = 5
bakta_threads = 2
bakta_genus = 'N/A'
bakta_species = 'N/A'
bakta_strain = 'N/A'
bakta_plasmid = 'unnamed'
bakta_locus = 'contig'
bakta_locus_tag = 'ABCDEF123456'
bakta_db_path = ""
bakta_min_contig_length = 200 // due to compliant mode default, otherwise default is 1
bakta_genus = "Genus"
bakta_species = "species"
bakta_strain = "strain"
bakta_plasmid = "unnamed"
bakta_complete = ""
bakta_compliant = ""
bakta_translation_table = 11

bakta_gram = "?"
bakta_locus = "contig"
bakta_locus_tag = "LOCUSTAG123" // set a meaningful locus tag here for compliant mode
bakta_keep_contig_headers = ""
// optional bakta params, for now need to add these to modules/nf-core/bakta/bakta/main.nf
bakta_prodigal_df = ""
bakta_replicons = ""
bakta_proteins = ""
bakta_skip_trna = ""
bakta_skip_tmrna = ""
bakta_skip_rrna = ""
bakta_skip_ncrna = ""
bakta_skip_ncrna_region = ""
bakta_skip_crispr = ""
bakta_skip_cds = ""
bakta_skip_pseudo = ""
bakta_skip_sorf = ""
bakta_skip_gap = ""
bakta_skip_ori = ""
bakta_skip_plot = ""

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SUBMISSION
Expand Down
3 changes: 2 additions & 1 deletion modules/local/general_util/validate_params/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,10 @@ process VALIDATE_PARAMS {

// check bakta specific params
if ( params.bakta == true ) {
assert params.fasta_path
assert params.meta_path
assert params.bakta_min_contig_length
assert params.bakta_translation_table
assert params.bakta_threads
assert params.bakta_genus
assert params.bakta_species
assert params.bakta_strain
Expand Down
44 changes: 36 additions & 8 deletions modules/nf-core/bakta/bakta/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,46 @@ process BAKTA {
val signal
path db_path
tuple val(meta), path(fasta_path)

script:
def args = task.ext.args ?: ''

"""
bakta --db $db_path --min-contig-length $params.bakta_min_contig_length --prefix ${fasta_path.getSimpleName()} \
--output ${fasta_path.getSimpleName()} --threads $params.bakta_threads \
--genus $params.bakta_genus --species $params.bakta_species --strain $params.bakta_strain --compliant \
--plasmid $params.bakta_plasmid --locus $params.bakta_locus --locus-tag $params.bakta_locus_tag \
--translation-table $params.bakta_translation_table \
$args \
$fasta_path
bakta --db $db_path \
--min-contig-length $params.bakta_min_contig_length \
--prefix $meta.id \
--output $meta.id \
--genus $params.bakta_genus \
--species $params.bakta_species \
--strain $params.bakta_strain \
--plasmid $params.bakta_plasmid \
--complete $params.bakta_complete \
--translation-table $params.bakta_translation_table \
--gram $params.bakta_gram \
--compliant \
--locus $params.bakta_locus \
--locus-tag $params.bakta_locus_tag \
--keep-contig-headers \
$fasta_path
"""
// optional args
// --prodigal-tf $params.bakta_prodigal_tf
// --replicons $params.bakta_replicons
// --proteins $params.bakta_proteins
// --skip-trna
// --skip-tmrna
// --skip-rrna
// --skip-ncrna
// --skip-ncrna-region
// --skip-crispr
// --skip-cds
// --skip-pseudo
// --skip-sorf
// --skip-gap
// --skip-ori
// --skip-plot



output:
path "${fasta_path.getSimpleName()}/*.fna", emit: fna
Expand Down
48 changes: 34 additions & 14 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,40 @@ params {
overwrite_output = true

// batka annotation
bakta_db_type = "light" // light or full
download_bakta_db = ""
bakta_db_path = ""
prodigal_tf = ""
proteins = ""
bakta_min_contig_length = 5
bakta_threads = 2
bakta_genus = 'N/A'
bakta_species = 'N/A'
bakta_strain = 'N/A'
bakta_plasmid = 'unnamed'
bakta_locus = 'contig'
bakta_locus_tag = 'autogenerated'
bakta_translation_table = 11
bakta_output_dir = ""
bakta_db_type = "light" // light or full
download_bakta_db = false
bakta_db_path = ""
bakta_min_contig_length = 200 // due to compliant mode default, otherwise default is 1
bakta_genus = ""
bakta_species = ""
bakta_strain = ""
bakta_plasmid = "unnamed"
bakta_complete = ""
bakta_compliant = ""
bakta_translation_table = 11
bakta_gram = ""
bakta_locus = "contig"
bakta_locus_tag = "LOCUSTAG123" // set a meaningful locus tag here for compliant mode
bakta_keep_contig_headers = ""

// optional bakta params, for now need to add these to modules/nf-core/bakta/bakta/main.nf
bakta_prodigal_df = ""
bakta_replicons = ""
bakta_proteins = ""
bakta_skip_trna = ""
bakta_skip_tmrna = ""
bakta_skip_rrna = ""
bakta_skip_ncrna = ""
bakta_skip_ncrna_region = ""
bakta_skip_crispr = ""
bakta_skip_cds = ""
bakta_skip_pseudo = ""
bakta_skip_sorf = ""
bakta_skip_gap = ""
bakta_skip_ori = ""
bakta_skip_plot = ""


// liftoff annotation
lift_print_version_exit = false
Expand Down

0 comments on commit 80fe673

Please sign in to comment.