name: samtools_idxstats
namespace: samtools
description: Reports alignment summary statistics for a BAM file.
keywords: [stats, mapping, counts, chromosome, bam, sam, cram]
links:
  homepage: https://www.htslib.org/
  documentation: https://www.htslib.org/doc/samtools-idxstats.html
  repository: https://github.com/samtools/samtools
references: 
  doi: [10.1093/bioinformatics/btp352, 10.1093/gigascience/giab008]
license: MIT/Expat

argument_groups:
  - name: Inputs
    arguments:
      - name: "--bam"
        type: file
        description: BAM input file.
      - name: "--bai"
        type: file
        description: BAM index file.
      - name: "--fasta"
        type: file
        description: Reference file the CRAM was created with (optional).
  - name: Outputs
    arguments:
      - name: "--output"
        type: file
        description: |
          File containing samtools stats output in tab-delimited format.
        required: true
        direction: output
        example: output.idxstats
   
resources:
  - type: bash_script
    path: script.sh
test_resources:
  - type: bash_script
    path: test.sh
  - type: file
    path: test_data
engines:
  - type: docker
    image: quay.io/biocontainers/samtools:1.19.2--h50ea8bc_1
    setup:
      - type: docker
        run: |
          samtools --version 2>&1 | grep -E '^(samtools|Using htslib)' | \
          sed 's#Using ##;s# \([0-9\.]*\)$#: \1#' > /var/software_versions.txt
runners:
- type: executable
- type: nextflow