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
|
\clearpage
\section{complex operation}
\label{sec:complex}
Complex operation allows to define operations for more than 2 input $k$-mer sets. \\
Command-line syntax: \\
kmc\_tools [global\_params] complex $<$operations\_definition\_file$>$ \\
where \textsf{operations\_definition\_file} is a path to the file which defines input sets and operations. It is a text file with the following syntax: \\ \\
\fbox{
\parbox{\textwidth}{
INPUT:\\
$<$input1$>$ = $<$input1\_db\_path$>$ [params]\\
$<$input2$>$ = $<$input2\_db\_path$>$ [params]\\
...\\
$<$inputN$>$ = $<$inputN\_db\_path$>$ [params]\\
OUTPUT:\\
$<$out\_db\_path$>$ = $<$ref\_input$>$ $<$oper [c\_mode]$>$ $<$ref\_input$>$ [$<$oper[c\_mode]$>$ $<$ref\_input$>$ [...]] \\
\textbf{[}OUTPUT\_PARAMS: \\
$<$output\_params$>$]
}
}\\
where:
\begin{itemize}
\item \textsf{input1, input2, ..., inputN} --- names of inputs used to define operation,
\item \textsf{input1\_db\_path, input2\_db\_path, inputN\_db\_path} --- paths of $k$-mer sets,
\item \textsf{out\_db\_path} --- path of the output database,
\item \textsf{ref\_input} is one of \textsf{input1, input2, ..., inputN},
\item \textsf{oper} is one of \textsf{\{*,-,$\sim$,+\}}, the meaning is as follows:
\begin{itemize}
\item[\tiny$\bullet$] \textsf{*} --- intersect,
\item[\tiny$\bullet$] \textsf{-} --- kmers\_subtract,
\item[\tiny$\bullet$] \textsf{$\sim$} --- counters\_subtract,
\item[\tiny$\bullet$] \textsf{+} --- union.
\end{itemize}
\item \textsf{c\_mode} --- redefine default counter calculation mode (available values: min, max, diff, sum, left, right).
\end{itemize}
For detailed description about operations and counter calculation mode see \hyperref[sec:simple]{section \ref{sec:simple}}
For each input there are additional parameters which can be set:
\begin{itemize}
\item \textsf{-ci<value>} --- exclude $k$-mers occurring less than <value> times,
\item \textsf{-cx<value>} --- exclude $k$-mers occurring more than <value> times.
\end{itemize}
If additional parameters are not given they are taken from the appropriate input database.
Operator \textsf{*} has the highest priority. Other operators has equal priorities. Order of operations can be changed with parentheses.
Available \textsf{output\_params}:
\begin{itemize}
\item \textsf{-ci$<$value$>$} --- exclude $k$-mers occurring less than <value> times,
\item \textsf{-cx$<$value$>$} --- exclude $k$-mers occurring more than <value> times,
\item \textsf{-cs$<$value$>$} --- maximal value of a counter.
\end{itemize}
If the \textsf{output\_params} are not specified they are deduced based on input parameters.
\subsection*{example}
\fbox{
\parbox{\textwidth}{
INPUT:\\
set1 = kmc\_o1 -ci5\\
set2 = kmc\_o2\\
set3 = kmc\_o3 -ci10 -cx100\\
OUTPUT:\\
result = (set3 + min set1) * set2 \\
OUTPUT\_PARAMS: \\
-ci4 -cx80 -cs1000 \\
}
}\\ \\
|