name: pbptyper
description: Penicillin Binding Protein (PBP) typer for Streptococcus pneumoniae
icon: false
keywords:
  - fasta
  - resistance
  - Streptococcus pneumoniae
modules:
  - pbptyper
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 tab-delimited file with the predicted PBP type
      pattern: "*.tsv"
  - merged_tsv:
      type: file
      description: A merged TSV of all pbptyper result files
      pattern: "pbptyper.tsv"
  - blast:
      type: file
      description: A tab-delimited file of all blast hits
      pattern: "*.tblastn.tsv"
  - versions:
      type: file
      description: File containing software versions
      pattern: 'versions.yml'
docs:
  meta:
    title: pbptyper
    description: >-
      A Bactopia Tool which uses pbptyper for typing the Penicillin
      Binding Protein (PBP) of _Streptococcus pneumoniae_ assemblies.
  introduction: |
      The `pbptyper` module uses [pbptyper](https://github.com/rpetit3/pbptyper) for typing
      the Penicillin Binding Protein (PBP) of _Streptococcus pneumoniae_ assemblies.
  output:
    tree: |
      <BACTOPIA_DIR>
      ├── <SAMPLE_NAME>
      │   └── tools
      │       └── pbptyper
      │           ├── <SAMPLE_NAME>-{1A,2B,2X}.tblastn.tsv
      │           ├── <SAMPLE_NAME>.tsv
      │           └── logs
      │               ├── nf-pbptyper.{begin,err,log,out,run,sh,trace}
      │               └── versions.yml
      └── bactopia-runs
          └── pbptyper-<TIMESTAMP>
              ├── merged-results
              │   ├── logs
              │   │   └── pbptyper-concat
              │   │       ├── nf-merged-results.{begin,err,log,out,run,sh,trace}
              │   │       └── versions.yml
              │   └── pbptyper.tsv
              └── nf-reports
                  ├── pbptyper-dag.dot
                  ├── pbptyper-report.html
                  ├── pbptyper-timeline.html
                  └── pbptyper-trace.txt
    add_note: true
    folders:
      - name: Merged Results
        description: |
          Below are results that are concatenated into a single file.
        table:
          - id: pbptyper.tsv
            description: A merged TSV file with `pbptyper` results from all samples
      - name: pbptyper
        description: |
          Below is a description of the _per-sample_ results from [pbptyper](https://github.com/rpetit3/pbptyper).
        is_extensions: true
        table:
          - id: .tblastn.tsv
            description: A tab-delimited file of all blast hits
          - id: .tsv
            description: A tab-delimited file with the predicted PBP type
  citations:
    - csvtk
    - pbptyper
