name: mykrobe
description: Antimicrobial resistance detection for specific species
icon: false
keywords:
  - fastq
  - antimicrobial resistance
modules:
  - mykrobe
input:
  - meta:
    type: map
    description: |
      Groovy Map containing sample information
      e.g. [ id:'test', single_end:false ]
  - seqs:
      type: file
      description: BAM or FASTQ file
      pattern: "*.{bam,fastq.gz,fq.gz}"
  - species:
      type: string
      description: Species to make AMR prediction against
      pattern: "*"
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"
  - csv:
      type: file
      description: AMR predictions in CSV format
      pattern: "*.csv"
  - merged_csv:
      type: file
      description: A merged CSV of all Mykrobe results
      pattern: "*.csv"
  - json:
      type: file
      description: AMR predictions in JSON format
      pattern: "*.json"
docs:
  meta:
    title: mykrobe
    description: >-
      A Bactopia Tool which uses Mykrobe to predict antimicrobial resistance for _Mycobacterium tuberculosis_,
      _Staphylococcus aureus_, _Shigella sonnei_, and _Salmonella typhi_.
  introduction: |
      The `mykrobe` module uses the command-line version of [Mykrobe](https://github.com/Mykrobe-tools/mykrobe) to predict
      antimicrobial resistance for _Mycobacterium tuberculosis_, _Staphylococcus aureus_, _Shigella sonnei_, and _Salmonella typhi_.
  output:
    tree: |
      <BACTOPIA_DIR>
      ├── <SAMPLE_NAME>
      │   └── tools
      │       └── mykrobe
      │           ├── logs
      │           │   ├── nf-mykrobe.{begin,err,log,out,run,sh,trace}
      │           │   └── versions.yml
      │           ├── <SAMPLE_NAME>.csv
      │           └── <SAMPLE_NAME>.json
      └── bactopia-runs
          └── mykrobe-<TIMESTAMP>
              ├── merged-results
              │   ├── logs
              │   │   └── mykrobe-concat
              │   │       ├── nf-merged-results.{begin,err,log,out,run,sh,trace}
              │   │       └── versions.yml
              │   └── mykrobe.csv
              └── nf-reports
                  ├── mykrobe-dag.dot
                  ├── mykrobe-report.html
                  ├── mykrobe-timeline.html
                  └── mykrobe-trace.txt
    add_note: false
    folders:
      - name: Merged Results
        description: |
          Below are results that are concatenated into a single file.
        table:
          - id: mykrobe.tsv
            description: A merged CSV file with `Mykrobe` results from all samples
      - name: Mykrobe
        description: |
          Below is a description of the _per-sample_ results from [Mykrobe](https://github.com/Mykrobe-tools/mykrobe). A full description of
          each output file is available at [Mykrobe - AMR Prediction Output](https://github.com/Mykrobe-tools/mykrobe/wiki/AMR-prediction-output).
        table:
          - id: <SAMPLE_NAME>.csv
            description: The output of `mykrobe predict` in comma-separated format
          - id: <SAMPLE_NAME>.json
            description: The output of `mykrobe predict` in JSON format
  citations:
    - csvtk
    - mykrobe
