name: fq_subsample
namespace: fq
description: fq subsample outputs a subset of records from single or paired FASTQ files.
keywords: [fastq, subsample, subset]
links:
  homepage: https://github.com/stjude-rust-labs/fq/blob/master/README.md
  documentation: https://github.com/stjude-rust-labs/fq/blob/master/README.md
  repository: https://github.com/stjude-rust-labs/fq
license: MIT
requirements:
  commands: [fq]
authors:
  - __merge__: /src/_authors/robrecht_cannoodt.yaml
    roles: [ author, maintainer ]
  - __merge__: /src/_authors/emma_rousseau.yaml
    roles: [ author ]

argument_groups: 
- name: "Input"
  arguments: 
  - name: "--input_1"

    type: file
    required: true
    description: First input fastq file to subsample. Accepts both raw and gzipped FASTQ inputs.
  - name: "--input_2"
    type: file
    description: Second input fastq files to subsample. Accepts both raw and gzipped FASTQ inputs.

- name: "Output"
  arguments: 
  - name: "--output_1"
    type: file
    direction: output
    description: Sampled read 1 fastq files. Output will be gzipped if ends in `.gz`.
  - name: "--output_2"
    type: file
    direction: output
    description: Sampled read 2 fastq files. Output will be gzipped if ends in `.gz`.

- name: "Options"
  arguments: 
  - name: "--probability"
    type: double
    description: The probability a record is kept, as a percentage (0.0, 1.0). Cannot be used with `record-count`
  - name: "--record_count"
    type: integer
    description: The exact number of records to keep. Cannot be used with `probability`
  - name: "--seed"
    type: integer
    description: Seed to use for the random number generator

resources:
  - type: bash_script
    path: script.sh

test_resources:
  - type: bash_script
    path: test.sh

engines:  
  - type: docker
    image: quay.io/biocontainers/fq:0.12.0--h9ee0642_0
    setup:
      - type: docker
        run: |
          fq -V | sed 's#fq \([0-9.]*\) .*#fq: \1#' > /var/software_versions.txt

runners:
  - type: executable
  - type: nextflow
