Debian Codegraph @

ext/bifrost/doc/doxygen/latex/snippets_8h.tex

raw
1 \hypertarget{snippets_8h}{}\section{include/snippets.h File Reference}
2 \label{snippets_8h}\index{include/snippets.\+h@{include/snippets.\+h}}
3
4
5 Code snippets using a B\+FT.
6
7
8 \subsection*{Macros}
9 \begin{DoxyCompactItemize}
10 \item
11 \#define \hyperlink{snippets_8h_abeb188df21ec971c69153463711c533b}{V\+\_\+\+N\+O\+T\+\_\+\+V\+I\+S\+I\+T\+ED}~0
12 \begin{DoxyCompactList}\small\item\em Flag for marked vertices indicating the vertex has not been visited before. \end{DoxyCompactList}\item
13 \#define \hyperlink{snippets_8h_aaaef815ed6556662f874b106601e7343}{V\+\_\+\+V\+I\+S\+I\+T\+ED}~1
14 \begin{DoxyCompactList}\small\item\em Flag for marked vertices indicating the vertex has been visited before. \end{DoxyCompactList}\end{DoxyCompactItemize}
15 \subsection*{Functions}
16 \begin{Indent}{\bf K-\/mer extraction functions}\par
17 {\em These functions extract k-\/mers stored in a B\+FT to disk.
18
19 The last argument of \hyperlink{snippets_8h_a174cb48bca3f18405fc4521bd727b23a}{extract\+\_\+pangenome\+\_\+kmers\+\_\+to\+\_\+disk()} is of type B\+F\+T\+\_\+func\+\_\+ptr, you can use \hyperlink{snippets_8h_ae4b980179cbfacc3a110de78b8d401a9}{extract\+\_\+core\+\_\+kmers()}, \hyperlink{snippets_8h_a9966b1f0c27a512aa3f27d811906be78}{extract\+\_\+dispensable\+\_\+kmers()} or \hyperlink{snippets_8h_aeaa91fe987a5724ffaf8089b8927474e}{extract\+\_\+singleton\+\_\+kmers()} to extract core, dispensable or singleton k-\/mers. }\begin{DoxyCompactItemize}
20 \item
21 size\+\_\+t \hyperlink{snippets_8h_ae4b980179cbfacc3a110de78b8d401a9}{extract\+\_\+core\+\_\+kmers} (\hyperlink{structBFT__kmer}{B\+F\+T\+\_\+kmer} $\ast$kmer, \hyperlink{bft_8h_a2db0a80fe662d044625641531e5ce292}{B\+FT} $\ast$graph, va\+\_\+list args)
22 \begin{DoxyCompactList}\small\item\em Function of type B\+F\+T\+\_\+func\+\_\+ptr extracting a core k-\/mer to disk. \end{DoxyCompactList}\item
23 size\+\_\+t \hyperlink{snippets_8h_a9966b1f0c27a512aa3f27d811906be78}{extract\+\_\+dispensable\+\_\+kmers} (\hyperlink{structBFT__kmer}{B\+F\+T\+\_\+kmer} $\ast$kmer, \hyperlink{bft_8h_a2db0a80fe662d044625641531e5ce292}{B\+FT} $\ast$graph, va\+\_\+list args)
24 \begin{DoxyCompactList}\small\item\em Function of type B\+F\+T\+\_\+func\+\_\+ptr extracting a dispensable k-\/mer to disk. \end{DoxyCompactList}\item
25 size\+\_\+t \hyperlink{snippets_8h_aeaa91fe987a5724ffaf8089b8927474e}{extract\+\_\+singleton\+\_\+kmers} (\hyperlink{structBFT__kmer}{B\+F\+T\+\_\+kmer} $\ast$kmer, \hyperlink{bft_8h_a2db0a80fe662d044625641531e5ce292}{B\+FT} $\ast$graph, va\+\_\+list args)
26 \begin{DoxyCompactList}\small\item\em Function of type B\+F\+T\+\_\+func\+\_\+ptr extracting a singleton k-\/mer to disk. \end{DoxyCompactList}\item
27 void \hyperlink{snippets_8h_a174cb48bca3f18405fc4521bd727b23a}{extract\+\_\+pangenome\+\_\+kmers\+\_\+to\+\_\+disk} (\hyperlink{bft_8h_a2db0a80fe662d044625641531e5ce292}{B\+FT} $\ast$graph, char $\ast$filename\+\_\+output, \hyperlink{bft_8h_aac9ee38523fda7ab4f8eb1238e98d315}{B\+F\+T\+\_\+func\+\_\+ptr} f)
28 \begin{DoxyCompactList}\small\item\em Function extracting pan-\/genome (core/dispensable/singleton) k-\/mers from a B\+FT to disk. \end{DoxyCompactList}\end{DoxyCompactItemize}
29 \end{Indent}
30 \begin{Indent}{\bf Path extraction functions}\par
31 {\em These functions extract simple (non branching) paths of k-\/mers stored in a B\+FT to disk. }\begin{DoxyCompactItemize}
32 \item
33 size\+\_\+t \hyperlink{snippets_8h_a8068a236c9a0559e078b44a3b6381180}{extract\+\_\+simple\+\_\+paths} (\hyperlink{structBFT__kmer}{B\+F\+T\+\_\+kmer} $\ast$kmer, \hyperlink{bft_8h_a2db0a80fe662d044625641531e5ce292}{B\+FT} $\ast$graph, va\+\_\+list args)
34 \begin{DoxyCompactList}\small\item\em Function of type B\+F\+T\+\_\+func\+\_\+ptr extracting from a non-\/branching k-\/mer the simple (non branching) path in which it is. \end{DoxyCompactList}\item
35 void \hyperlink{snippets_8h_ac13451da7da5cf908fa38b781f24ab7f}{extract\+\_\+simple\+\_\+paths\+\_\+to\+\_\+disk} (\hyperlink{bft_8h_a2db0a80fe662d044625641531e5ce292}{B\+FT} $\ast$graph, char $\ast$filename\+\_\+output)
36 \begin{DoxyCompactList}\small\item\em Function extracting from a colored de Bruijn graph stored as a B\+FT all simple (non branching) paths. \end{DoxyCompactList}\item
37 size\+\_\+t \hyperlink{snippets_8h_a662c94e8e8a222268807cd4cd207ff34}{extract\+\_\+core\+\_\+simple\+\_\+paths} (\hyperlink{structBFT__kmer}{B\+F\+T\+\_\+kmer} $\ast$kmer, \hyperlink{bft_8h_a2db0a80fe662d044625641531e5ce292}{B\+FT} $\ast$graph, va\+\_\+list args)
38 \begin{DoxyCompactList}\small\item\em Function of type B\+F\+T\+\_\+func\+\_\+ptr extracting from a non-\/branching core k-\/mer the simple (non branching) path in which it is. \end{DoxyCompactList}\item
39 void \hyperlink{snippets_8h_a0da3b5767ecdb4e988af764739313e0a}{extract\+\_\+simple\+\_\+core\+\_\+paths\+\_\+to\+\_\+disk} (\hyperlink{bft_8h_a2db0a80fe662d044625641531e5ce292}{B\+FT} $\ast$graph, double core\+\_\+ratio, char $\ast$filename\+\_\+output)
40 \begin{DoxyCompactList}\small\item\em Function extracting from a colored de Bruijn graph stored as a B\+FT all simple (non branching) core paths. \end{DoxyCompactList}\end{DoxyCompactItemize}
41 \end{Indent}
42 \begin{Indent}{\bf Graph traversal functions}\par
43 {\em These functions iterate over a colored de Bruijn graph stored as a B\+FT. }\begin{DoxyCompactItemize}
44 \item
45 size\+\_\+t \hyperlink{snippets_8h_a779a1c7c7f4c236a2da64b8a18970b01}{B\+FS} (\hyperlink{structBFT__kmer}{B\+F\+T\+\_\+kmer} $\ast$kmer, \hyperlink{bft_8h_a2db0a80fe662d044625641531e5ce292}{B\+FT} $\ast$graph, va\+\_\+list args)
46 \begin{DoxyCompactList}\small\item\em Function of type B\+F\+T\+\_\+func\+\_\+ptr starting a Breadth-\/\+First Search traversal from a k-\/mer. \end{DoxyCompactList}\item
47 size\+\_\+t \hyperlink{snippets_8h_a8ad89b6e2e3d031a693f83922b9ad6e1}{B\+F\+S\+\_\+subgraph} (\hyperlink{structBFT__kmer}{B\+F\+T\+\_\+kmer} $\ast$kmer, \hyperlink{bft_8h_a2db0a80fe662d044625641531e5ce292}{B\+FT} $\ast$graph, va\+\_\+list args)
48 \begin{DoxyCompactList}\small\item\em Function of type B\+F\+T\+\_\+func\+\_\+ptr starting a Breadth-\/\+First Search traversal from a k-\/mer that is part of a subgraph. \end{DoxyCompactList}\item
49 size\+\_\+t \hyperlink{snippets_8h_a81bd0dcd92628563b61c855e26b12cc4}{D\+FS} (\hyperlink{structBFT__kmer}{B\+F\+T\+\_\+kmer} $\ast$kmer, \hyperlink{bft_8h_a2db0a80fe662d044625641531e5ce292}{B\+FT} $\ast$graph, va\+\_\+list args)
50 \begin{DoxyCompactList}\small\item\em Function of type B\+F\+T\+\_\+func\+\_\+ptr starting a Depth-\/\+First Search traversal from a k-\/mer. \end{DoxyCompactList}\item
51 size\+\_\+t \hyperlink{snippets_8h_ae751661ce6ad13867dd4b56d311573dc}{D\+F\+S\+\_\+subgraph} (\hyperlink{structBFT__kmer}{B\+F\+T\+\_\+kmer} $\ast$kmer, \hyperlink{bft_8h_a2db0a80fe662d044625641531e5ce292}{B\+FT} $\ast$graph, va\+\_\+list args)
52 \begin{DoxyCompactList}\small\item\em Function of type B\+F\+T\+\_\+func\+\_\+ptr starting a Depth-\/\+First Search traversal from a k-\/mer that is part of a subgraph. \end{DoxyCompactList}\item
53 bool \hyperlink{snippets_8h_ae3ea127efe630db3f15cd239e15713a8}{is\+\_\+in\+\_\+subgraph} (\hyperlink{structBFT__kmer}{B\+F\+T\+\_\+kmer} $\ast$kmer, \hyperlink{bft_8h_a2db0a80fe662d044625641531e5ce292}{B\+FT} $\ast$graph, int nb\+\_\+id\+\_\+genomes, const va\+\_\+list args)
54 \begin{DoxyCompactList}\small\item\em Function computing if a k-\/mer is part of a subgraph. \end{DoxyCompactList}\item
55 void \hyperlink{snippets_8h_a53366d800519c7b8dcb527ec99470654}{cdbg\+\_\+traversal} (\hyperlink{bft_8h_a2db0a80fe662d044625641531e5ce292}{B\+FT} $\ast$graph, \hyperlink{bft_8h_aac9ee38523fda7ab4f8eb1238e98d315}{B\+F\+T\+\_\+func\+\_\+ptr} f,...)
56 \begin{DoxyCompactList}\small\item\em Function traversing a colored de Bruijn graph stored as a B\+FT. \end{DoxyCompactList}\item
57 size\+\_\+t \hyperlink{snippets_8h_a9e84035e77676c83842320d1e0888457}{nb\+\_\+connected\+\_\+components} (\hyperlink{structBFT__kmer}{B\+F\+T\+\_\+kmer} $\ast$kmer, \hyperlink{bft_8h_a2db0a80fe662d044625641531e5ce292}{B\+FT} $\ast$graph, va\+\_\+list args)
58 \begin{DoxyCompactList}\small\item\em Function of type B\+F\+T\+\_\+func\+\_\+ptr calling a traversal method (D\+F\+S/\+B\+FS, D\+F\+S\+\_\+subgraph/\+B\+F\+S\+\_\+subgraph) on a k-\/mer to determine if it is in a new connected component. \end{DoxyCompactList}\item
59 void \hyperlink{snippets_8h_a95f78bc79f2acd976cca694413c5a452}{get\+\_\+nb\+\_\+connected\+\_\+component} (\hyperlink{bft_8h_a2db0a80fe662d044625641531e5ce292}{B\+FT} $\ast$graph,...)
60 \begin{DoxyCompactList}\small\item\em Compute the number of connected components in a colored de-\/\+Bruijn graph. \end{DoxyCompactList}\end{DoxyCompactItemize}
61 \end{Indent}
62
63
64 \subsection{Detailed Description}
65 Code snippets using a B\+FT.
66
67 The purpose of this file is to give examples of how to use the functions of the B\+FT A\+PI (\hyperlink{bft_8h}{bft.\+h}).
68
69 \subsection{Macro Definition Documentation}
70 \index{snippets.\+h@{snippets.\+h}!V\+\_\+\+N\+O\+T\+\_\+\+V\+I\+S\+I\+T\+ED@{V\+\_\+\+N\+O\+T\+\_\+\+V\+I\+S\+I\+T\+ED}}
71 \index{V\+\_\+\+N\+O\+T\+\_\+\+V\+I\+S\+I\+T\+ED@{V\+\_\+\+N\+O\+T\+\_\+\+V\+I\+S\+I\+T\+ED}!snippets.\+h@{snippets.\+h}}
72 \subsubsection[{\texorpdfstring{V\+\_\+\+N\+O\+T\+\_\+\+V\+I\+S\+I\+T\+ED}{V_NOT_VISITED}}]{\setlength{\rightskip}{0pt plus 5cm}\#define V\+\_\+\+N\+O\+T\+\_\+\+V\+I\+S\+I\+T\+ED~0}\hypertarget{snippets_8h_abeb188df21ec971c69153463711c533b}{}\label{snippets_8h_abeb188df21ec971c69153463711c533b}
73
74
75 Flag for marked vertices indicating the vertex has not been visited before.
76
77 \index{snippets.\+h@{snippets.\+h}!V\+\_\+\+V\+I\+S\+I\+T\+ED@{V\+\_\+\+V\+I\+S\+I\+T\+ED}}
78 \index{V\+\_\+\+V\+I\+S\+I\+T\+ED@{V\+\_\+\+V\+I\+S\+I\+T\+ED}!snippets.\+h@{snippets.\+h}}
79 \subsubsection[{\texorpdfstring{V\+\_\+\+V\+I\+S\+I\+T\+ED}{V_VISITED}}]{\setlength{\rightskip}{0pt plus 5cm}\#define V\+\_\+\+V\+I\+S\+I\+T\+ED~1}\hypertarget{snippets_8h_aaaef815ed6556662f874b106601e7343}{}\label{snippets_8h_aaaef815ed6556662f874b106601e7343}
80
81
82 Flag for marked vertices indicating the vertex has been visited before.
83
84
85
86 \subsection{Function Documentation}
87 \index{snippets.\+h@{snippets.\+h}!B\+FS@{B\+FS}}
88 \index{B\+FS@{B\+FS}!snippets.\+h@{snippets.\+h}}
89 \subsubsection[{\texorpdfstring{B\+F\+S(\+B\+F\+T\+\_\+kmer $\ast$kmer, B\+F\+T $\ast$graph, va\+\_\+list args)}{BFS(BFT_kmer *kmer, BFT *graph, va_list args)}}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t B\+FS (
90 \begin{DoxyParamCaption}
91 \item[{{\bf B\+F\+T\+\_\+kmer} $\ast$}]{kmer, }
92 \item[{{\bf B\+FT} $\ast$}]{graph, }
93 \item[{va\+\_\+list}]{args}
94 \end{DoxyParamCaption}
95 )}\hypertarget{snippets_8h_a779a1c7c7f4c236a2da64b8a18970b01}{}\label{snippets_8h_a779a1c7c7f4c236a2da64b8a18970b01}
96
97
98 Function of type B\+F\+T\+\_\+func\+\_\+ptr starting a Breadth-\/\+First Search traversal from a k-\/mer.
99
100
101 \begin{DoxyParams}{Parameters}
102 {\em kmer} & is a k-\/mer from the B\+FT graph. \\
103 \hline
104 {\em graph} & is the B\+FT from which kmer is from. \\
105 \hline
106 {\em args} & contains additional parameters given to the calling function (here none). \\
107 \hline
108 \end{DoxyParams}
109 \begin{DoxyReturn}{Returns}
110 true if it is a new connected component, else false.
111 \end{DoxyReturn}
112 \index{snippets.\+h@{snippets.\+h}!B\+F\+S\+\_\+subgraph@{B\+F\+S\+\_\+subgraph}}
113 \index{B\+F\+S\+\_\+subgraph@{B\+F\+S\+\_\+subgraph}!snippets.\+h@{snippets.\+h}}
114 \subsubsection[{\texorpdfstring{B\+F\+S\+\_\+subgraph(\+B\+F\+T\+\_\+kmer $\ast$kmer, B\+F\+T $\ast$graph, va\+\_\+list args)}{BFS_subgraph(BFT_kmer *kmer, BFT *graph, va_list args)}}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t B\+F\+S\+\_\+subgraph (
115 \begin{DoxyParamCaption}
116 \item[{{\bf B\+F\+T\+\_\+kmer} $\ast$}]{kmer, }
117 \item[{{\bf B\+FT} $\ast$}]{graph, }
118 \item[{va\+\_\+list}]{args}
119 \end{DoxyParamCaption}
120 )}\hypertarget{snippets_8h_a8ad89b6e2e3d031a693f83922b9ad6e1}{}\label{snippets_8h_a8ad89b6e2e3d031a693f83922b9ad6e1}
121
122
123 Function of type B\+F\+T\+\_\+func\+\_\+ptr starting a Breadth-\/\+First Search traversal from a k-\/mer that is part of a subgraph.
124
125
126 \begin{DoxyParams}{Parameters}
127 {\em kmer} & is a k-\/mer from the B\+FT graph. \\
128 \hline
129 {\em graph} & is the B\+FT from which kmer is from. \\
130 \hline
131 {\em args} & contains additional parameters given to the calling function. Here, it contains a number of genome ids, followed by the genome ids, that a k-\/mer must contain to be considered part of the subgraph. \\
132 \hline
133 \end{DoxyParams}
134 \begin{DoxyReturn}{Returns}
135 true if it is a new connected component, else false.
136 \end{DoxyReturn}
137 \index{snippets.\+h@{snippets.\+h}!cdbg\+\_\+traversal@{cdbg\+\_\+traversal}}
138 \index{cdbg\+\_\+traversal@{cdbg\+\_\+traversal}!snippets.\+h@{snippets.\+h}}
139 \subsubsection[{\texorpdfstring{cdbg\+\_\+traversal(\+B\+F\+T $\ast$graph, B\+F\+T\+\_\+func\+\_\+ptr f,...)}{cdbg_traversal(BFT *graph, BFT_func_ptr f,...)}}]{\setlength{\rightskip}{0pt plus 5cm}void cdbg\+\_\+traversal (
140 \begin{DoxyParamCaption}
141 \item[{{\bf B\+FT} $\ast$}]{graph, }
142 \item[{{\bf B\+F\+T\+\_\+func\+\_\+ptr}}]{f, }
143 \item[{}]{...}
144 \end{DoxyParamCaption}
145 )}\hypertarget{snippets_8h_a53366d800519c7b8dcb527ec99470654}{}\label{snippets_8h_a53366d800519c7b8dcb527ec99470654}
146
147
148 Function traversing a colored de Bruijn graph stored as a B\+FT.
149
150
151 \begin{DoxyParams}{Parameters}
152 {\em graph} & is a B\+FT representing a colored de Bruijn graph. \\
153 \hline
154 {\em f} & is the traversal function (D\+F\+S/\+B\+FS, D\+F\+S\+\_\+subgraph/\+B\+F\+S\+\_\+subgraph) to use. \\
155 \hline
156 {\em ...} & is the additional arguments to transfer to f() (if there are some). \\
157 \hline
158 \end{DoxyParams}
159 \index{snippets.\+h@{snippets.\+h}!D\+FS@{D\+FS}}
160 \index{D\+FS@{D\+FS}!snippets.\+h@{snippets.\+h}}
161 \subsubsection[{\texorpdfstring{D\+F\+S(\+B\+F\+T\+\_\+kmer $\ast$kmer, B\+F\+T $\ast$graph, va\+\_\+list args)}{DFS(BFT_kmer *kmer, BFT *graph, va_list args)}}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t D\+FS (
162 \begin{DoxyParamCaption}
163 \item[{{\bf B\+F\+T\+\_\+kmer} $\ast$}]{kmer, }
164 \item[{{\bf B\+FT} $\ast$}]{graph, }
165 \item[{va\+\_\+list}]{args}
166 \end{DoxyParamCaption}
167 )}\hypertarget{snippets_8h_a81bd0dcd92628563b61c855e26b12cc4}{}\label{snippets_8h_a81bd0dcd92628563b61c855e26b12cc4}
168
169
170 Function of type B\+F\+T\+\_\+func\+\_\+ptr starting a Depth-\/\+First Search traversal from a k-\/mer.
171
172
173 \begin{DoxyParams}{Parameters}
174 {\em kmer} & is a k-\/mer from the B\+FT graph. \\
175 \hline
176 {\em graph} & is the B\+FT from which kmer is from. \\
177 \hline
178 {\em args} & contains additional parameters given to the calling function (here none). \\
179 \hline
180 \end{DoxyParams}
181 \begin{DoxyReturn}{Returns}
182 true if it is a new connected component, else false.
183 \end{DoxyReturn}
184 \index{snippets.\+h@{snippets.\+h}!D\+F\+S\+\_\+subgraph@{D\+F\+S\+\_\+subgraph}}
185 \index{D\+F\+S\+\_\+subgraph@{D\+F\+S\+\_\+subgraph}!snippets.\+h@{snippets.\+h}}
186 \subsubsection[{\texorpdfstring{D\+F\+S\+\_\+subgraph(\+B\+F\+T\+\_\+kmer $\ast$kmer, B\+F\+T $\ast$graph, va\+\_\+list args)}{DFS_subgraph(BFT_kmer *kmer, BFT *graph, va_list args)}}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t D\+F\+S\+\_\+subgraph (
187 \begin{DoxyParamCaption}
188 \item[{{\bf B\+F\+T\+\_\+kmer} $\ast$}]{kmer, }
189 \item[{{\bf B\+FT} $\ast$}]{graph, }
190 \item[{va\+\_\+list}]{args}
191 \end{DoxyParamCaption}
192 )}\hypertarget{snippets_8h_ae751661ce6ad13867dd4b56d311573dc}{}\label{snippets_8h_ae751661ce6ad13867dd4b56d311573dc}
193
194
195 Function of type B\+F\+T\+\_\+func\+\_\+ptr starting a Depth-\/\+First Search traversal from a k-\/mer that is part of a subgraph.
196
197
198 \begin{DoxyParams}{Parameters}
199 {\em kmer} & is a k-\/mer from the B\+FT graph. \\
200 \hline
201 {\em graph} & is the B\+FT from which kmer is from. \\
202 \hline
203 {\em args} & contains additional parameters given to the calling function. Here, it contains a number of genome ids, followed by the genome ids, that a k-\/mer must contain to be considered part of the subgraph. \\
204 \hline
205 \end{DoxyParams}
206 \begin{DoxyReturn}{Returns}
207 true if it is a new connected component, else false.
208 \end{DoxyReturn}
209 \index{snippets.\+h@{snippets.\+h}!extract\+\_\+core\+\_\+kmers@{extract\+\_\+core\+\_\+kmers}}
210 \index{extract\+\_\+core\+\_\+kmers@{extract\+\_\+core\+\_\+kmers}!snippets.\+h@{snippets.\+h}}
211 \subsubsection[{\texorpdfstring{extract\+\_\+core\+\_\+kmers(\+B\+F\+T\+\_\+kmer $\ast$kmer, B\+F\+T $\ast$graph, va\+\_\+list args)}{extract_core_kmers(BFT_kmer *kmer, BFT *graph, va_list args)}}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t extract\+\_\+core\+\_\+kmers (
212 \begin{DoxyParamCaption}
213 \item[{{\bf B\+F\+T\+\_\+kmer} $\ast$}]{kmer, }
214 \item[{{\bf B\+FT} $\ast$}]{graph, }
215 \item[{va\+\_\+list}]{args}
216 \end{DoxyParamCaption}
217 )}\hypertarget{snippets_8h_ae4b980179cbfacc3a110de78b8d401a9}{}\label{snippets_8h_ae4b980179cbfacc3a110de78b8d401a9}
218
219
220 Function of type B\+F\+T\+\_\+func\+\_\+ptr extracting a core k-\/mer to disk.
221
222 A core k-\/mer contains in its annotation all genome ids inserted in the graph.
223 \begin{DoxyParams}{Parameters}
224 {\em kmer} & is a k-\/mer from the B\+FT graph. \\
225 \hline
226 {\em graph} & is the B\+FT from which kmer is from. \\
227 \hline
228 {\em args} & contains all additional parameters given to \hyperlink{snippets_8h_a174cb48bca3f18405fc4521bd727b23a}{extract\+\_\+pangenome\+\_\+kmers\+\_\+to\+\_\+disk()}\+: A pointer to a file where to write the k-\/mer and a pointer to the current number of k-\/mers written. \\
229 \hline
230 \end{DoxyParams}
231 \index{snippets.\+h@{snippets.\+h}!extract\+\_\+core\+\_\+simple\+\_\+paths@{extract\+\_\+core\+\_\+simple\+\_\+paths}}
232 \index{extract\+\_\+core\+\_\+simple\+\_\+paths@{extract\+\_\+core\+\_\+simple\+\_\+paths}!snippets.\+h@{snippets.\+h}}
233 \subsubsection[{\texorpdfstring{extract\+\_\+core\+\_\+simple\+\_\+paths(\+B\+F\+T\+\_\+kmer $\ast$kmer, B\+F\+T $\ast$graph, va\+\_\+list args)}{extract_core_simple_paths(BFT_kmer *kmer, BFT *graph, va_list args)}}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t extract\+\_\+core\+\_\+simple\+\_\+paths (
234 \begin{DoxyParamCaption}
235 \item[{{\bf B\+F\+T\+\_\+kmer} $\ast$}]{kmer, }
236 \item[{{\bf B\+FT} $\ast$}]{graph, }
237 \item[{va\+\_\+list}]{args}
238 \end{DoxyParamCaption}
239 )}\hypertarget{snippets_8h_a662c94e8e8a222268807cd4cd207ff34}{}\label{snippets_8h_a662c94e8e8a222268807cd4cd207ff34}
240
241
242 Function of type B\+F\+T\+\_\+func\+\_\+ptr extracting from a non-\/branching core k-\/mer the simple (non branching) path in which it is.
243
244 args contains as argument a core\+\_\+ratio float (between 0 to 1) indicating the ratio of genome ids (compared to the total number of genome ids) that a k-\/mer annotation must contain to be considered being part of a core simple path.
245 \begin{DoxyParams}{Parameters}
246 {\em kmer} & is a k-\/mer from the B\+FT graph. \\
247 \hline
248 {\em graph} & is the B\+FT from which kmer is from. \\
249 \hline
250 {\em args} & contains all additional parameters given to \hyperlink{snippets_8h_a0da3b5767ecdb4e988af764739313e0a}{extract\+\_\+simple\+\_\+core\+\_\+paths\+\_\+to\+\_\+disk()}\+: A pointer to a file where to write paths and a pointer to the current max. size of a path written in the file. \\
251 \hline
252 \end{DoxyParams}
253 \index{snippets.\+h@{snippets.\+h}!extract\+\_\+dispensable\+\_\+kmers@{extract\+\_\+dispensable\+\_\+kmers}}
254 \index{extract\+\_\+dispensable\+\_\+kmers@{extract\+\_\+dispensable\+\_\+kmers}!snippets.\+h@{snippets.\+h}}
255 \subsubsection[{\texorpdfstring{extract\+\_\+dispensable\+\_\+kmers(\+B\+F\+T\+\_\+kmer $\ast$kmer, B\+F\+T $\ast$graph, va\+\_\+list args)}{extract_dispensable_kmers(BFT_kmer *kmer, BFT *graph, va_list args)}}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t extract\+\_\+dispensable\+\_\+kmers (
256 \begin{DoxyParamCaption}
257 \item[{{\bf B\+F\+T\+\_\+kmer} $\ast$}]{kmer, }
258 \item[{{\bf B\+FT} $\ast$}]{graph, }
259 \item[{va\+\_\+list}]{args}
260 \end{DoxyParamCaption}
261 )}\hypertarget{snippets_8h_a9966b1f0c27a512aa3f27d811906be78}{}\label{snippets_8h_a9966b1f0c27a512aa3f27d811906be78}
262
263
264 Function of type B\+F\+T\+\_\+func\+\_\+ptr extracting a dispensable k-\/mer to disk.
265
266 A dispensable k-\/mer contains in its annotation less than all genome ids inserted in the graph.
267 \begin{DoxyParams}{Parameters}
268 {\em kmer} & is a k-\/mer from the B\+FT graph. \\
269 \hline
270 {\em graph} & is the B\+FT from which kmer is from. \\
271 \hline
272 {\em args} & contains all additional parameters given to \hyperlink{snippets_8h_a174cb48bca3f18405fc4521bd727b23a}{extract\+\_\+pangenome\+\_\+kmers\+\_\+to\+\_\+disk()}\+: A pointer to a file where to write the k-\/mer and a pointer to the current number of k-\/mers written. \\
273 \hline
274 \end{DoxyParams}
275 \index{snippets.\+h@{snippets.\+h}!extract\+\_\+pangenome\+\_\+kmers\+\_\+to\+\_\+disk@{extract\+\_\+pangenome\+\_\+kmers\+\_\+to\+\_\+disk}}
276 \index{extract\+\_\+pangenome\+\_\+kmers\+\_\+to\+\_\+disk@{extract\+\_\+pangenome\+\_\+kmers\+\_\+to\+\_\+disk}!snippets.\+h@{snippets.\+h}}
277 \subsubsection[{\texorpdfstring{extract\+\_\+pangenome\+\_\+kmers\+\_\+to\+\_\+disk(\+B\+F\+T $\ast$graph, char $\ast$filename\+\_\+output, B\+F\+T\+\_\+func\+\_\+ptr f)}{extract_pangenome_kmers_to_disk(BFT *graph, char *filename_output, BFT_func_ptr f)}}]{\setlength{\rightskip}{0pt plus 5cm}void extract\+\_\+pangenome\+\_\+kmers\+\_\+to\+\_\+disk (
278 \begin{DoxyParamCaption}
279 \item[{{\bf B\+FT} $\ast$}]{graph, }
280 \item[{char $\ast$}]{filename\+\_\+output, }
281 \item[{{\bf B\+F\+T\+\_\+func\+\_\+ptr}}]{f}
282 \end{DoxyParamCaption}
283 )}\hypertarget{snippets_8h_a174cb48bca3f18405fc4521bd727b23a}{}\label{snippets_8h_a174cb48bca3f18405fc4521bd727b23a}
284
285
286 Function extracting pan-\/genome (core/dispensable/singleton) k-\/mers from a B\+FT to disk.
287
288 A core k-\/mer contains in its annotation all genome ids inserted in the graph. A dispensable k-\/mer contains in its annotation less than all genome ids inserted in the graph. A singleton k-\/mer contains in its annotation one genome id inserted in the graph.
289 \begin{DoxyParams}{Parameters}
290 {\em graph} & is a B\+FT from which k-\/mers must be extracted. \\
291 \hline
292 {\em filename\+\_\+output} & is the name of the file where to write the k-\/mers. \\
293 \hline
294 {\em f} & is a function of type B\+F\+T\+\_\+func\+\_\+ptr (like \hyperlink{snippets_8h_ae4b980179cbfacc3a110de78b8d401a9}{extract\+\_\+core\+\_\+kmers()}, \hyperlink{snippets_8h_a9966b1f0c27a512aa3f27d811906be78}{extract\+\_\+dispensable\+\_\+kmers()}, and \hyperlink{snippets_8h_aeaa91fe987a5724ffaf8089b8927474e}{extract\+\_\+singleton\+\_\+kmers()}) which write a pan-\/genome k-\/mer to disk. \\
295 \hline
296 \end{DoxyParams}
297 \index{snippets.\+h@{snippets.\+h}!extract\+\_\+simple\+\_\+core\+\_\+paths\+\_\+to\+\_\+disk@{extract\+\_\+simple\+\_\+core\+\_\+paths\+\_\+to\+\_\+disk}}
298 \index{extract\+\_\+simple\+\_\+core\+\_\+paths\+\_\+to\+\_\+disk@{extract\+\_\+simple\+\_\+core\+\_\+paths\+\_\+to\+\_\+disk}!snippets.\+h@{snippets.\+h}}
299 \subsubsection[{\texorpdfstring{extract\+\_\+simple\+\_\+core\+\_\+paths\+\_\+to\+\_\+disk(\+B\+F\+T $\ast$graph, double core\+\_\+ratio, char $\ast$filename\+\_\+output)}{extract_simple_core_paths_to_disk(BFT *graph, double core_ratio, char *filename_output)}}]{\setlength{\rightskip}{0pt plus 5cm}void extract\+\_\+simple\+\_\+core\+\_\+paths\+\_\+to\+\_\+disk (
300 \begin{DoxyParamCaption}
301 \item[{{\bf B\+FT} $\ast$}]{graph, }
302 \item[{double}]{core\+\_\+ratio, }
303 \item[{char $\ast$}]{filename\+\_\+output}
304 \end{DoxyParamCaption}
305 )}\hypertarget{snippets_8h_a0da3b5767ecdb4e988af764739313e0a}{}\label{snippets_8h_a0da3b5767ecdb4e988af764739313e0a}
306
307
308 Function extracting from a colored de Bruijn graph stored as a B\+FT all simple (non branching) core paths.
309
310
311 \begin{DoxyParams}{Parameters}
312 {\em graph} & is a colored de Bruijn graph stored as a B\+FT. \\
313 \hline
314 {\em core\+\_\+ratio} & is a float (between 0 to 1) indicating the ratio of genome ids (compared to the total number of genome ids inserted in graph) that a k-\/mer annotation must contain to be considered being part of a core simple path. \\
315 \hline
316 {\em filename\+\_\+output} & is the name of the file where to write the simple core paths. \\
317 \hline
318 \end{DoxyParams}
319 \index{snippets.\+h@{snippets.\+h}!extract\+\_\+simple\+\_\+paths@{extract\+\_\+simple\+\_\+paths}}
320 \index{extract\+\_\+simple\+\_\+paths@{extract\+\_\+simple\+\_\+paths}!snippets.\+h@{snippets.\+h}}
321 \subsubsection[{\texorpdfstring{extract\+\_\+simple\+\_\+paths(\+B\+F\+T\+\_\+kmer $\ast$kmer, B\+F\+T $\ast$graph, va\+\_\+list args)}{extract_simple_paths(BFT_kmer *kmer, BFT *graph, va_list args)}}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t extract\+\_\+simple\+\_\+paths (
322 \begin{DoxyParamCaption}
323 \item[{{\bf B\+F\+T\+\_\+kmer} $\ast$}]{kmer, }
324 \item[{{\bf B\+FT} $\ast$}]{graph, }
325 \item[{va\+\_\+list}]{args}
326 \end{DoxyParamCaption}
327 )}\hypertarget{snippets_8h_a8068a236c9a0559e078b44a3b6381180}{}\label{snippets_8h_a8068a236c9a0559e078b44a3b6381180}
328
329
330 Function of type B\+F\+T\+\_\+func\+\_\+ptr extracting from a non-\/branching k-\/mer the simple (non branching) path in which it is.
331
332
333 \begin{DoxyParams}{Parameters}
334 {\em kmer} & is a k-\/mer from the B\+FT graph. \\
335 \hline
336 {\em graph} & is the B\+FT from which kmer is from. \\
337 \hline
338 {\em args} & contains all additional parameters given to \hyperlink{snippets_8h_ac13451da7da5cf908fa38b781f24ab7f}{extract\+\_\+simple\+\_\+paths\+\_\+to\+\_\+disk()}\+: A pointer to a file where to write paths and a pointer to the current max. size of a path written in the file. \\
339 \hline
340 \end{DoxyParams}
341 \index{snippets.\+h@{snippets.\+h}!extract\+\_\+simple\+\_\+paths\+\_\+to\+\_\+disk@{extract\+\_\+simple\+\_\+paths\+\_\+to\+\_\+disk}}
342 \index{extract\+\_\+simple\+\_\+paths\+\_\+to\+\_\+disk@{extract\+\_\+simple\+\_\+paths\+\_\+to\+\_\+disk}!snippets.\+h@{snippets.\+h}}
343 \subsubsection[{\texorpdfstring{extract\+\_\+simple\+\_\+paths\+\_\+to\+\_\+disk(\+B\+F\+T $\ast$graph, char $\ast$filename\+\_\+output)}{extract_simple_paths_to_disk(BFT *graph, char *filename_output)}}]{\setlength{\rightskip}{0pt plus 5cm}void extract\+\_\+simple\+\_\+paths\+\_\+to\+\_\+disk (
344 \begin{DoxyParamCaption}
345 \item[{{\bf B\+FT} $\ast$}]{graph, }
346 \item[{char $\ast$}]{filename\+\_\+output}
347 \end{DoxyParamCaption}
348 )}\hypertarget{snippets_8h_ac13451da7da5cf908fa38b781f24ab7f}{}\label{snippets_8h_ac13451da7da5cf908fa38b781f24ab7f}
349
350
351 Function extracting from a colored de Bruijn graph stored as a B\+FT all simple (non branching) paths.
352
353
354 \begin{DoxyParams}{Parameters}
355 {\em graph} & is a colored de Bruijn graph stored as a B\+FT. \\
356 \hline
357 {\em filename\+\_\+output} & is the name of the file where to write the simple paths. \\
358 \hline
359 \end{DoxyParams}
360 \index{snippets.\+h@{snippets.\+h}!extract\+\_\+singleton\+\_\+kmers@{extract\+\_\+singleton\+\_\+kmers}}
361 \index{extract\+\_\+singleton\+\_\+kmers@{extract\+\_\+singleton\+\_\+kmers}!snippets.\+h@{snippets.\+h}}
362 \subsubsection[{\texorpdfstring{extract\+\_\+singleton\+\_\+kmers(\+B\+F\+T\+\_\+kmer $\ast$kmer, B\+F\+T $\ast$graph, va\+\_\+list args)}{extract_singleton_kmers(BFT_kmer *kmer, BFT *graph, va_list args)}}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t extract\+\_\+singleton\+\_\+kmers (
363 \begin{DoxyParamCaption}
364 \item[{{\bf B\+F\+T\+\_\+kmer} $\ast$}]{kmer, }
365 \item[{{\bf B\+FT} $\ast$}]{graph, }
366 \item[{va\+\_\+list}]{args}
367 \end{DoxyParamCaption}
368 )}\hypertarget{snippets_8h_aeaa91fe987a5724ffaf8089b8927474e}{}\label{snippets_8h_aeaa91fe987a5724ffaf8089b8927474e}
369
370
371 Function of type B\+F\+T\+\_\+func\+\_\+ptr extracting a singleton k-\/mer to disk.
372
373 Singleton k-\/mer contains in its annotation one genome id inserted in the graph.
374 \begin{DoxyParams}{Parameters}
375 {\em kmer} & is a k-\/mer from the B\+FT graph. \\
376 \hline
377 {\em graph} & is the B\+FT from which kmer is from. \\
378 \hline
379 {\em args} & contains all additional parameters given to \hyperlink{snippets_8h_a174cb48bca3f18405fc4521bd727b23a}{extract\+\_\+pangenome\+\_\+kmers\+\_\+to\+\_\+disk()}\+: A pointer to a file where to write the k-\/mer and a pointer to the current number of k-\/mers written. \\
380 \hline
381 \end{DoxyParams}
382 \index{snippets.\+h@{snippets.\+h}!get\+\_\+nb\+\_\+connected\+\_\+component@{get\+\_\+nb\+\_\+connected\+\_\+component}}
383 \index{get\+\_\+nb\+\_\+connected\+\_\+component@{get\+\_\+nb\+\_\+connected\+\_\+component}!snippets.\+h@{snippets.\+h}}
384 \subsubsection[{\texorpdfstring{get\+\_\+nb\+\_\+connected\+\_\+component(\+B\+F\+T $\ast$graph,...)}{get_nb_connected_component(BFT *graph,...)}}]{\setlength{\rightskip}{0pt plus 5cm}void get\+\_\+nb\+\_\+connected\+\_\+component (
385 \begin{DoxyParamCaption}
386 \item[{{\bf B\+FT} $\ast$}]{graph, }
387 \item[{}]{...}
388 \end{DoxyParamCaption}
389 )}\hypertarget{snippets_8h_a95f78bc79f2acd976cca694413c5a452}{}\label{snippets_8h_a95f78bc79f2acd976cca694413c5a452}
390
391
392 Compute the number of connected components in a colored de-\/\+Bruijn graph.
393
394
395 \begin{DoxyParams}{Parameters}
396 {\em graph} & is a B\+FT representing a colored de Bruijn graph. \\
397 \hline
398 {\em ...} & is the additional arguments to transfer to \hyperlink{snippets_8h_a9e84035e77676c83842320d1e0888457}{nb\+\_\+connected\+\_\+components()} (traversal method and additional arguments if there are some). \\
399 \hline
400 \end{DoxyParams}
401 \index{snippets.\+h@{snippets.\+h}!is\+\_\+in\+\_\+subgraph@{is\+\_\+in\+\_\+subgraph}}
402 \index{is\+\_\+in\+\_\+subgraph@{is\+\_\+in\+\_\+subgraph}!snippets.\+h@{snippets.\+h}}
403 \subsubsection[{\texorpdfstring{is\+\_\+in\+\_\+subgraph(\+B\+F\+T\+\_\+kmer $\ast$kmer, B\+F\+T $\ast$graph, int nb\+\_\+id\+\_\+genomes, const va\+\_\+list args)}{is_in_subgraph(BFT_kmer *kmer, BFT *graph, int nb_id_genomes, const va_list args)}}]{\setlength{\rightskip}{0pt plus 5cm}bool is\+\_\+in\+\_\+subgraph (
404 \begin{DoxyParamCaption}
405 \item[{{\bf B\+F\+T\+\_\+kmer} $\ast$}]{kmer, }
406 \item[{{\bf B\+FT} $\ast$}]{graph, }
407 \item[{int}]{nb\+\_\+id\+\_\+genomes, }
408 \item[{const va\+\_\+list}]{args}
409 \end{DoxyParamCaption}
410 )}\hypertarget{snippets_8h_ae3ea127efe630db3f15cd239e15713a8}{}\label{snippets_8h_ae3ea127efe630db3f15cd239e15713a8}
411
412
413 Function computing if a k-\/mer is part of a subgraph.
414
415 A subgraph is determined by k-\/mers having in their annotation specific genome ids.
416 \begin{DoxyParams}{Parameters}
417 {\em kmer} & is a k-\/mer from the B\+FT graph. \\
418 \hline
419 {\em graph} & is the B\+FT from which kmer is from. \\
420 \hline
421 {\em nb\+\_\+id\+\_\+genomes} & is the number of genome ids that a k-\/mer must contain to be considered part of the subgraph. \\
422 \hline
423 {\em args} & contains additional parameters given to the calling function. Here, it contains the genome ids that a k-\/mer must contain to be considered part of the subgraph. \\
424 \hline
425 \end{DoxyParams}
426 \begin{DoxyReturn}{Returns}
427 true if it is a new connected component, else false.
428 \end{DoxyReturn}
429 \index{snippets.\+h@{snippets.\+h}!nb\+\_\+connected\+\_\+components@{nb\+\_\+connected\+\_\+components}}
430 \index{nb\+\_\+connected\+\_\+components@{nb\+\_\+connected\+\_\+components}!snippets.\+h@{snippets.\+h}}
431 \subsubsection[{\texorpdfstring{nb\+\_\+connected\+\_\+components(\+B\+F\+T\+\_\+kmer $\ast$kmer, B\+F\+T $\ast$graph, va\+\_\+list args)}{nb_connected_components(BFT_kmer *kmer, BFT *graph, va_list args)}}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t nb\+\_\+connected\+\_\+components (
432 \begin{DoxyParamCaption}
433 \item[{{\bf B\+F\+T\+\_\+kmer} $\ast$}]{kmer, }
434 \item[{{\bf B\+FT} $\ast$}]{graph, }
435 \item[{va\+\_\+list}]{args}
436 \end{DoxyParamCaption}
437 )}\hypertarget{snippets_8h_a9e84035e77676c83842320d1e0888457}{}\label{snippets_8h_a9e84035e77676c83842320d1e0888457}
438
439
440 Function of type B\+F\+T\+\_\+func\+\_\+ptr calling a traversal method (D\+F\+S/\+B\+FS, D\+F\+S\+\_\+subgraph/\+B\+F\+S\+\_\+subgraph) on a k-\/mer to determine if it is in a new connected component.
441
442
443 \begin{DoxyParams}{Parameters}
444 {\em kmer} & is a k-\/mer from the B\+FT graph. \\
445 \hline
446 {\em graph} & is the B\+FT from which kmer is from. \\
447 \hline
448 {\em args} & contains additional parameters given to the calling function. Here, it contains the traversal method to call and its additional arguments. \\
449 \hline
450 \end{DoxyParams}