Contents

Introduction

This tutorials originates from 2016 Cancer Genomics Cloud Hackathon R workshop I prepared, and it’s recommended for beginner to read and run through all examples here yourself in your R IDE like Rstudio. Then try to make your own app.

In this tutorial, you will learn

  1. API client in R with sevenbridges R package to fully automate analysis
  2. Describe command line interface with docopt R package
  3. Make your own docker app
  4. Describe a standard RNA-seq Bioconductor workflow in CWL with pre-defined report template
  5. Execute it in the cloud
  6. Reporting tool to generate as many R markdown report or Shiny apps report as you want
  7. Deploy directly on shiny server like shinyapps.io from a “report” tool

Prerequisites

This tutorial doesn’t require you to be an advanced R user, everything you need is R or even better, a cool IDE like Rstudio (or Emacs+ESS), then just open this Rmarkdown in Rstudio. It’s easy to learn!

Suggest learning for all users: docker.

Now we are ready to go!

Installation

First download the R markdown file of this page, so you can load it to yoru Rstudio or your favorite IDE to run through all examples and tweak setup.

This package sevenbridges is already on Bioconductor devel branch, the release day is going to be May 4th, 2016. Please check the detailed release schedule. It’s also synced on github page

For now I recommend you to install the latest version of ‘sevenbridges’ from github directly by running the script:

if(!require("devtools", quietly = TRUE)){
    install.packages("devtools") 
}
source("http://bioconductor.org/biocLite.R")
library(devtools)
install_github("sbg/sevenbridges-r", build_vignettes=TRUE, 
  repos=BiocInstaller::biocinstallRepos(),
  dependencies=TRUE)

After the installation you can always browser vignette

browseVignettes(package = 'sevenbridges')

Register on NCI Cancer Genomics Cloud

cgc-home

You can find login/registration on NCI Cancer Genomics Cloud homepage http://www.cancergenomicscloud.org/, follow up the signup tutorial if you have ERA Commons.

Get your authentifiation

After you login, you can get your authentication under your account setting and ‘developer’ tab ([tutorial])(http://docs.cancergenomicscloud.org/docs/get-your-authentication-token)

(optional) register on shinyapps.io

In this tutorial, if you want to try to deploy the application automatically on shiny server like shinyapps.io, please visit http://www.shinyapps.io/ register and login.

Get you token and secret ready to deploy

shiny-token-open

Issues report

This package is under active development, will bring many new features as well, at any moment, if you have questions or problem about this R package, please file issue on github issue page here

If you have question about the cancer genomics cloud platform or other seven bridges platform, we have a different channel for each platform, for example, cancer genomics cloud have lots documentation and a forum

Please, feedback is always welcomed!

Quickstart

The final goal is make a workflow that

  1. Input gene feature, design matrix, bam files, and generate differential expression report and output full report, a picture and a count table as example.
  2. Add report tool with two Shiny app template and two R markdown template to collect files from previous flow and generate new report, even deploy on shinyapps.io automatically after a task is finished.

The final workflow looks like this, it’s composed of two tools: RNA-seq analysis tool and reporting tool.

quickstart-flow

The shiny app report with ggvis module on the shinyapps.io server looks like this

A ggvis interactive scatter plot

Imgur

A differential expression table

Imgur

A full html report included, it’s also output from the first tool, in this way, you can orchestrate many tools output into single report for your task.

Imgur