aboutsummaryrefslogtreecommitdiff
path: root/slides.tex
blob: 3b0016f8eb8a04f4086bb3b908afe9c5073ce21c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
\documentclass[aspectratio=169]{beamer}

\usepackage{microtype}
\usepackage{tikz}
\usetikzlibrary{fit}
\usepackage[style=verbose-ibid,url=false,natbib=true]{biblatex}
\addbibresource{references.bib}
\renewcommand*{\footnotesize}{\Tiny}
\setlength{\footnotesep}{3pt}

\definecolor{bngreen}{HTML}{3c8e64}
\definecolor{bnorange}{HTML}{e08919}
%\setbeamercolor*{structure}{bg=white,fg=bngreen}
\usecolortheme[named=bngreen]{structure}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{headline}{\hfill\includegraphics[width=.7cm]{logo-running}\hspace{0.1cm}\vspace{-.7cm}}

\author{Justin Bed\H{o}\\WEHI}
\title{\includegraphics[width=.7\linewidth]{logo}\\functional, reproducible bioinformatics workflows}
\date{November 10, 2020}

\begin{document}

{
  \setbeamertemplate{headline}{}
  \begin{frame}
    \maketitle
  \end{frame}
}

\begin{frame}
  \frametitle{Core problems}
  \begin{enumerate}
    \item \emph{Managing software versions and dependencies}.
      \begin{itemize}
        \item Conda
        \item BioConda~\autocite{Grning2018}
        \item apt-get
      \end{itemize}

    \item \emph{Managing computational environments}.
      \begin{itemize}
        \item Docker
        \item Singularity
        \item \emph{virtual machines}
      \end{itemize}

    \item \emph{Managing workflows}.
      \begin{itemize}
        \item Toil~\autocite{toil}
        \item SnakeMake~\autocite{Koster2012}
        \item NextFlow~\autocite{di_tommaso_nextflow_2017}
      \end{itemize}
  \end{enumerate}
\end{frame}

\begin{frame}[label=dag]
  \begin{center}
    \begin{tikzpicture}[->,>=stealth,shorten >=1pt,auto,node distance=2cm,thick]
      \node (a) {align};
      \node (s) [below of=a] {sort};
      \node (c) [below of=s] {calling};

      \path (a) edge node {} (s);
      \path (s) edge node {} (c);

      \pause

      \node (input) [above of=a] {input};
      \path (input) edge node {} (a);
      \node (ref) [right of=a] {reference};
      \path (ref) edge node {} (a);
      \node (db) [right of=c] {dbNSFP};
      \path (db) edge node {} (c);

      \pause

      \node (bwa) [left of=a] {BWA};
      \path (bwa) edge node {} (a);
      \node (samtools) [left of=s] {samtools};
      \path (samtools) edge node {} (s);
      \node (platypus) [left of=c] {platypus};
      \path (platypus) edge node {} (c);

      \pause

      \node (glib) [left of=samtools] {glibc,$\cdots$};
      \node (python) [left of=platypus] {python};
      \path (glib) edge node {} (bwa);
      \path (glib) edge node {} (samtools);
      \path (python) edge node {} (platypus);
      \path (glib) edge node {} (python);

      \pause

      \node[draw=bngreen, fit=(bwa) (samtools) (platypus) (glib) (python),label=containers](cont){};
      \node[draw=bnorange, fit=(ref) (db),label=tarball](tar){};
    \end{tikzpicture}
  \end{center}
\end{frame}

\begin{frame}
  \frametitle{Containers do not solve reproducibility}
  \begin{minipage}{.2\textwidth}
    \includegraphics[height=.9\textheight]{docker}
  \end{minipage}
  \begin{minipage}{.78\textwidth}
    \begin{enumerate}
      \item Shifts the problem
      \item Containers provide isolated distributable computational environments
      \item Overkill for reproducible bioinformatics: e.g., don't need virtualised networking (or even networks at all!)
    \end{enumerate}
  \end{minipage}
\end{frame}

\againframe<4>{dag}

\begin{frame}
  \frametitle{BioNix contributions}
  \begin{enumerate}
    \item Builds on Nix, a robust functional package manager
    \item Manages both software, data, and workflows within the one system
    \item Implicitly specifies its entire computational environment
    \item Purely functional domain-specific language, simplifying specifying workflows
      to function composition
    \item Typing to reduce errors~\autocite{Bed2019}
  \end{enumerate}
\end{frame}  

\begin{frame}
  \frametitle{What is Nix?}
  \begin{enumerate}
    \item Simple configuration language (like JSON + functions)
    \item Build engine that \emph{realises} \emph{derivations}
      \begin{itemize}
        \item resumption
        \item error handling
        \item logging
        \item parallelisation
      \end{itemize}
    \item Derivations are complete descriptions for producing build products: all inputs and a build recipe
    \item Controlled \emph{side effects}\footnote{stuff not captured by the derivation}: none allowed during a build
    \item Output location unique and determined by hashing the derivation: i.e., hash based version management
  \end{enumerate}
\end{frame}

\begin{frame}
  \frametitle{What is BioNix?}
  \begin{enumerate}
    \item Thin wrapper on Nix
    \item Models \emph{stages}\footnote{the execution of one or more executables on one or more input files, producing one or more output files.} as functions (\texttt{config → inputs → drv})
    \item Library of bioinformatics tools (BWA, samtools, etc)
  \end{enumerate}
\end{frame}

\begin{frame}
  \frametitle{Example}
  \begin{minipage}{.4\textwidth}
  \includegraphics[width=.8\linewidth]{graph}
  \end{minipage}
  \begin{minipage}{.55\textwidth}
  \begin{overprint}
  \onslide<1>\includegraphics[width=\linewidth]{pipeline}
  \onslide<2>\includegraphics[width=.75\linewidth]{bwa-stage}
  \onslide<3>\includegraphics[width=\linewidth]{bwa-drv}
  \end{overprint}
  \end{minipage}
\end{frame}

\begin{frame}
  \frametitle{Demo}
  \pause
  \includegraphics[width=\linewidth]{demo-graph}
\end{frame}

\begin{frame}
  \frametitle{Real-world usage at WEHI}
  \begin{enumerate}
    \item Stafford Fox Rare Cancer Project
    \item $\geq100$ WGS/WES samples totalling 20 TiB of primary data
    \item SNV calling, neoantigen prediction, structural variants, copy number, mutational signatures, and report generation
    \item CI ensures reports are always up to date and consistent across the cohort
  \end{enumerate}
\end{frame}

\begin{frame}
  \frametitle{Acknowledgements}
  \begin{minipage}{0.32\linewidth}
  \begin{itemize}
  \item Leon Di Stefano
  \item Tony Papenfuss
  \end{itemize}
  \end{minipage}
  \begin{minipage}{0.32\linewidth}
  \begin{block}{Papenfuss Lab}
    \begin{itemize}
      \item Alan Rubin
      \item Jocelyn Penington
      \item Ramyar Molania
    \end{itemize}
  \end{block}
  \end{minipage}
  \begin{minipage}{0.32\linewidth}
  \begin{block}{Stafford Fox Rare Cancer Team}
  \end{block}
  \end{minipage}
\end{frame}

\end{document}