// Available Bactopia tools

params {
    available_workflows {
        bactopia = ['bactopia', 'staphopia', 'cleanyerreads', 'teton', 'updater']
        'bactopiatools' {
            subworkflows = [
                'ariba', 'bakta', 'eggnog', 'gtdb', 'mashtree', 'merlin', 'pangenome',
                'scrubber', 'snippy', 'staphtyper'
            ]
            modules = [
                'abricate', 'abritamr', 'agrvate', 'amrfinderplus', 'blastn', 'blastp', 'blastx',
                'btyper3', 'busco', 'bracken', 'checkm', 'ectyper', 'emmtyper', 'fastani', 'gamma',
                'genotyphi', 'hicap', 'hpsuissero', 'ismapper', 'kleborate', 'kraken2', 'legsta',
                'lissero', 'mashdist', 'mcroni', 'meningotype', 'midas', 'mlst', 'mobsuite',
                'mykrobe', 'ngmaster', 'pasty', 'pbptyper', 'phispy', 'plasmidfinder',
                'pneumocat', 'quast', 'rgi', 'seqsero2', 'seroba', 'shigatyper',
                'shigeifinder', 'sistr', 'spatyper', 'ssuissero', 'staphopiasccmec',
                'stecfinder', 'tblastn', 'tblastx', 'tbprofiler', 'updater'
            ]
        }
    }
    wf_has_subdir = [
        'ariba',
        'blastn',
        'blastp',
        'blastx',
        'bracken',
        'busco',
        'fastani',
        'gamma',
        'ismapper',
        'kraken2',
        'mashdist',
        'mashtree',
        'pangenome',
        'snippy',
        'tblastn',
        'tblastx'
    ]
    workflows {
        // Named Workflows (Main Bactopia)
        'bactopia' {
            description = "Bactopia is a flexible pipeline for complete analysis of bacterial genomes"
            includes = ["bactopia"]
            is_workflow = true
            modules = ["gather", "qc", "assembler", "sketcher", "amrfinderplus", "mlst"]
        }
        'staphopia' {
            // Example of a 'wrapper' workflow
            description = "Staphopia is a flexible pipeline for complete analysis of Staphylococcus aureus genomes"
            includes = ["bactopia", "staphtyper"]
            is_workflow = true
        }

        'cleanyerreads' {
            description = "Use Bactopia's read QC steps to Clean-Yer-Reads"
            includes = ["gather", "qc", "scrubber"]
            is_workflow = true
            modules = ["gather", "qc", "srahumanscrubber_initdb", "srahumanscrubber_scrub"]
        }

        'teton' {
            description = "Host removal and taxon classification with estimated abundances"
            includes = ["gather", "scrubber", "bracken", "midas"]
            is_workflow = true
            modules = ["gather", "bracken", "midas", "srahumanscrubber_initdb", "srahumanscrubber_scrub"]
        }

        'updater' {
            description = "Update database builds for new Bactopia version"
            includes = ["amrfinderplus", "mlst"]
            is_workflow = true
            modules = ["amrfinderplus", "mlst"]
        }

        // Named Subworkflows (Bactopia Tools)
        'ariba' {
            description = "Gene identification through local assemblies"
            ext = "fastq"
            modules = ["ariba_getref", "ariba_run"]
        }
        'bakta' {
            description = "Rapid annotation of bacterial genomes & plasmids"
            ext = "fna"
            modules = ["bakta_download", "bakta_run"]
        }
        'eggnog' {
            description = "Functional annotation of proteins using orthologous groups and phylogenies"
            ext = "faa"
            modules = ["eggnog_download", "eggnog_mapper"]
        }
        'fastani' {
            description = "Fast alignment-free computation of whole-genome Average Nucleotide Identity (ANI)"
            ext = "fna"
            path = "modules/nf-core/fastani"
            modules = ["ncbigenomedownload"]
            use_local = "assembly"
        }
        'gtdb' {
            description = "Identify marker genes and assign taxonomic classifications"
            ext = "fna"
            modules = ["gtdbtk_setupdb", "gtdbtk_classifywf"]
        }
        'mashtree' {
            description = "Create a trees using Mash distances"
            ext = "fna"
            path = "modules/nf-core/mashtree"
            modules = ["ncbigenomedownload"]
        }
        'merlin' {
            description = "MinmER assisted species-specific bactopia tool seLectIoN"
            ext = "fna_fastq"
            modules = [
                "mashdist", "agrvate", "ectyper", "emmtyper", "genotyphi", "hicap", "hpsuissero",
                "kleborate", "legsta", "lissero", "meningotype", "ngmaster", "pasty", "pbptyper",
                "pneumocat", "seqsero2", "seroba", "shigatyper", "shigeifinder", "sistr",
                "spatyper", "ssuissero", "staphopiasccmec", "stecfinder", "tbprofiler"
            ]
        }
        'pangenome' {
            description = "Pangenome analysis with optional core-genome phylogeny"
            ext = "gff"
            modules = ["ncbigenomedownload", "pirate", "roary", "panaroo", "prokka", "iqtree", "clonalframeml", "snpdists", "scoary"]
            use_local = "gff"
        }
        'scrubber' {
            description = "Scrub human reads from FASTQ files"
            ext = "fastq"
            modules = ["srahumanscrubber_initdb", "srahumanscrubber_scrub"]
        }
        'snippy' {
            description = "Rapid variant calling from Illumina sequence reads with optional core-SNP phylogeny"
            ext = "fastq"
            modules = ["snippy_run", "snippy_core", "gubbins", "iqtree", "snpdists"]
        }
        'staphtyper' {
            description = "Includes AgrVATE, SpaTyper and Staphopia SCCmec for Staphylococcus aureus"
            ext = "fna"
            modules = ["agrvate", "spatyper", "staphopiasccmec"]
        }

        // Modules (houses params.json and params.config, where applicable can be subworkflow)
        // local
        'assembler' {
            path = "modules/local/bactopia/assembler"
        }
        'gather' {
            path = "modules/local/bactopia/gather"
        }
        'sketcher' {
            path = "modules/local/bactopia/sketcher"
        }
        'qc' {
            path = "modules/local/bactopia/qc"
        }

        // nf-core/modules
        'abricate' {
            description = "Mass screening of contigs for antimicrobial and virulence genes"
            ext = "fna"
            path = "modules/nf-core/abricate/run"
        }
        'abritamr' {
            description = "A NATA accredited tool for reporting the presence of antimicrobial resistance genes"
            ext = "fna"
            path = "modules/nf-core/abritamr/run"
        }
        'agrvate' {
            description = "Rapid identification of Staphylococcus aureus agr locus type and agr operon variants"
            ext = "fna"
            path = "modules/nf-core/agrvate"
        }
        'amrfinderplus' {
            description = "Identify antimicrobial resistance in genes or proteins"
            ext = "fna_faa"
            path = "modules/nf-core/amrfinderplus/run"
        }
        'ariba_getref' {
            path = "modules/nf-core/ariba/getref"
        }
        'ariba_run' {
            path = "modules/nf-core/ariba/run"
        }
        'bakta_download' {
            path = "modules/nf-core/bakta/download"
        }
        'bakta_run' {
            path = "modules/nf-core/bakta/run"
        }
        'blastn' {
            description = "Search against nucleotide BLAST databases using nucleotide queries"
            ext = "blastdb"
            path = "modules/nf-core/blast/blastn"
        }
        'blastp' {
            description = "Search against protein BLAST databases using protein queries"
            ext = "blastdb"
            path = "modules/nf-core/blast/blastp"
        }
        'blastx' {
            description = "Search against protein BLAST databases using translated nucleotide queries"
            ext = "blastdb"
            path = "modules/nf-core/blast/blastx"
        }
        'bracken' {
            description = "Taxonomic classification and species abundance estimation of sequence reads"
            ext = "fastq"
            path = "modules/nf-core/bracken"
        }
        'btyper3' {
            description = "Taxonomic classification of Bacillus cereus group isolates"
            ext = "fna"
            path = "modules/nf-core/btyper3"
        }
        'busco' {
            description = "Assembly completeness based on evolutionarily informed expectations"
            ext = "fna"
            path = "modules/nf-core/busco"
        }
        'checkm' {
            description = "Assess the assembly quality of your microbial samples"
            ext = "fna"
            path = "modules/nf-core/checkm/lineagewf"
        }
        'clonalframeml' {
            description = "Predict recomination events in bacterial genomes"
            path = "modules/nf-core/clonalframeml"
        }
        'csvtk_concat' {
            path = "modules/nf-core/csvtk/concat"
        }
        'csvtk_join' {
            path = "modules/nf-core/csvtk/join"
        }
        'custom_dumpsoftwareversions' {
            path = "modules/nf-core/custom/dumpsoftwareversions"
        }
        'ectyper' {
            description = "In-silico prediction of Escherichia coli serotype"
            ext = "fna"
            path = "modules/nf-core/ectyper"
        }
        'eggnog_download' {
            path = "modules/nf-core/eggnog/download"
        }
        'eggnog_mapper' {
            path = "modules/nf-core/eggnog/mapper"
        }
        'emmtyper' {
            description = "emm-typing of Streptococcus pyogenes assemblies"
            ext = "fna"
            path = "modules/nf-core/emmtyper"
        }
        'gtdbtk_setupdb' {
            path = "modules/nf-core/gtdbtk/setupdb"
        }
        'gtdbtk_classifywf' {
            path = "modules/nf-core/gtdbtk/classifywf"
        }
        'gamma' {
            description = "Identification, classification, and annotation of translated gene matches"
            ext = "fna"
            path = "modules/nf-core/gamma"
        }
        'genotyphi' {
            description = "Salmonella Typhi genotyping with Mykrobe outputs"
            ext = "fastq"
            path = "modules/nf-core/genotyphi/parse"
        }
        'gubbins' {
            description = "Rapid phylogenetic analysis of recombinant bacterial sequences"
            path = "modules/nf-core/gubbins"
        }
        'hicap' {
            description = "Identify cap locus serotype and structure in your Haemophilus influenzae assemblies"
            ext = "fna"
            path = "modules/nf-core/hicap"
        }
        'hpsuissero' {
            description = "Rapid Haemophilus parasuis Serotyping of assemblies"
            ext = "fna"
            path = "modules/nf-core/hpsuissero"
        }
        'iqtree' {
            description = "Phylogeny from a multiple sequence alignment using the maxium likelihood algorithm."
            path = "modules/nf-core/iqtree"
        }
        'ismapper' {
            description = "Identify insertion sites positions in bacterial genomes"
            ext = "fastq"
            path = "modules/nf-core/ismapper"
        }
        'kleborate' {
            description = "Screen for MLST, sub-species, and other Klebsiella related genes of interest"
            ext = "fna"
            path = "modules/nf-core/kleborate"
        }
        'kraken2' {
            description = "Taxonomic classification of sequence reads"
            ext = "fastq"
            path = "modules/nf-core/kraken2"
        }
        'legsta' {
            description = "Typing of Legionella pneumophila assemblies"
            ext = "fna"
            path = "modules/nf-core/legsta"
        }
        'lissero' {
            description = "Serogroup typing prediction for Listeria monocytogenes"
            ext = "fna"
            path = "modules/nf-core/lissero"
        }
        'mashdist' {
            description = "Calculate Mash distances between sequences"
            ext = "fna"
            path = "modules/nf-core/mash/dist"
        }
        'mcroni' {
            description = "Sequence variation in mobilized colistin resistance (mcr-1) genes"
            ext = "fna"
            path = "modules/nf-core/mcroni"
        }
        'meningotype' {
            description = "Serotyping of Neisseria meningitidis"
            ext = "fna"
            path = "modules/nf-core/meningotype"
        }
        'midas' {
            description = "Estimate species abundances from FASTQ files"
            ext = "fastq"
            path = "modules/nf-core/midas/species"
        }
        'mlst' {
            description = "Scan contig files against PubMLST typing schemes"
            ext = "fna"
            path = "modules/nf-core/mlst"
        }
        'mobsuite' {
            description = "Reconstruct and annotate plasmids in bacterial assemblies"
            ext = "fna"
            path = "modules/nf-core/mobsuite/recon"
        }
        'mykrobe' {
            description = "Antimicrobial resistance detection for specific species"
            ext = "fastq"
            path = "modules/nf-core/mykrobe/predict"
        }
        'ncbigenomedownload' {
            description = "Quickly download assemblies from NCBI's Assembly database"
            path = "modules/nf-core/ncbigenomedownload"
        }
        'ngmaster' {
            description = "Multi-antigen sequence typing for Neisseria gonorrhoeae"
            ext = "fna"
            path = "modules/nf-core/ngmaster"
        }
        'panaroo' {
            description = "Pipeline for pangenome investigations"
            ext = "gff"
            path = "modules/nf-core/panaroo/run"
        }
        'pasty' {
            description = "Serogrouping of Pseudomonas aeruginosa isolates"
            ext = "fna"
            path = "modules/nf-core/pasty"
        }
        'pbptyper' {
            description = "Penicillin Binding Protein (PBP) typer for Streptococcus pneumoniae"
            ext = "fna"
            path = "modules/nf-core/pbptyper"
        }
        'phispy' {
            description = "Predict prophages in bacterial genomes"
            ext = "gbk"
            path = "modules/nf-core/phispy"
        }
        'pirate' {
            description = "Pangenome toolbox for bacterial genomes"
            ext = "gff"
            path = "modules/nf-core/pirate"
        }
        'plasmidfinder' {
            description = "Plasmid identification from assemblies"
            ext = "fna"
            path = "modules/nf-core/plasmidfinder"
        }
        'pneumocat' {
            description = "Assign capsular type to Streptococcus pneumoniae from sequence reads"
            ext = "fastq"
            path = "modules/nf-core/pneumocat"
        }
        'prokka' {
            description = "Whole genome annotation of small genomes (bacterial, archeal, viral)"
            ext = "fna"
            path = "modules/nf-core/prokka"
        }
        'quast' {
            description = "Assess the quality of assembled contigs"
            ext = "fna_meta"
            path = "modules/nf-core/quast"
        }
        'rgi' {
            description = "Predict antibiotic resistance from assemblies"
            ext = "fna"
            path = "modules/nf-core/rgi/main"
        }
        'roary' {
            description = "Rapid large-scale prokaryote pangenome analysis"
            ext = "gff"
            path = "modules/nf-core/roary"
        }
        'scoary' {
            description = "GWAS analysis using pangenome outputs"
            ext = "csv"
            path = "modules/nf-core/scoary"
        }
        'seqsero2' {
            description = "Salmonella serotype prediction from reads or assemblies"
            ext = "fna"
            path = "modules/nf-core/seqsero2"
        }
        'seroba' {
            description = "Serotyping of Streptococcus pneumoniae from sequence reads"
            ext = "fastq"
            path = "modules/nf-core/seroba/run"
        }
        'shigatyper' {
            description = "Shigella serotype from Illumina or Oxford Nanopore reads"
            ext = "fastq"
            path = "modules/nf-core/shigatyper"
        }
        'shigeifinder' {
            description = "Shigella and EIEC serotyping from assemblies"
            ext = "fna"
            path = "modules/nf-core/shigeifinder"
        }
        'sistr' {
            description = "Serovar prediction of Salmonella assemblies"
            ext = "fna"
            path = "modules/nf-core/sistr"
        }
        'snippy_run' {
            description = "Rapid variant calling from Illumina sequence reads"
            path = "modules/nf-core/snippy/run"
        }
        'snippy_core' {
            description = "Core-SNP alignment from Snippy outputs"
            path = "modules/nf-core/snippy/core"
        }
        'snpdists' {
            description = "Pairwise SNP distance matrix from a FASTA sequence alignment"
            ext = "fna"
            path = "modules/nf-core/snpdists"
        }
        'spatyper' {
            description = "Computational method for finding spa types in Staphylococcus aureus"
            ext = "fna"
            path = "modules/nf-core/spatyper"
        }
        'srahumanscrubber_initdb' {
            path = "modules/nf-core/srahumanscrubber/initdb"
        }
        'srahumanscrubber_scrub' {
            path = "modules/nf-core/srahumanscrubber/scrub"
        }
        'staphopiasccmec' {
            description = "Primer based SCCmec typing of Staphylococcus aureus genomes"
            ext = "fna"
            path = "modules/nf-core/staphopiasccmec"
        }
        'stecfinder' {
            description = "Serotyping Shigella toxin producing Escherichia coli genomes"
            ext = "fna_fastq"
            path = "modules/nf-core/stecfinder"
        }
        'ssuissero' {
            description = "Rapid Streptococcus suis Serotyping of assemblies"
            ext = "fna"
            path = "modules/nf-core/ssuissero"
        }
        'tblastn' {
            description = "Search against translated nucleotide BLAST databases using protein queries"
            ext = "blastdb"
            path = "modules/nf-core/blast/tblastn"
        }
        'tblastx' {
            description = "Search against translated nucleotide BLAST databases using translated nucleotide queries"
            ext = "blastdb"
            path = "modules/nf-core/blast/tblastx"
        }
        'tbprofiler' {
            description = "Detect resistance and lineages of Mycobacterium tuberculosis genomes"
            ext = "fastq"
            path = "modules/nf-core/tbprofiler/profile"
        }
    }
}
