name: "rseqc_readduplication"
namespace: "rseqc"
info:
  migration_info:
    git_repo: https://github.com/nf-core/rnaseq.git
    paths: [modules/nf-core/rseqc/readduplication/main.nf]
    last_sha: 
description: |
  Calculate read duplication rate.

argument_groups:
- name: "Input"
  arguments: 
  - name: "--input"
    type: file 
    required: true
    description: input alignment file in BAM or SAM format

  - name: "--read_count_upper_limit"
    type: integer
    required: false
    default: 500
    description: Upper limit of reads' occurence. Only used for plotting, default = 500 (times).
    min: 1

  - name: "--map_qual"
    type: integer
    required: false
    default: 30 
    description: Minimum mapping quality (phred scaled) to determine uniquely mapped reads, default=30.
    min: 0
    
- name: "Output"
  arguments: 
  - name: "--output_duplication_rate_plot_r"
    type: file
    direction: output
    required: false
    default: $id.duplication_rate_plot.r
    description: R script for generating duplication rate plot

  - name: "--output_duplication_rate_plot"
    type: file
    direction: output
    required: false
    default: $id.duplication_rate_plot.pdf
    description: duplication rate plot (pdf)

  - name: "--output_duplication_rate_mapping"
    type: file
    direction: output
    required: false
    default: $id.duplication_rate_mapping.xls
    description: Summary of mapping-based read duplication

  - name: "--output_duplication_rate_sequence"
    type: file
    direction: output
    required: false
    default: $id.duplication_rate_sequencing.xls
    description: Summary of sequencing-based read duplication

resources:
  - type: bash_script
    path: script.sh

test_resources:
  - type: bash_script
    path: test.sh
  - path: /testData/unit_test_resources/sarscov2/test.paired_end.sorted.bam
  
engines:
- type: docker
  image: ubuntu:22.04
  setup:   
    - type: "apt"
      packages: [python3-pip, r-base]
    - type: python
      packages: [RSeQC]
runners: 
- type: executable
- type: nextflow