name: bwa_samse
namespace: bwa
description: BWA samse - generate single-end alignment in SAM format from BWA aln SAI files.
keywords: [alignment, BWA, BWA-samse, SAM, single-end]
links:
  homepage: https://bio-bwa.sourceforge.net/
  documentation: https://bio-bwa.sourceforge.net/bwa.shtml
  repository: https://github.com/lh3/bwa
license: MIT
requirements:
  commands: [bwa]
authors:
  - __merge__: /src/_authors/robrecht_cannoodt.yaml
    roles: [ author, maintainer ]
  - __merge__: /src/_authors/toni_verbeiren.yaml
    roles: [ reviewer ]

argument_groups: 
- name: "Input"
  arguments: 
  - name: "--index"
    type: file
    description: BWA index base name (prefix of .amb, .ann, .bwt, .pac, .sa files).
    required: true
    example: reference.fasta
  - name: "--sai"
    type: file
    description: Input SAI file generated by BWA aln.
    required: true
    example: alignment.sai
  - name: "--reads"
    type: file
    description: Input FASTQ file with single-end reads.
    required: true
    example: reads.fastq

- name: "Output"
  arguments: 
  - name: "--output"
    alternatives: [-f]
    type: file
    direction: output
    description: Output SAM file. If not specified, output goes to stdout.
    example: output.sam

- name: "Options"
  arguments: 
  - name: "--max_occ"
    alternatives: [-n]
    type: integer
    description: Maximum occurrences for read mapping. Default varies by BWA version.
    example: 3
  - name: "--read_group"
    alternatives: [-r]
    type: string
    description: Read group header line such as '@RG\tID:foo\tSM:bar'.
    example: "@RG\\tID:sample1\\tSM:sample1"

resources:
  - type: bash_script
    path: script.sh
  - type: file
    path: help.txt

test_resources:
  - type: bash_script
    path: test.sh
  - path: /src/_utils/test_helpers.sh

engines:
- type: docker
  image: quay.io/biocontainers/bwa:0.7.19--h577a1d6_1
  setup:
    - type: docker
      run: |
        bwa 2>&1 | grep "Version:" | sed 's/Version: /bwa: /' > /var/software_versions.txt

runners:
- type: executable
- type: nextflow
