|
| 1 | +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2 | +\section{Selecting Curated Workflows} |
| 3 | +{ |
| 4 | + \usebackgroundtemplate{ |
| 5 | + \vbox to \paperheight{\vfil\hbox to \paperwidth{\hfil\includegraphics[height=.7\paperheight]{example_dags/rulegraph_complex.png}\hfil}\vfil} |
| 6 | + } |
| 7 | + \frame{ |
| 8 | + \frametitle{Selecting Workflows} |
| 9 | + \begin{mdframed}[tikzsetting={draw=white,fill=white,fill opacity=0.8, |
| 10 | + line width=0pt},backgroundcolor=none,leftmargin=0, |
| 11 | + rightmargin=150,innertopmargin=4pt,roundcorner=10pt] |
| 12 | + \tableofcontents[currentsection,sections={1-4},hideothersubsections] |
| 13 | + \end{mdframed} |
| 14 | + } |
| 15 | +} |
| 16 | + |
| 17 | + |
| 18 | +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 19 | +\begin{frame} |
| 20 | + \frametitle{What is this about?} |
| 21 | + \begin{question}[Questions] |
| 22 | + \begin{itemize} |
| 23 | + \item How do I get a workflow for a given scientific problem? |
| 24 | + \item How do I run such an arbitrary workflow? |
| 25 | + \end{itemize} |
| 26 | + \end{question} |
| 27 | + \begin{docs}[Objectives] |
| 28 | + \begin{enumerate} |
| 29 | + \item Introducing the workflow catalogue! |
| 30 | + \item Learning the difference between ``curation'' (what some people think) and ``curation'' (what really works). |
| 31 | + \end{enumerate} |
| 32 | + \end{docs} |
| 33 | +\end{frame} |
| 34 | + |
| 35 | +\subsection{The Snakemake Workflow Catalogue} |
| 36 | + |
| 37 | +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 38 | +\begin{frame} |
| 39 | + \frametitle{Selecting and Downloading from the Workflow Catalogue} |
| 40 | + You can find the \Snakemake{} worfkflow catalogue, \lhref{https://snakemake.github.io/snakemake-workflow-catalog/?rules=true}{here}. It makes a difference between workflows which meet best-practice criteria - and those which do not.\newline |
| 41 | + \begin{columns} |
| 42 | + \begin{column}{0.5\textwidth} |
| 43 | + You can download and run any workflow. \Snakemake's portability features ensure it will work everywhere $\ldots$\pause |
| 44 | + \begin{warning} |
| 45 | + $\ldots$ except, you most likely cannot, because of a missing cluster configuration. |
| 46 | + \end{warning} |
| 47 | + \end{column} |
| 48 | + \begin{column}{0.5\textwidth} |
| 49 | + \includegraphics[width=\textwidth]{Snakemake/Snakemake_Workflow_Catalog.png} |
| 50 | + \end{column} |
| 51 | + \end{columns} |
| 52 | +\end{frame} |
| 53 | + |
| 54 | +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 55 | +\begin{frame} |
| 56 | + \frametitle{Searching \emph{your} Workflow} |
| 57 | + \begin{columns} |
| 58 | + \begin{column}{0.5\textwidth} |
| 59 | + \includegraphics[width=\textwidth]{Snakemake/Searching_Workflows_in_Catalog.png} |
| 60 | + \end{column} |
| 61 | + \begin{column}{0.5\textwidth} |
| 62 | + You can look for |
| 63 | + \begin{itemize} |
| 64 | + \item topical keywords and |
| 65 | + \item software |
| 66 | + \end{itemize} |
| 67 | + \end{column} |
| 68 | + \end{columns} |
| 69 | +\end{frame} |
| 70 | + |
| 71 | +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 72 | +\begin{frame} |
| 73 | + \frametitle{Workflows Compliance} |
| 74 | + \begin{question}[Noted this?] |
| 75 | + \includegraphics[width=0.8\textwidth]{Snakemake/Snakemake_Workflow_Catalog_Categories.png} |
| 76 | + \end{question} |
| 77 | +\end{frame} |
| 78 | + |
| 79 | +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 80 | +\begin{frame}[fragile] |
| 81 | + \frametitle{Deployment} |
| 82 | + Select (=click on) any desired workflow. There are three alternatives: |
| 83 | + \begin{enumerate}[<+->] |
| 84 | + \item a workflow offers a release - in which case you can download and unpack it |
| 85 | + \item all workflows offers a ``\altverb{git clone}'' hint |
| 86 | + \item or you use the \altverb{snakedeploy} to get everything you need. |
| 87 | + \end{enumerate} |
| 88 | +\end{frame} |
| 89 | + |
| 90 | +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 91 | +\begin{frame}[fragile] |
| 92 | + \frametitle{Deployment II - Creating an Environment Fork} |
| 93 | + Usually, we can create an environment like: |
| 94 | + \begin{lstlisting}[language=Bash, style=Shell] |
| 95 | +$ mamba create -c conda-forge -c bioconda -n snakemake \ |
| 96 | +> snakemake snakemake-executor-plugin-slurm \ |
| 97 | +> snakemake-storage-plugin-fs |
| 98 | + \end{lstlisting} |
| 99 | + This should install a \Snakemake{} environment with all necessary tools! |
| 100 | +\end{frame} |
| 101 | + |
| 102 | +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 103 | +\begin{frame}[fragile] |
| 104 | + \frametitle{Deployment III - First Step!} |
| 105 | + Follow step 2 of a selected workflow usage instructions: |
| 106 | + \begin{columns} |
| 107 | + \begin{column}{0.4\textwidth} |
| 108 | + \centering |
| 109 | + \includegraphics[width=0.95\textwidth]{Snakemake/deploy_workflow} |
| 110 | + \end{column} |
| 111 | + \begin{column}{0.6\textwidth} |
| 112 | + A usual command is: |
| 113 | + \begin{lstlisting}[language=Bash, style=Shell] |
| 114 | +$ snakedeploy deploy-workflow \ |
| 115 | +> <URL> |
| 116 | + \end{lstlisting} |
| 117 | + This will create the directories \altverb{workflow} and \altverb{config} in your current directory. |
| 118 | + \begin{hint} |
| 119 | + Alternatively, you may navigate to the repository of your desired workflow and download the entire workflow. |
| 120 | + \end{hint} |
| 121 | + \end{column} |
| 122 | + \end{columns} |
| 123 | +\end{frame} |
| 124 | + |
| 125 | +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 126 | +\begin{frame}[fragile] |
| 127 | + \frametitle{Finalizing the Deploymment} |
| 128 | + |
| 129 | + We could now deploy our sample workflow: |
| 130 | + \begin{itemize} |
| 131 | + \item Please create a directory \altverb{mkdir -p ~/example_workflow} |
| 132 | + \item Change to this directory. |
| 133 | + \item Deploy our sample workflow with |
| 134 | + \end{itemize} |
| 135 | + \begin{lstlisting}[language=Bash, style=Shell] |
| 136 | +$ snakedeploy deploy-workflow \ |
| 137 | +> <++course.deploy_url++> |
| 138 | + \end{lstlisting} |
| 139 | +\end{frame} |
| 140 | + |
| 141 | + |
| 142 | +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 143 | +\begin{frame}[fragile] |
| 144 | + \frametitle{Running Workflows on Cluster (or other environment)} |
| 145 | + Most likely a specific workflow never has been testing on \emph{your} computer before. It is almost ensured it will run on arbitrary servers, but clusters are a different story. \newline |
| 146 | + So |
| 147 | + \begin{itemize}[<+->] |
| 148 | + \item try to parameterize your workflow as we will learn and create a "profile" |
| 149 | + \item if it gives issues and you know how to correct it, ``fork'' the worklow and create a pull request |
| 150 | + \item if you cannot fix it, create a bug report |
| 151 | + \end{itemize} |
| 152 | +\end{frame} |
| 153 | + |
| 154 | +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 155 | +\begin{frame} |
| 156 | + \frametitle{\Interlude{Learn git!}} |
| 157 | + If you do not know what ``fork'' and ``pull request'' means, learn git! |
| 158 | + \begin{itemize}[<+->] |
| 159 | + \item there are courses |
| 160 | + \item and lots of online material |
| 161 | + \item and books |
| 162 | + \end{itemize} |
| 163 | + \pause |
| 164 | + \begin{warning} |
| 165 | + Knowing git is essential in data analysis! |
| 166 | + \end{warning} |
| 167 | +\end{frame} |
| 168 | + |
| 169 | +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 170 | +\begin{frame}[fragile] |
| 171 | + \frametitle{\HandsOn{Configuring the Workflow}} |
| 172 | + It is now time to configure and parameterize the workflow. |
| 173 | + \pause |
| 174 | + \begin{hint} |
| 175 | + As the configuration is workflow dependent you need to follow instructions, now. |
| 176 | + \end{hint} |
| 177 | + \pause |
| 178 | + Eventually start the workflow using: |
| 179 | + \begin{lstlisting}[language=Bash, style=Shell] |
| 180 | +$ snakemake --executor slurm \ |
| 181 | +> -j unlimited \ |
| 182 | +> --configfile <path to file> \ |
| 183 | +> --workflow-profile <path to directory> \ |
| 184 | +> --directory <path to your course output> |
| 185 | + \end{lstlisting} |
| 186 | + \pause |
| 187 | + \begin{hint} |
| 188 | + We will learn a few tricks to shorten this line. |
| 189 | + \end{hint} |
| 190 | +\end{frame} |
| 191 | + |
0 commit comments