name: mashtree
description: Quickly create a tree using Mash distances
introduction: |
  The `mashtree` module uses [Mashtree](https://github.com/lskatz/mashtree) to create a tree of your samples
  using [Mash](https://github.com/marbl/Mash) distance. You can use use `--species` or `-accessions` to to
  see how your samples compare to completed genomes. If used, 
  [ncbi-genome-download](https://github.com/kblin/ncbi-genome-download) will download available completed 
  genomes available from RefSeq and they will be included in your tree.
icon: false
tags:
  - tree
  - mash
  - fasta
modules:
  - mashtree
input:
  - meta:
      type: map
      description: |
        Groovy Map containing sample information
        e.g. [ id:'test', single_end:false ]
  - fasta:
      type: file
      description: FASTA files to build tree from
      pattern: "*.{fna,fna.gz,fasta,fasta.gz,fa,fa.gz}"
output:
  - meta:
      type: map
      description: |
        Groovy Map containing sample information
        e.g. [ id:'test', single_end:false ]
  - tree:
      type: file
      description: A Newick formatted tree file
      pattern: "*.dnd"
  - matrix:
      type: file
      description: A TSV matrix of pair-wise Mash distances
      pattern: "*.tsv"
  - versions:
      type: file
      description: File containing software versions
      pattern: 'versions.yml'
docs:
  meta:
    title: mashtree
    description: >-
      A Bactopia Tool which uses Mashtree to create a tree of your samples
      using Mash distances.
  introduction: |
    The `mashtree` module uses [Mashtree](https://github.com/lskatz/mashtree) to create a tree of your samples
    using [Mash](https://github.com/marbl/Mash) distances. 
    
    You can also use `--species` or `-accessions` to see how your samples compare to completed genomes. If used, 
    [ncbi-genome-download](https://github.com/kblin/ncbi-genome-download) will download available completed 
    genomes available from RefSeq and they will be included in your tree.
  output:
    tree: |
      <BACTOPIA_DIR>
      └── bactopia-runs
          └── mashtree-<TIMESTAMP>
              ├── mashtree
              │   ├── logs
              │   │   ├── nf-mashtree.{begin,err,log,out,run,sh,trace}
              │   │   └── versions.yml
              │   └── mashtree.{dnd|tsv}
              └── nf-reports
                  ├── mashtree-dag.dot
                  ├── mashtree-report.html
                  ├── mashtree-timeline.html
                  └── mashtree-trace.txt
    add_note: false
    folders:
      - name: Mashtree
        description: |
          Below are results that are in the base directory.
        table:
          - id: mashtree.dnd
            description: A Newick formatted tree file
          - id: mashtree.tsv
            description: A TSV matrix of pair-wise Mash distances
  citations:
    - mashtree
    - mash
    - ncbigenomedownload
