Commit 179234e6 authored by David Trudgian's avatar David Trudgian

Initial Commit

parents
workflow/work
workflow/*.html
workflow/*.csv
2016-03-04
----------
Initial Version.
Copyright © 2016. The University of Texas Southwestern Medical Center
5323 Harry Hines Boulevard Dallas, Texas, 75390 Telephone 214-648-3111
\ No newline at end of file
# Minimal Workflow Package
This is a minimal test workflow package that astrocyte tests can run against.
It does not require any cluster module software.
#
# metadata for the example astrocyte ChipSeq workflow package
#
# -----------------------------------------------------------------------------
# BASIC INFORMATION
# -----------------------------------------------------------------------------
# A unique identifier for the workflow package, text/underscores only
name: 'minimal_workflow_package'
# Who wrote this?
author: 'David Trudgian'
# A contact email address for questions
email: 'biohpc-help@utsouthwestern.edu'
# A more informative title for the workflow package
title: 'Minimal Test Workflow'
# A summary of the workflow package in plain text
description: |
This is a minimal test workflow package that astrocyte tests can run against.
# -----------------------------------------------------------------------------
# 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.f'
# The workflow must publish all final output into $baseDir
# A list of clueter environment modules that this workflow requires to run.
# Specify versioned module names to ensure reproducability.
workflow_modules:
- Test
# 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: story
type: files
required: true
description: |
A text file containing a story
regex: ".*(txt)"
min: 1
# -----------------------------------------------------------------------------
# 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:
- chipseq
# Minimal Workflow Package
This is a minimal test workflow package that astrocyte tests can run against.
It does not require any cluster module software.
This diff is collapsed.
# This example implements a simple file browser for accessing results.
library(shiny)
library(shinyFiles)
# Results are available in the directory specified by the outputDir environment
# variable, red by Sys.getenv
rootdir <- Sys.getenv('outputDir')
shinyServer(function(input, output, session) {
# The backend for a simple file chooser, restricted to the
# rootdir we obtained above.
# See https://github.com/thomasp85/shinyFiles
shinyFileChoose(input, 'files', roots=c('output'=rootdir), filetypes=c(''
,'txt'), session=session)
})
library(shiny)
library(shinyFiles)
shinyUI(fluidPage(
verticalLayout(
# Application title
titlePanel("Astrocyte Example"),
wellPanel(
helpText("This is a minimal example, demonstrating how
a Shiny visualization application can access the output of a workflow.
Here we provide a file browser using the shinyFiles package. Real
Astrocyte vizapps would provide custom methods to access and visualize
output."),
helpText("The workflow output is in the directory set in the
outputDir environment variable. this can be retrieved in R with the
command Sys.getenv('outputDir')"),
# A simple file browser within the workflow output directory
# See https://github.com/thomasp85/shinyFiles
shinyFilesButton('files', label='Browse workflow output', title='Please select a file', multiple=FALSE)
)
)
))
\ No newline at end of file
work
output/*.txt
.nextflow*
timeline.html*
trace.txt*
/*
* Copyright (c) 2016. The University of Texas Southwestern Medical Center
*
* This file is part of the BioHPC Workflow Platform
*
* This is a minimal test workflow package that astrocyte tests can run against.
*
* @authors
* David Trudgian <David.Trudgian@UTSouthwestern.edu>
*
*/
// Path to an input file, or a pattern for multiple inputs
// Note - $baseDir is the location of this workflow file main.nf
params.story = "$baseDir/../test_data/mobydick.txt"
stories = Channel.fromPath(params.story)
process uppercase {
cpus 1
input:
file story from stories
output:
file "${story.name}.uppercase" into uppercased
"""
cat "$story" | tr "[A-Z]" "[a-z]" > "${story.name}.uppercase"
"""
}
process tolines {
cpus 1
input:
file uppercase from uppercased
output:
file "${uppercase.name}.tolines" into tolines
"""
cat "$uppercase" | tr -cs "a-z'" "\012" > "${uppercase.name}.tolines"
"""
}
process wordcounts {
// Publish the outputs we create here into the workflow output directory
publishDir "$baseDir/output", mode: 'copy'
input:
file wordlines from tolines
output:
file "${wordlines.name}.wordcount"
"""
cat "$wordlines" | sort | uniq -c | sort -n -r > "${wordlines.name}.wordcount"
"""
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment