name: "dupradar"
info:
  migration_info:
    git_repo: https://github.com/nf-core/rnaseq.git
    paths: [modules/local/dupradar.nf]
    last_sha: 54721c6946daf6d602d7069dc127deef9cbe6b33
description: |
  Assessment of duplication rates in RNA-Seq datasets

argument_groups:
- name: "Input"
  arguments: 
  - name: "--id"
    type: string
    description: Sample ID
    
  - name: "--input"
    type: file 
    required: true
    description: path to input alignment file in BAM format

  - name: "--gtf_annotation"
    type: file 
    required: true
    description: path to GTF annotation file.

  - name: "--paired"
    type: boolean
    description: add flag if input alignment file consists of paired reads

  - name: "--strandedness"
    type: string
    required: false
    choices: ["forward", "reverse", "unstranded"]
    description: strandedness of input bam file reads (forward, reverse or unstranded (default, applicable to paired reads))
    

- name: "Output"
  arguments: 
  - name: "--output_dupmatrix"
    type: file
    direction: output
    required: false
    must_exist: true
    default: $id.dup_matrix.txt
    description: path to output file (txt) of duplicate tag counts
  
  - name: "--output_dup_intercept_mqc"
    type: file
    direction: output
    required: false
    must_exist: true
    default: $id.dup_intercept_mqc.txt
    description: path to output file (txt) of multiqc intercept value DupRadar

  - name: "--output_duprate_exp_boxplot"
    type: file
    direction: output
    required: false
    must_exist: true
    default: $id.duprate_exp_boxplot.pdf
    description: path to output file (pdf) of distribution of expression box plot
  
  - name: "--output_duprate_exp_densplot"
    type: file
    direction: output
    required: false
    must_exist: true
    default: $id.duprate_exp_densityplot.pdf
    description: path to output file (pdf) of 2D density scatter plot of duplicate tag counts
  
  - name: "--output_duprate_exp_denscurve_mqc"
    type: file
    direction: output
    required: false
    must_exist: true
    default: $id.duprate_exp_density_curve_mqc.txt
    description: path to output file (pdf) of density curve of gene duplication multiqc
  
  - name: "--output_expression_histogram"
    type: file
    direction: output
    required: false
    must_exist: true
    default: $id.expression_hist.pdf
    description: path to output file (pdf) of distribution of RPK values per gene histogram
  
  - name: "--output_intercept_slope"
    type: file
    direction: output
    required: false
    must_exist: true
    default: $id.intercept_slope.txt
    description: output file (txt) with progression of duplication rate value 

resources:
  - type: bash_script
    path: script.sh
  # Copied from https://github.com/nf-core/rnaseq/blob/3.12.0/bin/dupradar.r
  - path: dupradar.r

test_resources:
  - type: bash_script
    path: test.sh
  - path: /testData/unit_test_resources/wgEncodeCaltechRnaSeqGm12878R1x75dAlignsRep2V2.bam
  - path: /testData/unit_test_resources/genes.gtf
  
engines:
  - type: docker
    image: ubuntu:22.04
    setup:   
      - type: apt
        packages: [ r-base ]
      - type: r
        bioc: [ dupRadar ]
runners:
  - type: executable  
  - type: nextflow
