#+title: Validated, scalable, community developed variant calling
#+author: Brad Chapman \\ Bioinformatics Core, Harvard Chan School \\ https://github.com/chapmanb/bcbio-nextgen \\ http://bcb.io \\ http://j.mp/bcbiolinks
#+date: 1 April 2015

#+OPTIONS: toc:nil H:2

#+startup: beamer
#+LaTeX_CLASS: beamer
#+latex_header: \usepackage{url}
#+latex_header: \usepackage{hyperref}
#+latex_header: \hypersetup{colorlinks=true}
#+BEAMER_THEME: default
#+BEAMER_COLOR_THEME: seahorse
#+BEAMER_INNER_THEME: rectangles

* intro

** Acknowledgments

\Large
- Harvard Chan School Bioinformatics Core
  \normalsize http://hsphbio.ghost.io/
- \Large Rudy Tanzi Lab -- whole genome scaling
- Harvard FAS Research Computing -- infrastructure
- Biogen and Intel -- cloud integration
- Wolfson Wohl Cancer Research Centre
- AstraZeneca -- cancer variant calling \\
  \normalsize https://www.linkedin.com/jobs2/view/40026565

* Variant calling overview

** Human whole genome sequencing

[[./images5/human_genome.png]]

\footnotesize
http://ensembl.org/Homo_sapiens/Location/Genome
\normalsize

** High throughput sequencing

[[./images5/reads.png]]

** Variant calling

[[./images5/SNV_calling.png]]

\footnotesize
http://en.wikipedia.org/wiki/SNV_calling_from_NGS_data
\normalsize

** Scale: exome to whole genome

[[./images5/exome_proportion.png]]

\footnotesize
https://www.flickr.com/photos/119980645@N06/
\normalsize

* bcbio overview

** Summary

\Large
- Overview of bcbio
- Community development
- Validation
- Docker and Amazon Web Services

** White box software

[[./images5/clear_box.jpg]]

** Overview

#+ATTR_LATEX: :width 1.0\textwidth
[[./images3/bcbio_nextgen_highlevel.png]]

\vspace{1cm}
https://github.com/chapmanb/bcbio-nextgen

** Uses

\Large
- Aligners: bwa-mem, novoalign, bowtie2
- Variantion: FreeBayes, GATK, VarDict, MuTecT, Scalpel, SnpEff, VEP, GEMINI,
  Lumpy, Delly, CNVkit
- RNA-seq: Tophat, STAR, cufflinks, HTSeq
- Quality control: fastqc, bamtools, RNA-SeQC
- Manipulation: bedtools, bcftools, biobambam, sambamba, samblaster, samtools,
  vcflib, vt
\normalsize

** Provides

\Large
- Community -- collected set of expertise
- Validation -- outputs + automated evaluation
- Scaling
- Ready to run parallel processing on AWS
- Local installation of tools and data
\normalsize

* Community

** Complex, rapidly changing baseline functionality

[[./images2/gatk_changes.png]]

** Quality differences between methods

#+ATTR_LATEX: :width .7\textwidth
[[./images/gcat_comparison.png]]

[[http://www.bioplanet.com/gcat]]

** Benefits of improved filtering

#+BEGIN_CENTER
#+ATTR_LATEX: :width 0.8\textwidth
[[./images7/freebayes_improve-syn3-tumor.png]]
#+END_CENTER

http://j.mp/cancervalpre

** Solution

#+BEGIN_CENTER
#+ATTR_LATEX: :width .5\textwidth
[[./images/community.png]]
#+END_CENTER

\scriptsize
[[http://www.amazon.com/Community-Structure-Belonging-Peter-Block/dp/1605092770]]
\normalsize

** Community: contribution

[[./images5/bcbio_github.png]]

[[https://github.com/chapmanb/bcbio-nextgen]]

** Community

#+BEGIN_CENTER
#+ATTR_LATEX: :width 0.75\textwidth
[[./images7/bcbio_contributors.png]]
#+END_CENTER

* Variant quality

** Validation

\Large
Tests for implementation and methods

- Family/population calling
- Structural variations
- Cancer tumor/normal
\normalsize

** Reference materials

#+BEGIN_CENTER
#+ATTR_LATEX: :width .5\textwidth
[[./images/giab.png]]

#+ATTR_LATEX: :width .7\textwidth
[[./images7/ga4gh.png]]

#+ATTR_LATEX: :width .9\textwidth
[[./images7/dream_challenge.png]]

[[http://www.genomeinabottle.org/]]
http://ga4gh.org/#/benchmarking-team
https://www.synapse.org/#!Synapse:syn312572
#+END_CENTER

** Validate and compare caller performance

#+BEGIN_CENTER
#+ATTR_LATEX: :width 1.0\textwidth
[[./images7/cancer_validate.png]]
#+END_CENTER

http://bcb.io/2015/03/05/cancerval/

** Validation enables scaling

\Large
- Little value in realignment when using haplotype aware caller
- Little value in recalibration when using high quality reads
- Streaming de-duplication approaches provide same quality without disk IO

\vspace{1.0cm}
[[http://j.mp/bcbioeval2]]
\normalsize

* AWS + Docker

** Making bcbio easy to use

#+ATTR_LATEX: :width 0.65\textwidth
[[./images2/install_want.png]]

*** Automated Install                                                 :block:
    :PROPERTIES:
    :BEAMER_env: exampleblock
    :END:

We made it easy to install a large number of biological tools. \\
Good or bad idea?

** Need a consistent support environment

[[./images4/install_issues.png]]

** Docker lightweight containers

#+BEGIN_CENTER
#+ATTR_LATEX: :width .6\textwidth
[[./images/homepage-docker-logo.png]]
#+END_CENTER

http://docker.com

** Docker benefits

\Large
- Fully isolated
- Reproducible -- store full environment with analysis (1Gb)
- Improved installation -- single download + data

** bcbio + Docker + AWS

\Large
- Bootstrap from plain AMIs to cluster
- Pull/push data from S3
- Easy interface to start/stop clusters
- Lustre and encrypted NFS filesystems
- SLURM scheduler managed with Elasticluster

\vspace{0.5cm}
http://bcb.io/2014/12/19/awsbench/

** AWS benchmarking

|                           | AWS (Lustre) |
|---------------------------+--------------+
| Total                     |         4:42 |
|---------------------------+--------------+
| genome data preparation   |         0:04 |
| alignment preparation     |         0:12 |
| alignment                 |         0:29 |
| callable regions          |         0:44 |
| alignment post-processing |         0:13 |
| variant calling           |         2:35 |
| variant post-processing   |         0:05 |
| prepped BAM merging       |         0:03 |
| validation                |         0:05 |

100X cancer tumor/normal exome on 64 cores (2 c3.8xlarge)

** Resource usage plots

#+BEGIN_CENTER
#+ATTR_LATEX: :width 0.8\textwidth
[[./images7/benchmark_cpu_plot.png]]
#+END_CENTER

#+BEGIN_CENTER
#+ATTR_LATEX: :width 0.8\textwidth
[[./images7/benchmark_io_plot.png]]
#+END_CENTER

* Summary

** Summary

\Large
- bcbio -- quality community built variant calling and RNA-seq analyses
- Validation -- methods and scaling
- Ready to run implementation -- Docker and AWS

\vspace{0.3cm}
\Large
https://github.com/chapmanb/bcbio-nextgen
\normalsize
