Skip to content

Commit

Permalink
feat: explaining wildcards.sample
Browse files Browse the repository at this point in the history
  • Loading branch information
cmeesters committed Apr 19, 2024
1 parent 1cb676e commit 5447b5e
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion slides/creators/A_First_Workflow_condensed.tex
Original file line number Diff line number Diff line change
Expand Up @@ -388,11 +388,24 @@ \subsection{A first Step or ``Rule''}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\begin{frame}[fragile]
\frametitle{One Caveat!}
\begin{alertblock}{Multiple Wildcards}
You can have multiple wildcards in your file paths, however, to avoid conflicts with other jobs of the same rule, \emph{all output files} of a rule \emph{have to contain exactly the same wildcards}.
\end{alertblock}
\pause
\begin{lstlisting}[language=Python,style=Python]
rule <name>:
input:
"dir/{sample}_{w2}.txt"
output:
"out/{sample}_{w2}.out"
shell:
"cmd -i {wildcards.sample}_{wildcards.w2}.txt ..."
\end{lstlisting}
\begin{docs}
In an \altverb{action} we need to resolve the namespace with \altverb{wildcards}.
\end{docs}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand Down

0 comments on commit 5447b5e

Please # to comment.