name: ectyper
description: In-silico prediction of _Escherichia coli_ serotype
icon: false
tags:
  - Escherichia coli
  - fasta
  - serotype
modules:
  - ectyper
input:
  - meta:
      type: map
      description: |
        Groovy Map containing sample information
        e.g. [ id:'test', single_end:false ]
  - fasta:
      type: file
      description: The final assembly in FASTA format
      pattern: "*.{fna,fna.gz}"
output:
  - meta:
      type: map
      description: |
        Groovy Map containing sample information
        e.g. [ id:'test', single_end:false ]
  - tsv:
      type: file
      description: A summary of the per-sample ectyper result
      pattern: "*.tsv"
  - merged_tsv:
      type: file
      description: A merged TSV of all ectyper result files
      pattern: "ectyper.tsv"
  - txt:
      type: file
      description: Allele report generated from BLAST results
      pattern: "*.txt"
  - versions:
      type: file
      description: File containing software versions
      pattern: 'versions.yml'
docs:
  meta:
    title: ectyper
    description: >-
      A Bactopia Tool which uses ECTyper to conduct _in silico_ prediction
      of serotype for _Escherichia coli_ genomes.
  introduction: |
    The `ectyper` module used [ECTyper](https://github.com/phac-nml/ecoli_serotyping) to conduct
    _in silico_ prediction of serotype for _Escherichia coli_ genomes. It uses the genome assemblies
    tp provide basic species identification and the predicted _E. coli_ serotype (e.g. O174:H21).
  output:
    tree: |
      <BACTOPIA_DIR>
      ├── <SAMPLE_NAME>
      │   └── tools
      │       └── ectyper
      │           ├── <SAMPLE_NAME>.tsv
      │           ├── blast_output_alleles.txt
      │           └── logs
      │               ├── ectyper.log
      │               ├── nf-ectyper.{begin,err,log,out,run,sh,trace}
      │               └── versions.yml
      └── bactopia-runs
          └── ectyper-<TIMESTAMP>
              ├── merged-results
              │   ├── ectyper.tsv
              │   └── logs
              │       └── ectyper-concat
              │           ├── nf-merged-results.{begin,err,log,out,run,sh,trace}
              │           └── versions.yml
              └── nf-reports
                  ├── ectyper-dag.dot
                  ├── ectyper-report.html
                  ├── ectyper-timeline.html
                  └── ectyper-trace.txt
    add_note: true
    folders:
      - name: Merged Results
        description: |
          Below are results that are concatenated into a single file.
        table:
          - id: ectyper.tsv
            description: A merged TSV file with `ECTyper` results from all samples
      - name: ECTyper
        description: |
          Below is a description of the _per-sample_ results from [ECTyper](https://github.com/phac-nml/ecoli_serotyping).
        table:
          - id: <SAMPLE_NAME>.tsv
            description: A tab-delimited file with `ECTyper` result, see [ECTyper - Report format](https://github.com/phac-nml/ecoli_serotyping#report-format) for details
          - id: blast_output_alleles.txt
            description: Allele report generated from BLAST results
  citations:
    - csvtk
    - ectyper
