name: bam_stats_samtools
description: Produces comprehensive statistics from SAM/BAM/CRAM file
keywords:
  - statistics
  - counts
  - bam
  - sam
  - cram
modules:
  - samtools/stats
  - samtools/idxstats
  - samtools/flagstat
input:
  - meta:
      type: map
      description: |
        Groovy Map containing sample information
        e.g. [ id:'test', single_end:false ]
  - bam:
      type: file
      description: BAM/CRAM/SAM file
      pattern: "*.{bam,cram,sam}"
  - bai:
      type: file
      description: Index for BAM/CRAM/SAM file
      pattern: "*.{bai,crai,sai}"
  - fasta:
      type: file
      description: Reference genome fasta file
      pattern: "*.{fasta,fa}"
# TODO Update when we decide on a standard for subworkflow docs
output:
  - meta:
      type: map
      description: |
        Groovy Map containing sample information
        e.g. [ id:'test', single_end:false ]
  - stats:
      type: file
      description: File containing samtools stats output
      pattern: "*.{stats}"
  - flagstat:
      type: file
      description: File containing samtools flagstat output
      pattern: "*.{flagstat}"
  - idxstats:
      type: file
      description: File containing samtools idxstats output
      pattern: "*.{idxstats}"
  - versions:
      type: file
      description: File containing software versions
      pattern: "versions.yml"
authors:
  - "@drpatelh"
