name: adapterremoval
description: Trim sequencing adapters and collapse overlapping reads
keywords:
  - trimming
  - adapters
  - merging
  - fastq
tools:
  - adapterremoval:
      description: The AdapterRemoval v2 tool for merging and clipping reads.
      homepage: https://github.com/MikkelSchubert/adapterremoval
      documentation: https://adapterremoval.readthedocs.io
      licence: ["GPL v3"]
input:
  - meta:
      type: map
      description: |
        Groovy Map containing sample information
        e.g. [ id:'test', single_end:false ]
  - reads:
      type: file
      description: |
        List of input FastQ files of size 1 and 2 for single-end and paired-end data,
        respectively.
      pattern: "*.{fq,fastq,fq.gz,fastq.gz}"
  - adapterlist:
      type: file
      description: Optional text file containing list of adapters to look for for removal with one adapter per line. Otherwise will look for default adapters (see AdapterRemoval man page), or can be modified to remove user-specified adapters via ext.args.
output:
  - singles_truncated:
      type: file
      description: |
        Adapter trimmed FastQ files of either single-end reads, or singleton
        'orphaned' reads from merging of paired-end data (i.e., one of the pair
        was lost due to filtering thresholds).
      pattern: "*.truncated.fastq.gz"
  - discarded:
      type: file
      description: |
        Adapter trimmed FastQ files of reads that did not pass filtering
        thresholds.
      pattern: "*.discarded.fastq.gz"
  - paired_truncated:
      type: file
      description: |
        Adapter trimmed R{1,2} FastQ files of paired-end reads that did not merge
        with their respective R{1,2} pair due to long templates. The respective pair
        is stored in 'pair{1,2}_truncated'.
      pattern: "*.pair{1,2}.truncated.fastq.gz"
  - collapsed:
      type: file
      description: |
        Collapsed FastQ of paired-end reads that successfully merged with their
        respective R1 pair but were not trimmed.
      pattern: "*.collapsed.fastq.gz"
  - collapsed_truncated:
      type: file
      description: |
        Collapsed FastQ of paired-end reads that successfully merged with their
        respective R1 pair and were trimmed of adapter due to sufficient overlap.
      pattern: "*.collapsed.truncated.fastq.gz"
  - paired_interleaved:
      type: file
      description: |
        Write paired-end reads to a single file, interleaving mate 1 and mate 2 reads
      pattern: "*.paired.fastq.gz"
  - settings:
      type: file
      description: AdapterRemoval log file
      pattern: "*.settings"
  - versions:
      type: file
      description: File containing software versions
      pattern: "versions.yml"
authors:
  - "@maxibor"
  - "@jfy133"
maintainers:
  - "@maxibor"
  - "@jfy133"
