#
# 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: 'Beibei Chen and Venkat Malladi'
# A contact email address for questions
email: 'biohpc-help@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 workflow package for the BioHPC/BICF ChIP-seq workflow system.
  It implements ChIP-seq analysis workflow and visualization application.

# -----------------------------------------------------------------------------
# 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', 'chipseq-analysis']

# -----------------------------------------------------------------------------
# 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:
  - 'python/3.6.1-2-anaconda'
  - 'trimgalore/0.4.1'
  - 'bwa/intel/0.7.12'
  - 'sambamba/0.6.6'
  - 'bedtools/2.26.0'
  - 'deeptools/2.5.0.1'
  - 'phantompeakqualtools/1.2'
  - 'macs/2.1.0-20151222'
  - 'UCSC_userApps/v317'
  - 'R/3.4.1-gccmkl'

# 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)*"

  - id: pairedEnd
    type: select
    required: true
    choices:
      - [ 'true', 'True']
      - [ 'false', 'False']
    description: |
      In single-end sequencing, the sequencer reads a fragment from only one
      end to the other, generating the sequence of base pairs. In paired-end
      reading it starts at one read, finishes this direction at the specified
      read length, and then starts another round of reading from the opposite
      end of the fragment.

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

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


# -----------------------------------------------------------------------------
# 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.2.1-intel'

# 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:
  - qusage
#  - ballgown
vizapp_github_packages:
  - js229/Vennerable
