name: shigatyper
description: Shigella serotype from Illumina or Oxford Nanopore reads
keywords:
  - fastq
  - shigella
  - serotype
modules:
  - shigatyper
input:
  - meta:
      type: map
      description: |
        Groovy Map containing sample information
        e.g. [ id:'test', single_end:false, run_type:'runtype' ]
  - reads:
      type: file
      description: Input Illumina or Nanopore reads in FASTQ format
output:
  - meta:
      type: map
      description: |
        Groovy Map containing sample information
        e.g. [ id:'test', single_end:false ]
  - tsv:
      type: file
      description: Per-sample results from ShigaTyper
      pattern: "*.tsv"
  - merged_tsv:
      type: file
      description: A merged summary of the ShigaTyper results
      pattern: "shigatyper.tsv"
  - hits:
      type: file
      description: A merged summary of the agrvate assessement
      pattern: "*-hits.tsv"
  - versions:
      type: file
      description: File containing software versions
      pattern: "versions.yml"
docs:
  meta:
    title: shigatyper
    description: >-
      A Bactopia Tool which uses ShigaTyyper to rapidly determine Shigella serotype using
      Illumina or Oxford Nanopore reads.
  introduction: |
    The `shigatyper` module uses [ShigaTyyper](https://github.com/CFSAN-Biostatistics/shigatyper) to rapidly determine 
    Shigella serotype using Illumina (single or paired-end) or Oxford Nanopore reads.
  output:
    tree: |
      <BACTOPIA_DIR>
      ├── <SAMPLE_NAME>
      │   └── tools
      │       └── shigatyper
      │           ├── <SAMPLE_NAME>-hits.tsv
      │           ├── <SAMPLE_NAME>.tsv
      │           └── logs
      │               ├── nf-shigatyper.{begin,err,log,out,run,sh,trace}
      │               └── versions.yml
      └── bactopia-runs
          └── shigatyper-<TIMESTAMP>
              ├── merged-results
              │   ├── logs
              │   │   └── shigatyper-concat
              │   │       ├── nf-merged-results.{begin,err,log,out,run,sh,trace}
              │   │       └── versions.yml
              │   └── shigatyper.tsv
              └── nf-reports
                  ├── shigatyper-dag.dot
                  ├── shigatyper-report.html
                  ├── shigatyper-timeline.html
                  └── shigatyper-trace.txt
    add_note: true
    folders:
      - name: Merged Results
        description: |
          Below are results that are concatenated into a single file.
        table:
          - id: shigatyper.tsv
            description: A merged TSV file with `ShigaTyper` results from all samples
      - name: ShigaTyper
        description: |
          Below is a description of the _per-sample_ results from [ShigaTyyper](https://github.com/CFSAN-Biostatistics/shigatyper).
        table:
          - id: <SAMPLE_NAME>-hits.tsv
            description: Detailed statistics about each individual gene hit
          - id: <SAMPLE_NAME>.tsv
            description: The final predicted serotype by `ShigaTyper`
  citations:
    - csvtk
    - shigatyper
