# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json
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:
  - ch_bam:
      description: |
        BAM/CRAM/SAM file
        Structure: [ val(meta), path(bam) ]
  - ch_fasta:
      description: |
        Reference genome fasta file
        Structure: [ path(fasta) ]
  - ch_fasta:
      description: |
        Index of the reference genome fasta file
        Structure: [ path(fai) ]
output:
  - bam:
      description: |
        processed BAM/CRAM/SAM file
        Structure: [ val(meta), path(bam) ]
  - bai:
      description: |
        BAM/CRAM/SAM samtools index
        Structure: [ val(meta), path(bai) ]
  - csi:
      description: |
        CSI samtools index
        Structure: [ val(meta), path(csi) ]
  - stats:
      description: |
        File containing samtools stats output
        Structure: [ val(meta), path(stats) ]
  - flagstat:
      description: |
        File containing samtools flagstat output
        Structure: [ val(meta), path(flagstat) ]
  - idxstats:
      description: |
        File containing samtools idxstats output
        Structure: [ val(meta), path(idxstats) ]
  - versions:
      description: |
        Files containing software versions
        Structure: [ path(versions.yml) ]
authors:
  - "@dmarron"
  - "@drpatelh"
