name: mlst
description: Automatic MLST calling from assembled contigs
keywords:
  - fasta
  - mlst
  - typing
modules:
  - mlst
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 mlst result
      pattern: "*.tsv"
  - merged_tsv:
      type: file
      description: A merged TSV of all MLST result files
      pattern: "mlst.tsv"
  - versions:
      type: file
      description: File containing software versions
      pattern: 'versions.yml'
docs:
  meta:
    title: mlst
    description: >-
      A Bactopia Tool which uses mlst scan assemblies and determine the sequence type based
      on PubMLST schemas.
  introduction: |
    The `mlst` module uses [mlst](https://github.com/tseemann/mlst) scan assemblies and determine the sequence type.
    It makes use of [PubMLST](https://pubmlst.org/) schemes and by default automatically scans each schema. To specify
    a specific scheme to scan, you can provide it with `--scheme`.
  output:
    tree: |
      <BACTOPIA_DIR>
      ├── <SAMPLE_NAME>
      │   └── tools
      │       └── mlst
      │           ├── <SAMPLE_NAME>.tsv
      │           └── logs
      │               ├── nf-mlst.{begin,err,log,out,run,sh,trace}
      │               └── versions.yml
      └── bactopia-runs
          └── mlst-<TIMESTAMP>
              ├── merged-results
              │   ├── logs
              │   │   └── mlst-concat
              │   │       ├── nf-merged-results.{begin,err,log,out,run,sh,trace}
              │   │       └── versions.yml
              │   └── mlst.tsv
              └── nf-reports
                  ├── mlst-dag.dot
                  ├── mlst-report.html
                  ├── mlst-timeline.html
                  └── mlst-trace.txt
    add_note: false
    folders:
      - name: Merged Results
        description: |
          Below are results that are concatenated into a single file.
        table:
          - id: mlst.tsv
            description: A merged TSV file with `mlst` results from all samples
      - name: mlst
        description: |
          Below is a description of the _per-sample_ results from [mlst](https://github.com/tseemann/mlst).
        table:
          - id: <SAMPLE_NAME>.tsv
            description: A tab-delimited file with `mlst` result, see [mlst - Usage](https://github.com/tseemann/mlst#usage) for more details
  citations:
    - csvtk
    - mlst
    - pubmlst
