name: checkm
description: Assess the assembly quality of your samples
icon: false
keywords:
  - fasta
  - assembly quality
modules:
  - checkm
input:
  - meta:
      type: map
      description: |
        Groovy Map containing sample information
        e.g. [ id:'test', single_end:false ]
  - assembly:
      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 ]
  - versions:
      type: file
      description: File containing software versions
      pattern: "versions.yml"
  - results:
      type: file
      description: The full results of CheckM for each sample
      pattern: "*"
  - report:
      type: file
      description: Tab-delimited report of results for a single sample
      pattern: "*.{txt}"
  - merged_reports:
      type: file
      description: Tab-delimited report of results from all samples
      pattern: "*.{txt}"
docs:
  meta:
    title: checkm
    description: >-
      A Bactopia Tool which uses CheckM to assess the quality of microbial
      genomes recovered from isolates.
  introduction: |
    The `checkm` module is used [CheckM](https://github.com/Ecogenomics/CheckM) to assess the quality of microbial
    genomes recovered from isolates, single cells, and metagenomes.
  output:
    tree: |
      <BACTOPIA_DIR>
      ├── <SAMPLE_NAME>
      │   └── tools
      │       └── checkm
      │           ├── <SAMPLE_NAME>-genes.aln
      │           ├── <SAMPLE_NAME>-results.txt
      │           ├── bins/
      │           ├── lineage.ms
      │           ├── logs
      │           │   ├── checkm.log
      │           │   ├── nf-checkm.{begin,err,log,out,run,sh,trace}
      │           │   └── versions.yml
      │           └── storage/
      └── bactopia-runs
          └── checkm-<TIMESTAMP>
              ├── merged-results
              │   ├── checkm.tsv
              │   └── logs
              │       └── checkm-concat
              │           ├── nf-merged-results.{begin,err,log,out,run,sh,trace}
              │           └── versions.yml
              └── nf-reports
                  ├── checkm-dag.dot
                  ├── checkm-report.html
                  ├── checkm-timeline.html
                  └── checkm-trace.txt
    add_note: false
    folders:
      - name: Merged Results
        description: |
          Below are results that are concatenated into a single file.
        table:
          - id: checkm.tsv
            description: A merged TSV file with `checkm` results from all samples
      - name: CheckM
        description: |
          Below is a description of the _per-sample_ results from [CheckM](https://github.com/Ecogenomics/CheckM).
        table:
          - id: <SAMPLE_NAME>-genes.aln
            description: Alignment of multi-copy genes and their AAI identity
          - id: <SAMPLE_NAME>-results.txt
            description: Final results of Final results of [CheckM's lineage_wf](https://github.com/Ecogenomics/CheckM/wiki/Workflows#lineage-specific-workflow)
          - id: bins/
            description: A folder with inputs (e.g. proteins) for processing by `CheckM`
          - id: lineage.ms
            description: Output file describing marker set for each bin
          - id: storage/
            description: A folder with intermediate results from `CheckM` processing
  citations:
    - checkm
    - csvtk
