name: qualimap_rnaseq
namespace: qualimap
keywords: [RNA-seq, quality control, QC Report]
description: |
  Qualimap RNA-seq QC reports quality control metrics and bias estimations 
  which are specific for whole transcriptome sequencing, including reads genomic 
  origin, junction analysis, transcript coverage and 5’-3’ bias computation.
links:
  homepage: http://qualimap.conesalab.org/
  documentation: http://qualimap.conesalab.org/doc_html/analysis.html#rna-seq-qc
  issue_tracker: https://bitbucket.org/kokonech/qualimap/issues?status=new&status=open
  repository: https://bitbucket.org/kokonech/qualimap/commits/branch/master
references:
  doi: 10.1093/bioinformatics/btv566
license: GPL-2.0
authors:
  - __merge__: /src/_authors/dorien_roosen.yaml
    roles: [ author, maintainer ]
argument_groups:
  - name: "Input"
    arguments: 
    - name: "--bam"
      type: file
      required: true
      example: alignment.bam
      description: Path to the sequence alignment file in BAM format, produced by a splicing-aware aligner.
    - name: "--gtf"
      type: file
      required: true
      example: annotations.gtf
      description: Path to genomic annotations in Ensembl GTF format.

  - name: "Output"
    arguments: 
    - name: "--qc_results"
      direction: output
      type: file
      required: true
      example: rnaseq_qc_results.txt
      description: Text file containing the RNAseq QC results.
    - name: "--counts"
      type: file
      required: false
      direction: output
      description: Output file for computed counts.
    - name: "--report"
      type: file
      direction: output
      required: false
      example: report.html
      description: Report output file. Supported formats are PDF or HTML.

  - name: "Optional"
    arguments: 
    - name: "--num_pr_bases"
      type: integer
      required: false
      min: 1
      description: Number of upstream/downstream nucleotide bases to compute 5'-3' bias (default = 100).
    - name: "--num_tr_bias"
      type: integer
      required: false
      min: 1
      description: Number of top highly expressed transcripts to compute 5'-3' bias (default = 1000).
    - name: "--algorithm"
      type: string
      required: false
      choices: ["uniquely-mapped-reads", "proportional"]
      description: Counting algorithm (uniquely-mapped-reads (default) or proportional).
    - name: "--sequencing_protocol"
      type: string
      required: false
      choices: ["non-strand-specific", "strand-specific-reverse", "strand-specific-forward"]
      description: Sequencing library protocol (strand-specific-forward, strand-specific-reverse or non-strand-specific (default)).
    - name: "--paired"
      type: boolean_true
      description: Setting this flag for paired-end experiments will result in counting fragments instead of reads.
    - name: "--sorted"
      type: boolean_true
      description: Setting this flag indicates that the input file is already sorted by name. If flag is not set, additional sorting by name will be performed. Only requiredfor paired-end analysis.
    - name: "--java_memory_size"
      type: string
      required: false
      description: maximum Java heap memory size, default = 4G.

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

engines:
  - type: docker
    image: quay.io/biocontainers/qualimap:2.3--hdfd78af_0
    setup:   
      - type: docker
        run: |
          echo QualiMap: $(qualimap 2>&1 | grep QualiMap | sed 's/^.*QualiMap//') > /var/software_versions.txt
runners: 
  - type: executable
  - type: nextflow
