name: seqsero2
description: Salmonella serotype prediction from reads or assemblies
icon: false
tags:
  - fasta
  - fastq
  - Salmonella
  - sertotype
modules:
  - seqsero2
input:
  - meta:
      type: map
      description: |
        Groovy Map containing sample information
        e.g. [ id:'test', single_end:false ]
  - seqs:
      type: file
      description: FASTQ or FASTA formated sequences
      pattern: "*.{fq.gz,fastq.gz,fna.gz,fna,fasta.gz,fasta,fa.gz,fa}"
output:
  - meta:
      type: map
      description: |
        Groovy Map containing sample information
        e.g. [ id:'test', single_end:false ]
  - versions:
      type: file
      description: File containing software versions
      pattern: "versions.yml"
  - tsv:
      type: file
      description: Per-sample TSV summary of the SeqSero2 results
      pattern: "*_result.tsv"
  - merged_tsv:
      type: file
      description: Merged TSV summary of all SeqSero2 results
      pattern: "seqsero2.tsv"
docs:
  meta:
    title: seqsero2
    description: >-
      A Bactopia Tool which uses SeqSero2 for Salmonella serotype prediction
      from reads and assemblies.
  introduction: |
    The `seqsero2` module uses [SeqSero2](https://github.com/denglab/SeqSero2) for Salmonella
    serotype prediction from reads and assemblies.
  output:
    tree: |
      <BACTOPIA_DIR>
      ├── <SAMPLE_NAME>
      │   └── tools
      │       └── seqsero2
      │           ├── <SAMPLE_NAME>_log.txt
      │           ├── <SAMPLE_NAME>_result.tsv
      │           ├── <SAMPLE_NAME>_result.txt
      │           └── logs
      │               ├── nf-seqsero2.{begin,err,log,out,run,sh,trace}
      │               └── versions.yml
      └── bactopia-runs
          └── seqsero2-<TIMESTAMP>
              ├── merged-results
              │   ├── logs
              │   │   └── seqsero2-concat
              │   │       ├── nf-merged-results.{begin,err,log,out,run,sh,trace}
              │   │       └── versions.yml
              │   └── seqsero2.tsv
              └── nf-reports
                  ├── seqsero2-dag.dot
                  ├── seqsero2-report.html
                  ├── seqsero2-timeline.html
                  └── seqsero2-trace.txt
    add_note: true
    folders:
      - name: Merged Results
        description: |
          Below are results that are concatenated into a single file.
        table:
          - id: seqsero2.tsv
            description: A merged TSV file with `SeqSero2` results from all samples
      - name: SeqSero2
        description: |
          Below is a description of the _per-sample_ results from [SeqSero2](https://github.com/denglab/SeqSero2).
        table:
          - id: <SAMPLE_NAME>_result.tsv
            description: A tab-delimited file with `SeqSero2` results
          - id: <SAMPLE_NAME>_result.txt
            description: A text file with key-value pairs of `SeqSero2` results
  citations:
    - csvtk
    - seqsero2
