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

Add bakta missing ick4 #170

Merged
merged 5 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 3 additions & 3 deletions assets/sample_fastas/Cdiphtheriae/BX248355.fasta
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
>BX248355.1 Corynebacterium diphtheriae gravis NCTC13129, complete genome; segment 2/8
>BX248355.1-segment2 Corynebacterium diphtheriae gravis NCTC13129, complete genome; segment 2/8
TTATATGAGCCCTTCCTTATCGAGTCATCTGCATCAGCGGCCTCGGTATCGGCCACCTGCGGTTCACTTG
GTGGCAGATCCATCGTTACTGGCTCGCCACGAACACTCACTACTGTAGTAAGTAGGGGGCTAGGCCACAT
AAGTGGGAAAGGGTGAGTTATATCATATGAAAATTGCCCGAAATAGGAGTAAAGAATTTTGCCTGCGATA
Expand Down Expand Up @@ -4072,7 +4072,7 @@ ACCTCACCTCACCTGCGAGAGGTGAGGTAGAAAACGTAACTGCGACCGATTACAGCGGGATGTTGCCGTG
CTTCTTCGCAGGAACGTTAACAACCTTGCGGTCCAAGAGGCGTAGCGCTTCAATGATCTGACCACGGGTT
TCGCTTGGTGGAATAACGGCGTCGACGTAACCACGCTCGGCTGCCATGTAAGGGTTGACCAAAGTTTCTT
CGTACTCGCGCTCGTATTCCTTAGCTACAGCGAGCATGTCCTTGCCTTCGGCAGCAGCGGCCTTGATTTC
>BX248355.1 Corynebacterium diphtheriae gravis NCTC13129, complete genome; segment 3/8
>BX248355.1-segment3 Corynebacterium diphtheriae gravis NCTC13129, complete genome; segment 3/8
CTTGCGGTAGATGAATCCCACGGCACCAGCGGCGCCCATGACAGCGATCTGTGCGGTTGGCCATGCCAAG
ACGAGGTCGGCGCCCATGTCCTTCGAACCCATCACGCAGTAAGCGCCACCGTAGGACTTGCGGGTAATCA
CAGTGATCTTGCCGACGGTTGCTTCAGAGTAGGCGTAGAGGAGCTTGGCGCCACGGCGAATGATTCCGTC
Expand Down Expand Up @@ -4442,7 +4442,7 @@ CGATTATTGGGCATGGTGCTCGTATTGGAGCCAATGCTCGCATTACCGGCTGTGTGATTGGTGAAGGCGC
GGAAATCGGTGCACGTTGTGAGCTTCGCGACGGCATGCGTGTGTGGCCAGGAGTTGTGATTCCAACTGCT
GGTATCCGTTTTAGTTCGGATGCCTAAGTTGCAGTAATACCTAGTGCAACCTAGTCATAGGCTCCCACCA
CGGCAGGGTAGACCCCCTCGTTGTGGTGGGAGCTTTCGCATTTTATGGAGGCTGGCTGAAGCGATTTCTT
>BX248355.1 Corynebacterium diphtheriae gravis NCTC13129, complete genome; segment 4/8
>BX248355.1-segment4 Corynebacterium diphtheriae gravis NCTC13129, complete genome; segment 4/8
AGTAGCTGCTGAGTGCTAGCACGTTTGTGTTCAAACACTTTTATGCGACACGCCGATAATGAGCCGACTA
GCGAAGTATTTTTAGAGGCACCACTATATGTAGTACCCCCACCGTATACCCCTATGGTGGTGGCAATGTT
ACTGGTGTGACTAATGAAGTTAACAACCTGCGGAAATGCAATTTTTCCGATCGGAATTACATGTTCAGGT
Expand Down
61,896 changes: 61,896 additions & 0 deletions assets/sample_fastas/Cdiphtheriae/CP014051.fasta

Large diffs are not rendered by default.

34,091 changes: 34,091 additions & 0 deletions assets/sample_fastas/Cdiphtheriae/CP040557.fasta

Large diffs are not rendered by default.

Binary file added assets/sample_metadata/Cdiphtheriae_test_1.xlsx
Binary file not shown.
Binary file not shown.
Binary file added assets/sample_metadata/metadata_template.xlsx
Binary file not shown.
49 changes: 29 additions & 20 deletions modules/nf-core/bakta/bakta/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,22 @@ process BAKTA {

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def proteins = params.bakta_proteins ? "--proteins ${proteins[0]}" : ""
def prodigal_tf = params.bakta_prodigal_tf ? "--prodigal-tf ${prodigal_tf[0]}" : ""
def skip_trna = params.bakta_skip_trna ? "--skip-trna" : ""
def skip_tmrna = params.bakta_skip_tmrna ? "--skip-tmrna" : ""
def skip_rrna = params.bakta_skip_rrna ? "--skip-rrna" : ""
def skip_ncrna = params.bakta_skip_ncrna ? "--skip-ncrna" : ""
def skip_ncrna_region = params.bakta_skip_ncrna_region ? "--skip-ncrna-region" : ""
def skip_crispr = params.bakta_skip_crispr ? "--skip-crispr" : ""
def skip_cds = params.bakta_skip_cds ? "--skip-cds" : ""
def skip_sorf = params.bakta_skip_sorf ? "--skip-sorf" : ""
def skip_gap = params.bakta_skip_gap ? "--skip-gap" : ""
def skip_ori = params.bakta_skip_ori ? "--skip-ori" : ""
def compliant = params.bakta_compliant ? "--compliant" : ""
def complete = params.bakta_complete ? "--complete" : ""
def keep_contig_headers = params.bakta_keep_contig_headers ? "--keep-contig-headers" : ""

"""
bakta --db $db_path \
Expand All @@ -34,30 +50,23 @@ process BAKTA {
--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 \
$compliant \
$keep_contig_headers \
$proteins \
$prodigal_tf \
$skip_trna \
$skip_rrna \
$skip_ncrna \
$skip_ncrna_region \
$skip_crispr \
$skip_cds \
$skip_sorf \
$skip_gap \
$skip_ori \
$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
74 changes: 30 additions & 44 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
params {
// input paths
fasta_path = "" // path to dir with fasta files that match metadata
fastq_path = "" //
fastq_path = "" // path to dir with fastq files that match metadata (for SRA upload of raw sequences)
ref_fasta_path = "${projectDir}/assets/ref/ref.MPXV.NC063383.v7.fasta"
meta_path = "${projectDir}/assets/custom_meta_fields/custom_fields_MPXV_metadata_Sample_Run_1.xlsx"
meta_path = "${projectDir}/assets/metadata_template.xlsx"
ref_gff_path = "${projectDir}/assets/ref/ref.MPXV.NC063383.v7.gff"

// validation subworkflow
Expand All @@ -22,17 +22,10 @@ params {

// viral annotation params
annotation = true
repeatmasker_liftoff = false
repeatmasker_liftoff = true
liftoff = false
vadr = false

if ( params.annotation == false ) {
repeatmasker_liftoff = false
liftoff = false
vadr = false
bakta = false
}

// organism specific repeat library settings
// if you want to add your own custom library, if you choose to use one of ours state 'varv' to use the 'varv' custom lib or 'mpox' to use the mpox custom lib
if ( params.variola ) {
Expand Down Expand Up @@ -60,16 +53,16 @@ params {
send_submission_email = false

// general params
help = false
output_dir = ""
overwrite_output = false
publish_dir_mode = 'copy'
help = false
publish_dir_mode = 'copy'
output_dir = ""
overwrite_output = false
// To Do check if we need these three dirs
final_liftoff_output_dir = "liftoff"
bakta_output_dir = ""
vadr_output_dir = ""
bakta_output_dir = ""
vadr_output_dir = ""
final_liftoff_output_dir = "liftoff_outputs"
val_output_dir = "validation_outputs"
val_output_dir = "validation_outputs"

// taxon-specific params
variola = false
Expand All @@ -93,26 +86,24 @@ params {
clear_nf_results = false
overwrite_output = true

// batka annotation
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 = ""
// required bakta params
bakta_db_type = "light" // light or full
download_bakta_db = ""
bakta_db_path = ""
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

// optional bakta params
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_prodigal_tf = ""
bakta_replicons = ""
bakta_proteins = ""
bakta_skip_trna = ""
Expand All @@ -128,7 +119,6 @@ params {
bakta_skip_ori = ""
bakta_skip_plot = ""


// liftoff annotation
lift_print_version_exit = false
lift_print_help_exit = false
Expand Down Expand Up @@ -156,14 +146,11 @@ params {

}

//includeConfig 'conf/modules.config'

try {
includeConfig 'conf/modules.config'
} catch (Exception e) {
System.err.println("WARNING:Could not load conf/modules.config")
}

}

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -173,7 +160,6 @@ try {

// To Do: align these profiles with nf-core style, also align rest of this config
profiles {
// standard { includeConfig "conf/standard_params.config" }
test { includeConfig "conf/test_params.config" }

// run docker + specify settings
Expand Down Expand Up @@ -235,8 +221,9 @@ profiles {
}
}

// todo: not sure about this - it's already somewhere else
// Load modules.config for DSL2 module specific options
includeConfig 'conf/modules.config'
//includeConfig 'conf/modules.config'

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -257,5 +244,4 @@ manifest {
mainScript = 'main.nf'
nextflowVersion = '>=20.07.1'
version = 'latest'
}

}