name: amrfinderplus
description: Identify antimicrobial resistance in genes or proteins

icon: false
tags:
  - antimicrobial resistance
  - fasta
modules:
  - amrfinderplus
input:
  - meta:
      type: map
      description: |
        Groovy Map containing sample information
        e.g. [ id:'test', single_end:false ]
  - fasta:
      type: file
      description: |
        Assembly and predicted proteins to screen
  - db:
      type: file
      description: |
        AMRFinder+ database create by this workflow or bactopia datasets
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"
  - gene_tsv:
      type: file
      description: AMRFinder+ final gene report
      pattern: "*-genes.tsv"
  - merged_gene_tsv:
      type: file
      description: A merged TSV of all AMRFinder+ gene reports
      pattern: "amrfinderplus-genes.tsv"
  - proteins_tsv:
      type: file
      description: AMRFinder+ final protein report
      pattern: "*-proteins.tsv"
  - merged_proteins_tsv:
      type: file
      description: A merged TSV of all AMRFinder+ protein reports
      pattern: "amrfinderplus-proteins.tsv"
  - mutation_reports:
      type: file
      description: Report of organism-specific point-mutations
      pattern: "*-mutations.tsv"
docs:
  meta:
    title: amrfinderplus
    description: >-
      A Bactopia Tool which uses AMRFinder+ to screen assemblies and proteins
      for antimicrobial resistance and virulence genes.
  introduction: |
    The `amrfinderplus` module uses [AMRFinder+](https://github.com/ncbi/amr) to screen assemblies and proteins
    for antimicrobial resistance and virulence genes.
  output:
    tree: |
      <BACTOPIA_DIR>
      ├── <SAMPLE_NAME>
      │   └── tools
      │       └── amrfinderplus
      │           ├── <SAMPLE_NAME>-genes.tsv
      │           ├── <SAMPLE_NAME>-proteins.tsv
      │           └── logs
      │               ├── nf-amrfinderplus.{begin,err,log,out,run,sh,trace}
      │               └── versions.yml
      └── bactopia-runs
          └── amrfinderplus-<TIMESTAMP>
              ├── merged-results
              │   ├── amrfinderplus-genes.tsv
              │   ├── amrfinderplus-proteins.tsv
              │   └── logs
              │       └── amrfinderplus-{genes|proteins|-concat
              │           ├── nf-merged-results.{begin,err,log,out,run,sh,trace}
              │           └── versions.yml
              └── nf-reports
                  ├── amrfinderplus-dag.dot
                  ├── amrfinderplus-report.html
                  ├── amrfinderplus-timeline.html
                  └── amrfinderplus-trace.txt
    add_note: false
    folders:
      - name: Merged Results
        description: |
          Below are results that are concatenated into a single file.
        table:
          - id: amrfinderplus-genes.tsv
            description: A merged TSV file with `AMRFinder+` results using nucleotide inputs
          - id: amrfinderplus-proteins.tsv
            description: A merged TSV file with `AMRFinder+` results using protein inputs
      - name: AMRFinder+
        description: |
          Below is a description of the _per-sample_ results from [AMRFinder+](https://github.com/ncbi/amr).
        is_extensions: true
        table:
          - id: -genes.tsv
            description: A TSV file with `AMRFinder+` results using nucleotide inputs
          - id: -proteins.tsv
            description: A TSV file with `AMRFinder+` results using protein inputs
  citations:
    - amrfinderplus
    - csvtk
