Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bakta Refresh #159

Merged
merged 17 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
9 changes: 0 additions & 9 deletions modules/local/general_util/validate_params/main.nf
kyleoconnell marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,6 @@ process VALIDATE_PARAMS {

// check bakta specific params
if ( params.bakta == true ) {
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
assert params.bakta_plasmid
assert params.bakta_locus
assert params.bakta_locus_tag
if ( params.bakta_db_path instanceof String == false ) {
throw new Exception("Value must be of string type: $value used for $key parameter")
}
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
Loading