name: merge_quant_results
namespace: workflows
description: A sub-workflow to merge the counts obtained from salmon quant across all samples.

argument_groups:
  - name: "Input"
    arguments:
      - name: "--salmon_quant_results"
        type: file
        multiple: true
        multiple_sep: ","
      - name: "--kallisto_quant_results"
        type: file
        multiple: true
        multiple_sep: ","
      - name: "--gtf"
        type: file
      - name: "--gtf_extra_attributes"
        type: string
        default: 'gene_name'
      - name: "--gtf_group_features"
        type: string
        default: 'gene_id'
      - name: "--quant_type"
        type: string
        description: Quantification method used.
        choices: [salmon, kallisto]
        default: salmon
      - name: "--versions"
        type: file
        must_exist: false
        
  - name: "Output"
    arguments: 
      - name: "--tpm_gene"
        type: file
        direction: output
        example: gene_tpm.tsv
      - name: "--counts_gene"
        type: file
        direction: output
        example: gene_counts.tsv
      - name: "--counts_gene_length_scaled"
        type: file
        direction: output
        example: gene_counts_length_scaled.tsv
      - name: "--counts_gene_scaled"
        type: file
        direction: output
        example: gene_counts_scaled.tsv
      - name: "--tpm_transcript"
        type: file
        direction: output
        example: transcript_tpm.tsv
      - name: "--lengths_gene"
        type: file
        direction: output
        example: gene_length.tsv
      - name: "--counts_transcript"
        type: file
        direction: output
        example: transcript_counts.tsv
      - name: "--lengths_transcript"
        type: file
        direction: output
        example: transcript_length.tsv
      - name: "--quant_merged_summarizedexperiment"
        type: file
        direction: output
        example: quant_merged_summarizedexperiment

resources:
  - type: nextflow_script
    path: main.nf
    entrypoint: run_wf

dependencies: 
  - name: tx2gene
  - name: tximport
  - name: summarizedexperiment
  
runners: 
- type: executable
- type: nextflow