name: "rseqc_innerdistance"
namespace: "rseqc"
info:
  migration_info:
    git_repo: https://github.com/nf-core/rnaseq.git
    paths: [modules/nf-core/rseqc/innerdistance/main.nf]
    last_sha: 54721c6946daf6d602d7069dc127deef9cbe6b33
description: |
  Calculate inner distance between read pairs. 

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

  - name: "--refgene"
    type: file 
    required: true
    description: Reference gene model in bed format

  - name: "--sample_size"
    type: integer
    required: false
    default: 200000
    min: 1
    description: Numer of reads sampled from SAM/BAM file, default = 200000.
  
  - 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: "--lower_bound_size"
    type: integer
    required: false
    default: -250 
    description: Lower bound of inner distance (bp). This option is used for ploting histograme, default=-250.

  - name: "--upper_bound_size"
    type: integer
    required: false
    default: 250 
    description: Upper bound of inner distance (bp). This option is used for ploting histograme, default=250.

  - name: "--step_size"
    type: integer
    required: false
    default: 5 
    description: Step size (bp) of histograme. This option is used for plotting histogram, default=5.

- name: "Output"
  arguments: 
  - name: "--output_stats"
    type: file
    direction: output
    required: false
    must_exist: false
    default: $id.inner_distance.stats
    description: output file (txt) with summary statistics of inner distances of paired reads

  - name: "--output_dist"
    type: file
    direction: output
    required: false
    must_exist: false
    default: $id.inner_distance.txt
    description: output file (txt) with inner distances of all paired reads

  - name: "--output_freq"
    type: file
    direction: output
    required: false
    must_exist: false
    default: $id.inner_distance_freq.txt
    description: output file (txt) with frequencies of inner distances of all paired reads

  - name: "--output_plot"
    type: file
    direction: output
    required: false
    must_exist: false
    default: $id.inner_distance_plot.pdf
    description: output file (pdf) with histogram plot of of inner distances of all paired reads

  - name: "--output_plot_r"
    type: file
    direction: output
    required: false
    must_exist: false
    default: $id.inner_distance_plot.r
    description: output file (R) with script of histogram plot of of inner distances of all paired reads
    
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
  - path: /testData/unit_test_resources/sarscov2/test.bed12
  
engines:
- type: docker
  image: ubuntu:22.04
  setup:   
    - type: apt
      packages: [python3-pip, r-base]
    - type: python
      packages: [ RSeQC ]
runners: 
- type: executable
- type: nextflow