name: samtools_bam2fq
description: |
  The module uses bam2fq method from samtools to
  convert a SAM, BAM or CRAM file to FASTQ format
keywords:
  - bam2fq
  - samtools
  - fastq
tools:
  - samtools:
      description: Tools for dealing with SAM, BAM and CRAM files

      documentation: http://www.htslib.org/doc/1.1/samtools.html

      licence: ["MIT"]

input:
  - meta:
      type: map
      description: |
        Groovy Map containing sample information
        e.g. [ id:'test', single_end:false ]
  - inputbam:
      type: file
      description: BAM/CRAM/SAM file
      pattern: "*.{bam,cram,sam}"
  - split:
      type: boolean
      description: |
        TRUE/FALSE value to indicate if reads should be separated into
        /1, /2 and if present other, or singleton.
        Note: choosing TRUE will generate 4 different files.
        Choosing FALSE will produce a single file, which will be interleaved in case
        the input contains paired reads.

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"
  - reads:
      type: file
      description: |
        FASTQ files, which will be either a group of 4 files (read_1, read_2, other and singleton)
        or a single interleaved .fq.gz file if the user chooses not to split the reads.
      pattern: "*.fq.gz"

authors:
  - "@lescai"
