name: deseq2_qc
info:
  migration_info:
    git_repo: https://github.com/nf-core/rnaseq.git
    paths: [modules/local/deseq2_qc.nf]
    last_sha: 92b2a7857de1dda9d1c19a088941fc81e2976ff7
description: | 
  run deseq2, perform pca, generate heatmaps and scatterplots for samples in the counts files

argument_groups: 
- name: "input"
  arguments: 
  - name: "--counts"
    type: file
    description: Count file matrix where rows are genes and columns are samples.
    required: true
  - name: "--vst"
    type: boolean
    default: false
    description: Use vst transformation instead of rlog with .DESeq2
  - name: "--count_col"
    type: integer
    default: 3
    description: First column containing sample count data.
  - name: "--id_col"
    type: integer
    default: 1
    description: Column containing identifiers to be used.
  - name: "--sample_suffix"
    type: string
    description: Suffix to remove after sample name in columns e.g. '.rmDup.bam' if 'DRUG_R1.rmDup.bam'.
    default: ""
  - name: "--outprefix"
    type: string
    default: deseq2
    description: Output prefix
  - name: "--label"
    type: string
    description: Label to used in MultiQC report
    
- name: "Output"
  arguments: 
  - name: "--outdir"
    type: file
    direction: output
    default: deseq2
  - name: "--pca_multiqc"
    type: file
    direction: output
    default: deseq2.pca.vals_mqc.tsv
  - name: "--sample_dists_multiqc"
    type: file
    direction: output
    default: deseq2.sample.dists_mqc.tsv

resources:
  # adapted from https://github.com/nf-core/rnaseq/blob/3.12.0/bin/deseq2_qc.r
  - type: r_script
    path: script.r
  # Add proper default headers as part of the component
  - path: deseq2_pca_header.txt
  - path: deseq2_clustering_header.txt

test_resources:
  - type: bash_script
    path: test.sh
  - path: /testData/unit_test_resources/counts.tsv

engines: 
  - type: docker
    image: rocker/r2u:22.04
    setup:
      - type: r
        cran: [ optparse, ggplot2, RColorBrewer, pheatmap, stringr, matrixStats ]
        bioc: [ DESeq2 ]
runners:
  - type: executable
  - type: nextflow
