name: prokka
description: Whole genome annotation of small genomes (bacterial, archaeal, viral)
introduction: |
  The `prokka` module uses [Prokka](https://github.com/tseemann/prokka) to rapidly annotate bacterial 
  genomes and plasmids.
icon: false
tags:
  - annotation
  - fasta
modules:
  - prokka
input:
  - meta:
      type: map
      description: |
        Groovy Map containing sample information
        e.g. [ id:'test', single_end:false ]
  - fasta:
      type: file
      description: |
        FASTA file to be annotated. Has to contain at least a non-empty string dummy value.
  - proteins:
      type: file
      description: FASTA file of trusted proteins to first annotate from (optional)
  - prodigal_tf:
      type: file
      description: Training file to use for Prodigal (optional)
output:
  - meta:
      type: map
      description: |
        Groovy Map containing sample information
        e.g. [ id:'test', single_end:false ]
  - version:
      type: file
      description: File containing software version
      pattern: "*.{version.txt}"
  - gff:
      type: file
      description: annotation in GFF3 format, containing both sequences and annotations
      pattern: "*.{gff}"
  - gbk:
      type: file
      description: annotation in GenBank format, containing both sequences and annotations
      pattern: "*.{gbk}"
  - fna:
      type: file
      description: nucleotide FASTA file of the input contig sequences
      pattern: "*.{fna}"
  - faa:
      type: file
      description: protein FASTA file of the translated CDS sequences
      pattern: "*.{faa}"
  - ffn:
      type: file
      description: nucleotide FASTA file of all the prediction transcripts (CDS, rRNA, tRNA, tmRNA, misc_RNA)
      pattern: "*.{ffn}"
  - sqn:
      type: file
      description: an ASN1 format "Sequin" file for submission to Genbank
      pattern: "*.{sqn}"
  - fsa:
      type: file
      description: nucleotide FASTA file of the input contig sequences, used by "tbl2asn" to create the .sqn file
      pattern: "*.{fsa}"
  - tbl:
      type: file
      description: feature Table file, used by "tbl2asn" to create the .sqn file
      pattern: "*.{tbl}"
  - err:
      type: file
      description: unacceptable annotations - the NCBI discrepancy report.
      pattern: "*.{err}"
  - log:
      type: file
      description: contains all the output that Prokka produced during its run
      pattern: "*.{log}"
  - txt:
      type: file
      description: statistics relating to the annotated features found
      pattern: "*.{txt}"
  - tsv:
      type: file
      description: tab-separated file of all features (locus_tag,ftype,len_bp,gene,EC_number,COG,product)
      pattern: "*.{tsv}"
docs:
  meta:
    title: stecfinder
    description: >-
      A Bactopia Tool which uses Prokka to rapidly provide annotations in a standardized fashion.
  introduction: |
    The `prokka` module uses [Prokka](https://github.com/tseemann/prokka) to rapidly annotate bacterial 
    genomes in a standardized fashion.
  output:
    tree: |
      <BACTOPIA_DIR>
      ├── <SAMPLE_NAME>
      │   └── main
      │       └── annotator
      │           └── prokka
      │               ├── <SAMPLE_NAME>-blastdb.tar.gz
      │               ├── <SAMPLE_NAME>.faa.gz
      │               ├── <SAMPLE_NAME>.ffn.gz
      │               ├── <SAMPLE_NAME>.fna.gz
      │               ├── <SAMPLE_NAME>.fsa.gz
      │               ├── <SAMPLE_NAME>.gbk.gz
      │               ├── <SAMPLE_NAME>.gff.gz
      │               ├── <SAMPLE_NAME>.sqn.gz
      │               ├── <SAMPLE_NAME>.tbl.gz
      │               ├── <SAMPLE_NAME>.tsv
      │               ├── <SAMPLE_NAME>.txt
      │               └── logs
      │                   ├── <SAMPLE_NAME>.{err|log}
      │                   ├── nf-prokka.{begin,err,log,out,run,sh,trace}
      │                   └── versions.yml
      └── bactopia-runs
          └── prokka-<TIMESTAMP>
              └── nf-reports
                  ├── prokka-dag.dot
                  ├── prokka-report.html
                  ├── prokka-timeline.html
                  └── prokka-trace.txt
    add_note: false
    folders:
      - name: Prokka
        description: |
          Below is a description of the _per-sample_ results from [Prokka](https://github.com/tseemann/prokka).
        is_extensions: true
        table:
        - id: .blastdb.tar.gz
          description: A gzipped tar archive of BLAST+ database of the contigs, genes, and proteins
        - id: .faa.gz
          description: Protein FASTA file of the translated CDS sequences.
        - id: .ffn.gz
          description: Nucleotide FASTA file of all the prediction transcripts (CDS, rRNA, tRNA, tmRNA, misc_RNA)
        - id: .fna.gz
          description: Nucleotide FASTA file of the input contig sequences.
        - id: .gbk.gz
          description: This is a standard GenBank file derived from the master .gff. If the input to prokka was a multi-FASTA, then this will be a multi-GenBank, with one record for each sequence.
        - id: .gff.gz
          description: This is the master annotation in GFF3 format, containing both sequences and annotations. It can be viewed directly in Artemis or IGV.
        - id: .sqn.gz
          description: An ASN1 format "Sequin" file for submission to GenBank. It needs to be edited to set the correct taxonomy, authors, related publication etc.
        - id: .tbl.gz
          description: Feature Table file, used by "tbl2asn" to create the .sqn file.
        - id: .tsv
          description: Tab-separated file of all features (locus_tag,ftype,len_bp,gene,EC_number,COG,product)
        - id: .txt
          description: Statistics relating to the annotated features found.
  citations:
    - prokka
