name: seqtk_subseq
namespace: seqtk
description: | 
  Extract subsequences from FASTA/Q files. Takes as input a FASTA/Q file and a name.lst (sequence ids file) or a reg.bed (genomic regions file).
keywords: [subseq, FASTA, FASTQ]
links:
  repository: https://github.com/lh3/seqtk/tree/v1.4
license: MIT
authors:
  - __merge__: /src/_authors/theodoro_gasperin.yaml
    roles: [ author, maintainer ]

argument_groups:
  - name: Inputs
    arguments:
      - name: "--input"
        type: file
        direction: input
        description: The input FASTA/Q file.
        required: true
        example: input.fa
        
      - name: "--name_list"
        type: file
        direction: input
        description: | 
          List of sequence names (name.lst) or genomic regions (reg.bed) to extract.
        required: true
        example: list.lst

  - name: Outputs
    arguments:
      - name: "--output"
        alternatives: -o
        type: file
        direction: output
        description: The output FASTA/Q file.
        required: true
        default: output.fa

  - name: Options
    arguments:
      - name: "--tab"
        alternatives: -t
        type: boolean_true
        description: TAB delimited output.
        
      - name: "--strand_aware"
        alternatives: -s
        type: boolean_true
        description: Strand aware.
        
      - name: "--sequence_line_length"
        alternatives: -l
        type: integer
        description: | 
          Sequence line length of input fasta file. Default: 0.
        example: 0
        

resources:
  - type: bash_script
    path: script.sh
test_resources:
  - type: bash_script
    path: test.sh

engines:
  - type: docker
    image: quay.io/biocontainers/seqtk:1.4--he4a0461_2
    setup:
      - type: docker
        run: |
          echo $(echo $(seqtk 2>&1) | sed -n 's/.*\(Version: [^ ]*\).*/\1/p') > /var/software_versions.txt

runners:
  - type: executable
  - type: nextflow
