#
# metadata for the example astrocyte ChipSeq workflow package
#

# -----------------------------------------------------------------------------
# BASIC INFORMATION
# -----------------------------------------------------------------------------

# A unique identifier for the workflow package, text/underscores only
name: 'chipseq_analysis_bicf'
# Who wrote this?
author: 'Holly Ruess, Spencer D. Barnes, Jeremy A. Mathews, Beibei Chen and Venkat Malladi, Peng Lian, Felix Perez'
# A contact email address for questions
email: 'bicf@utsouthwestern.edu'
# A more informative title for the workflow package
title: 'BICF ChIP-seq Analysis Workflow'
# A summary of the workflow package in plain text
description: |
  This is a fully-containerized version of the workflow package for the
  BioHPC/BICF ChIP-seq workflow system. It implements the ChIP-seq analysis
  workflow and visualization application.

# The minimum Astrocyte version that requires to run this workflow. For old pipelines, which do not have this label
# a default value of 0.3.1 will be assigned automatically. A request of minimum version less than 0.4.0 will be ignored.
minimum_astrocyte_version: '2.0.1'
# The Nextflow version that requires to run this workflow.  For old pipelines, which do not have this label
# a default value of 0.31.0 will be assigned automatically. Please make sure the requested nextflow version is available
# in the module list.
# nextflow_version: '20.01.0'
# (Optional) The Nextflow config file to use for this workflow. If provided, the file should exist in workflow/configs
nextflow_config: 'biohpc.config'
# The container to use for this workflow, none/singularity. If omitted, the default value 'none' will be used.
container: 'singularity'
# The version of singularity to use. This is required if container == 'singularity'
singularity_version: '3.9.9'

# -----------------------------------------------------------------------------
# DOCUMENTATION
# -----------------------------------------------------------------------------

# A list of documentation file in .md format that should be viewable from the
# web interface. These files are in the 'docs' subdirectory. The first file
# listed will be used as a documentation index and is index.md by convention
documentation_files:
  - 'index.md'

# -----------------------------------------------------------------------------
# NEXTFLOW WORKFLOW CONFIGURATION
# -----------------------------------------------------------------------------

# Remember - The workflow file is always named 'workflow/main.nf'
#            The workflow must publish all final output into $baseDir

# A list of cluster environment modules that this workflow requires to run.
# Specify versioned module names to ensure reproducability.
workflow_modules:
  - None

# A list of container images requires to run this workflow.
# Specify full path and version names to ensure reproducibility.
# This keyword is required when 'container' is specified in Astrocyte 0.4.1 and above.
# Singularity supports different registries, please specify the protocol to use.
# Such as, "docker://", "shub://", "library://", etc. We encourage you to use the GitLab
# container registry of BioHPC to save and manage your container images.
workflow_containers:
  - docker://git.biohpc.swmed.edu:5050/s219741/chipseq-analysis-containerized/r:3.3.2
  - docker://git.biohpc.swmed.edu:5050/s219741/chipseq-analysis-containerized/python:3.6.1
  - docker://git.biohpc.swmed.edu:5050/s219741/chipseq-analysis-containerized/chipseq:1.0.0
  - docker://git.biohpc.swmed.edu:5050/s219741/chipseq-analysis-containerized/motif-search:1.0.1

# A list of parameters used by the workflow, defining how to present them,
# options etc in the web interface. For each parameter:
#
# REQUIRED INFORMATION
#  id:         The name of the parameter in the NEXTFLOW workflow
#  type:       The type of the parameter, one of:
#                string    - A free-format string
#                integer   - An integer
#                real      - A real number
#                file      - A single file from user data
#                files     - One or more files from user data
#                select    - A selection from a list of values
#  required:    true/false, must the parameter be entered/chosen?
#  description: A user friendly description of the meaning of the parameter
#
# OPTIONAL INFORMATION
#  default:   A default value for the parameter (optional)
#  min:       Minium value/characters/files for number/string/files types
#  max:       Maxumum value/characters/files for number/string/files types
#  regex:     A regular expression that describes valid entries / filenames
#
# SELECT TYPE
#  choices:   A set of choices presented to the user for the parameter.
#             Each choice is a pair of value and description, e.g.
#
#             choices:
#               - [ 'myval', 'The first option']
#               - [ 'myval', 'The second option']
#
# NOTE - All parameters are passed to NEXTFLOW as strings... but they
#        are validated by astrocyte using the information provided above

workflow_parameters:

  - id: reads
    type: files
    required: true
    description: |
      One or more input FASTQ files from a ChIP-seq expereiment and a design
      file with the link bewetwen the same file name and sample id
    regex: ".*(fastq|fq)*gz"
    min: 2

  - id: pairedEnd
    type: select
    required: true
    choices:
      - [ 'true', 'true']
      - [ 'false', 'false']
    description: |
      If Paired-end: True, if Single-end: False.

  - id: designFile
    type: file
    required: true
    description: |
      A design file listing sample id, fastq files, corresponding control id
      and additional information about the sample.
    regex: ".*txt"

  - id: genome
    type: select
    required: true
    choices:
      - [ 'GRCh38', 'Human GRCh38']
      - [ 'GRCh37', 'Human GRCh37']
      - [ 'GRCm38', 'Mouse GRCm38']
    description: |
      Reference species and genome used for alignment and subsequent analysis.

  - id: skipDiff
    type: select
    required: true
    choices:
      - [ 'true', 'true']
      - [ 'false', 'false']
    description: |
      Skip differential peak analysis

  - id: skipMotif
    type: select
    required: true
    choices:
      - [ 'true', 'true']
      - [ 'false', 'false']
    description: |
      Skip motif calling

  - id: skipPlotProfile
    type: select
    required: true
    choices:
      - [ 'true', 'true']
      - [ 'false', 'false']
    description: |
      Skip Plot Profile Analysis

  - id: astrocyte
    type: select
    choices:
      - [ 'true', 'true' ]
    required: true
    default: 'true'
    description: |
      Ensure configuraton for astrocyte.


# -----------------------------------------------------------------------------
# SHINY APP CONFIGURATION
# -----------------------------------------------------------------------------

# Remember - The vizapp is always 'vizapp/server.R' 'vizapp/ui.R'
#            The workflow must publish all final output into $baseDir

# Name of the R module that the vizapp will run against
vizapp_r_module: 'R/3.4.1-gccmkl'

# List of any CRAN packages, not provided by the modules, that must be made
# available to the vizapp
vizapp_cran_packages:
  - shiny
  - shinyFiles

# List of any Bioconductor packages, not provided by the modules,
# that must be made available to the vizapp
vizapp_bioc_packages: []
