name: htrnaseq
namespace: workflows
authors:
  - __merge__: /src/base/authors/dries_schaumont.yaml
    roles: [ maintainer ]
argument_groups:
  - name: Input arguments
    arguments:
      - name: --input_r1
        description: |
          Forward reads in FASTQ format. Multiple files corresponding to different lanes can be provided which will
          be demultiplexed separately before joining the results for each individual well.
        type: file
        required: true
        multiple: true
      - name: --input_r2
        description: |
          Reverse reads in FASTQ format. Multiple files corresponding to different lanes can be provided which will
          be demultiplexed separately before joining the results for each individual well.
        type: file
        required: true
        multiple: true
      - name: --barcodesFasta
        type: file
        required: true
      - name: "--umi_length"
        description: |
          Length of the UMI sequences
        type: integer
        min: 1
        default: 10
      - name: --genomeDir
        type: file
        required: true
      - name: --annotation
        type: file
        required: true
      - name: --sample_id
        type: string
        required: false
        description: |
          Sample ID for the provided input files. If not provided, the value of --id
          will be used. Input files will allways be demultiplexed separately,
          but the FASTQs for wells with matching sample IDs will be concatenated before mapping.
  - name: Output arguments
    arguments:
      - name: "--fastq_output"
        description: "Directory containing output fastq files"
        type: file
        multiple: true
        required: true
        default: "fastq/*"
        direction: output
      - name: --star_output
        description: Output from mapping with STAR
        type: file
        direction: output
        multiple: true
        required: true
        default: star.$id/*
      - name: "--nrReadsNrGenesPerChrom"
        type: file
        direction: output
        required: true
        default: "nrReadsNrGenesPerChrom.$id.txt"
      - name: "--star_qc_metrics"
        type: file
        direction: output
        required: true
        default: "starLogs.$id.txt"
      - name: "--eset"
        type: file
        direction: output
        required: true
        default: eset.$id.rds
      - name: "--f_data"
        type: file
        direction: output
        required: true
        default: fData.$id.tsv
      - name: "--p_data"
        type: file
        direction: output
        required: true
        default: pData.$id.tsv
      - name: "--html_report"
        type: file
        direction: output
        required: true
        default: report.$id.html
      - name: "--run_params"
        type: file
        direction: output
        required: false
        default: params.$id.yaml
resources:
  - type: nextflow_script
    path: main.nf
    entrypoint: run_wf
test_resources:
  - type: nextflow_script
    path: test.nf
    entrypoint: test_wf
  - type: nextflow_script
    path: test.nf
    entrypoint: test_wf2
  - type: nextflow_script
    path: test.nf
    entrypoint: test_no_events
  - type: nextflow_script
    path: test.nf
    entrypoint: test_concatenation
dependencies:
  - name: workflows/well_demultiplex
    repository: local
  - name: workflows/well_fastqs_to_esets
    repository: local
  - name: utils/save_params
    repository: local
repositories:
  - name: local
    type: local
  - name: bb
    type: vsh
    repo: biobox
    tag: v0.3.1

runners:
  - type: nextflow

engines:
  - type: native
