name: mashdist
description: Calculate Mash distances between sequences
keywords:
  - ani
  - distance
modules:
  - mash_dist
input:
  - meta:
      type: map
      description: |
        Groovy Map containing sample information
        e.g. [ id:'test', single_end:false ]
  - fasta:
      type: file
      description: FASTA assembly file
      pattern: "*.{fasta,fasta.gz,fa,fa.gz,fna,fna.gz}"
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'
  - dist:
      type: file
      description: Per-sample summary of the Mash distance
      pattern: "*.txt"
  - merged_dist:
      type: file
      description: A merged summary of the each Mash distance
      pattern: "mashdist.tsv"
docs:
  meta:
    title: mashdist
    description: >-
      A Bactopia Tool which uses Mash to determine the Mash distance from
      a given reference genome(s).
  introduction: |
    The `mashdist` module uses [Mash](https://github.com/marbl/Mash) to determine the Mash
    distance from a given reference genome(s).
  output:
    tree: |
      <BACTOPIA_DIR>
      ├── <SAMPLE_NAME>
      │   └── tools
      │       └── mashdist
      │           └── mashdist
      │               ├── <SAMPLE_NAME>-dist.txt
      │               └── logs
      │                   ├── nf-mashdist.{begin,err,log,out,run,sh,trace}
      │                   └── versions.yml
      └── bactopia-runs
          └── mashdist-<TIMESTAMP>
              ├── merged-results
              │   ├── logs
              │   │   └── mashdist-concat
              │   │       ├── nf-merged-results.{begin,err,log,out,run,sh,trace}
              │   │       └── versions.yml
              │   └── mashdist.tsv
              └── nf-reports
                  ├── mashdist-dag.dot
                  ├── mashdist-report.html
                  ├── mashdist-timeline.html
                  └── mashdist-trace.txt
    add_note: false
    folders:
      - name: Merged Results
        description: |
          Below are results that are concatenated into a single file.
        table:
          - id: mashdist.tsv
            description: A merged TSV file with `Mash` distances against a reference from all samples
      - name: Mash
        description: |
          Below is a description of the _per-sample_ results from [Mash](https://github.com/marbl/Mash).
        table:
          - id: <SAMPLE_NAME>-dist.txt
            description: A tab-delimited file with `mash dist` results
  citations:
    - csvtk
    - mash
