name: hicap
description: Identify cap locus serotype and structure in your _Haemophilus influenzae_ assemblies
icon: false
tags:
  - capsule
  - Haemophilus influenzae
  - serotype
modules:
  - hicap
input:
  - meta:
      type: map
      description: |
        Groovy Map containing sample information
        e.g. [ id:'test', single_end:false ]
  - fasta:
      type: file
      description: A Haemophilus influenzae fasta file.
      pattern: "*.{fna,fna.gz}"
  - database_dir:
      type: directory
      description: Optional - Directory containing locus database
      pattern: "*/*"
  - model_fp:
      type: file
      description: Optional - Prodigal model to use for gene prediction
      pattern: "*.{bin}"
output:
  - meta:
      type: map
      description: |
        Groovy Map containing sample information
        e.g. [ id:'test', single_end:false ]
  - tsv:
      type: file
      description: A summary of the per-sample hicap result
      pattern: "*.tsv"
  - merged_tsv:
      type: file
      description: A merged TSV of all hicap result files
      pattern: "hicap.tsv"
  - gbk:
      type: file
      description: GenBank file and cap locus annotations
      pattern: "*.gbk"
  - svg:
      type: file
      description: Visualization of annotated cap locus
      pattern: "*.svg"
  - versions:
      type: file
      description: File containing software versions
      pattern: 'versions.yml'
docs:
  meta:
    title: hicap
    description: >-
      A Bactopia Tool which uses hicap along wih an assembly for the _in silico_ typing of
      the _Haemophilus influenzae_ cap locus.
  introduction: |
    The `hicap` module uses [hicap](https://github.com/scwatts/hicap) along wih an assembly for
    the _in silico_ typing of the _Haemophilus influenzae_ cap locus.
  output:
    tree: |
      <BACTOPIA_DIR>
      ├── <SAMPLE_NAME>
      │   └── tools
      │       └── hicap
      │           ├── <SAMPLE_NAME>.{gbk|svg|tsv}
      │           └── logs
      │               ├── nf-hicap.{begin,err,log,out,run,sh,trace}
      │               └── versions.yml
      └── bactopia-runs
          └── hicap-<TIMESTAMP>
              ├── merged-results
              │   ├── hicap.tsv
              │   └── logs
              │       └── hicap-concat
              │           ├── nf-merged-results.{begin,err,log,out,run,sh,trace}
              │           └── versions.yml
              └── nf-reports
                  ├── hicap-dag.dot
                  ├── hicap-report.html
                  ├── hicap-timeline.html
                  └── hicap-trace.txt
    add_note: true
    folders:
      - name: Merged Results
        description: |
          Below are results that are concatenated into a single file.
        table:
          - id: hicap.tsv
            description: A merged TSV file with `hicap` results from all samples
      - name: hicap
        description: |
          Below is a description of the _per-sample_ results from [hicap](https://github.com/scwatts/hicap).
        table:
          - id: <SAMPLE_NAME>.gbk
            description: GenBank file and cap locus annotations
          - id: <SAMPLE_NAME>.svg
            description: Visualization of annotated cap locus
          - id: <SAMPLE_NAME>.tsv
            description: A tab-delimited file with `hicap` results
  citations:
    - csvtk
    - hicap
