name: "bam_markduplicates_picard"
description: Picard MarkDuplicates, index BAM file and run samtools stats, flagstat and idxstats
keywords:
  - markduplicates
  - bam
  - sam
  - cram

modules:
  - picard/markduplicates
  - samtools/index
  - samtools/stats
  - samtools/idxstats
  - samtools/flagstat

input:
  - meta:
      type: map
      description: |
        Groovy Map containing sample information
        e.g. [ id:'test' ]
  - bam:
      type: file
      description: BAM/CRAM/SAM file
      pattern: "*.{bam,cram,sam}"
  - fasta:
      type: file
      description: Reference genome fasta file
      pattern: "*.{fasta,fa}"
  - fai:
      type: file
      description: Reference genome fasta index file
      pattern: "*.{fai}"

output:
  - meta:
      type: map
      description: |
        Groovy Map containing sample information
        e.g. [ id:'test' ]
  - bam:
      type: file
      description: BAM file with duplicate reads marked/removed
      pattern: "*.{bam}"
  - bai:
      type: file
      description: BAM/CRAM/SAM samtools index
      pattern: "*.{bai,crai,sai}"
  - csi:
      type: file
      description: CSI samtools index
      pattern: "*.csi"
  - stats:
      type: file
      description: File containing samtools stats output
  - flagstat:
      type: file
      description: File containing samtools flagstat output
  - idxstats:
      type: file
      description: File containing samtools idxstats output
      pattern: "*.{idxstats}"
  - metrics:
      type: file
      description: Duplicate metrics file generated by picard
      pattern: "*.{metrics.txt}"
  - versions:
      type: file
      description: File containing software versions
      pattern: "versions.yml"
authors:
  - "@dmarron"
  - "@drpatelh"
