name: "multiqc"
description: |
  MultiQC aggregates results from bioinformatics analyses across many samples into a single report.
  It searches a given directory for analysis logs and compiles a HTML report. It's a general use tool, perfect for summarising the output from numerous bioinformatics tools.
info:
  keywords: [QC, html report, aggregate analysis]
  links:
    homepage: https://multiqc.info/
    documentation: https://multiqc.info/docs/
    repository: https://github.com/MultiQC/MultiQC
  references:
    doi: 10.1093/bioinformatics/btw354
  licence: GPL v3 or later
authors:
  - __merge__: /src/_authors/dorien_roosen.yaml
    roles: [ author, maintainer ]
argument_groups:
  - name: "Input"
    arguments:
      - name: "--input"
        type: file
        multiple: true
        required: true
        example: data/results/
        description: |
          File paths to be searched for analysis results to be included in the report.

  - name: "Ouput"
    arguments:
      - name: "--output_report"
        type: file
        direction: output
        must_exist: false
        example: multiqc_report.html
        description: |
          Filepath of the generated report.
      - name: "--output_data"
        type: file
        required: false
        direction: output
        example: multiqc_data
        must_exist: false
        description: |
          Output directory for parsed data files. If not provided, parsed data will not be published.
      - name: "--output_plots"
        type: file
        required: false
        direction: output
        must_exist: false
        example: multiqc_plots
        description: |
          Output directory for generated plots. If not provided, plots will not be published.

  - name: "Modules and analyses to run"
    arguments:
      - name: "--include_modules"
        type: string
        multiple: true
        example: [fastqc, cutadapt]
        description: Use only these module
      - name: "--exclude_modules"
        type: string
        multiple: true
        example: [fastqc, cutadapt]
        description: Do not use only these modules
      - name: "--ignore_analysis"
        type: string
        multiple: true
        example: [run_one/*, run_two/*]
      - name: "--ignore_samples"
        type: string
        multiple: true
        example: [sample_1*, sample_3*]
      - name: "--ignore_symlinks"
        type: boolean_true
        description: Ignore symlinked directories and files

  - name: "Sample name handling"
    arguments:
      - name: "--dirs"
        type: boolean_true
        description: Prepend directory to sample names to avoid clashing filenames
      - name: "--dirs_depth"
        type: integer
        description: Prepend n directories to sample names. Negative number to take from start of path.
      - name: "--full_names"
        type: boolean_true
        description: Do not clean the sample names (leave as full file name)
      - name: "--fn_as_s_name"
        type: boolean_true
        description: Use the log filename as the sample name
      - name: "--replace_names"
        type: file
        example: replace_names.tsv
        description: TSV file to rename sample names during report generation

  - name: "Report Customisation"
    arguments:
      - name: "--title"
        type: string
        description: |
          Report title. Printed as page header, used for filename if not otherwise specified.
      - name: "--comment"
        type: string
        description: |
          Custom comment, will be printed at the top of the report.
      - name: "--template"
        type: string
        choices: [default, gathered, geo, highcharts, sections, simple]
        description: |
          Report template to use.
      - name: "--sample_names"
        type: file
        description: |
          TSV file containing alternative sample names for renaming buttons in the report.
        example: sample_names.tsv
      - name: "--sample_filters"
        type: file
        description: |
          TSV file containing show/hide patterns for the report
        example: sample_filters.tsv
      - name: "--custom_css_file"
        type: file
        description: |
          Custom CSS file to add to the final report
        example: custom_style_sheet.css
      - name: "--profile_runtime"
        type: boolean_true
        description: |
          Add analysis of how long MultiQC takes to run to the report

  - name: "MultiQC behaviour"
    arguments:
      - name: "--verbose"
        type: boolean_true
        description: |
          Increase output verbosity.
      - name: "--quiet"
        type: boolean_true
        description: |
          Only show log warnings
      - name: "--strict"
        type: boolean_true
        description: |
          Don't catch exceptions, run additional code checks to help development.
      - name: "--development"
        type: boolean_true
        description: |
          Development mode. Do not compress and minimise JS, export uncompressed plot data.
      - name: "--require_logs"
        type: boolean_true
        description: |
          Require all explicitly requested modules to have log files. If not, MultiQC will exit with an error.
      - name: "--no_megaqc_upload"
        type: boolean_true
        description: |
          Don't upload generated report to MegaQC, even if MegaQC options are found.
      - name: "--no_ansi"
        type: boolean_true
        description: |
          Disable coloured log output.
      - name: "--cl_config"
        type: string
        required: false
        description: |
          YAML formatted string that allows to customize MultiQC behaviour like input file detection.
        example: "qualimap_config: { general_stats_coverage: [20,40,200] }"

  - name: "Output format"
    arguments:
      - name: "--flat"
        type: boolean_true
        description: |
          Use only flat plots (static images).
      - name: "--interactive"
        type: boolean_true
        description: |
          Use only interactive plots (in-browser Javascript).
      - name: "--data_dir"
        type: boolean_true
        description: |
          Force the parsed data directory to be created.
      - name: "--no_data_dir"
        type: boolean_true
        description: |
          Prevent the parsed data directory from being created.
      - name: "--zip_data_dir"
        type: boolean_true
        description: |
          Compress the data directory.
      - name: "--data_format"
        type: string
        choices: [tsv, csv, json, yaml]
        description: |
          Output parsed data in a different format than the default 'txt'.
      - name: "--pdf"
        type: boolean_true
        description: |
          Creates PDF report with the 'simple' template. Requires Pandoc to be installed.

resources:
  - type: bash_script
    path: script.sh

test_resources:
  - type: bash_script
    path: test.sh
  - type: file
    path: test_data

engines:
  - type: docker
    image: quay.io/biocontainers/multiqc:1.21--pyhdfd78af_0
    setup:
      - type: docker
        run: |
          multiqc --version | sed 's/multiqc, version\s\(.*\)/multiqc: "\1"/' > /var/software_versions.txt
    test_setup:
      - type: apt
        packages:
          - jq

runners:
  - type: executable
  - type: nextflow


