Bloom Filter Trie: include/snippets.h Source File

Bloom Filter Trie

- Main Page
- Data Structures
- Files

- File List
- Globals

snippets.h
Go to the documentation of this file.
1
6 #pragma once
7
8 #include <stdio.h>
9 #include <stdlib.h>
10 #include <stdint.h>
11
12 #include <stdarg.h>
13 #include <stdbool.h>
14
15 #include "bft.h"
16
17 #include "list.h"
18 #include "extract_kmers.h"
19
21 #ifndef V_NOT_VISITED
22 #define V_NOT_VISITED 0
23 #endif
24
26 #ifndef V_VISITED
27 #define V_VISITED 1
28 #endif
29
37 size_t extract_core_kmers(BFT_kmer* kmer, BFT* graph, va_list args);
39 size_t extract_dispensable_kmers(BFT_kmer* kmer, BFT* graph, va_list args);
40 size_t extract_singleton_kmers(BFT_kmer* kmer, BFT* graph, va_list args);
41 void extract_pangenome_kmers_to_disk(BFT* graph, char* filename_output, BFT_func_ptr f);
43
48 size_t extract_simple_paths(BFT_kmer* kmer, BFT* graph, va_list args);
50 void extract_simple_paths_to_disk(BFT* graph, char* filename_output);
51 size_t extract_core_simple_paths(BFT_kmer* kmer, BFT* graph, va_list args);
52 void extract_simple_core_paths_to_disk(BFT* graph, double core_ratio, char* filename_output);
54
59 size_t BFS(BFT_kmer* kmer, BFT* graph, va_list args);
61 size_t BFS_subgraph(BFT_kmer* kmer, BFT* graph, va_list args);
62 size_t DFS(BFT_kmer* kmer, BFT* graph, va_list args);
63 size_t DFS_subgraph(BFT_kmer* kmer, BFT* graph, va_list args);
64 bool is_in_subgraph(BFT_kmer* kmer, BFT* graph, int nb_id_genomes, const va_list args);
65 void cdbg_traversal(BFT* graph, BFT_func_ptr f, ...);
66 size_t nb_connected_components(BFT_kmer* kmer, BFT* graph, va_list args);
67 void get_nb_connected_component(BFT* graph, ...);
bft.h
Interface containing all functions to use a BFT.
extract_dispensable_kmers
size_t extract_dispensable_kmers(BFT_kmer *kmer, BFT *graph, va_list args)
Function of type BFT_func_ptr extracting a dispensable k-mer to disk.
Definition: snippets.c:35
extract_core_kmers
size_t extract_core_kmers(BFT_kmer *kmer, BFT *graph, va_list args)
Function of type BFT_func_ptr extracting a core k-mer to disk.
Definition: snippets.c:10
extract_simple_core_paths_to_disk
void extract_simple_core_paths_to_disk(BFT *graph, double core_ratio, char *filename_output)
Function extracting from a colored de Bruijn graph stored as a BFT all simple (non branching) core pa...
Definition: snippets.c:560
get_nb_connected_component
void get_nb_connected_component(BFT *graph,...)
Compute the number of connected components in a colored de-Bruijn graph.
Definition: snippets.c:925
DFS_subgraph
size_t DFS_subgraph(BFT_kmer *kmer, BFT *graph, va_list args)
Function of type BFT_func_ptr starting a Depth-First Search traversal from a k-mer that is part of a ...
Definition: snippets.c:761
extract_pangenome_kmers_to_disk
void extract_pangenome_kmers_to_disk(BFT *graph, char *filename_output, BFT_func_ptr f)
Function extracting pan-genome (core/dispensable/singleton) k-mers from a BFT to disk.
Definition: snippets.c:86
BFT_func_ptr
size_t(* BFT_func_ptr)(BFT_kmer *bft_kmer, BFT *bft, va_list args)
Pointer on function used by iterate_over_kmers() and v_iterate_over_kmers().
Definition: bft.h:51
DFS
size_t DFS(BFT_kmer *kmer, BFT *graph, va_list args)
Function of type BFT_func_ptr starting a Depth-First Search traversal from a k-mer.
Definition: snippets.c:731
extract_simple_paths_to_disk
void extract_simple_paths_to_disk(BFT *graph, char *filename_output)
Function extracting from a colored de Bruijn graph stored as a BFT all simple (non branching) paths...
Definition: snippets.c:310
is_in_subgraph
bool is_in_subgraph(BFT_kmer *kmer, BFT *graph, int nb_id_genomes, const va_list args)
Function computing if a k-mer is part of a subgraph.
Definition: snippets.c:812
BFT_kmer
K-mer stored in a BFT_Root.
Definition: Node.h:124
extract_core_simple_paths
size_t extract_core_simple_paths(BFT_kmer *kmer, BFT *graph, va_list args)
Function of type BFT_func_ptr extracting from a non-branching core k-mer the simple (non branching) p...
Definition: snippets.c:346
cdbg_traversal
void cdbg_traversal(BFT *graph, BFT_func_ptr f,...)
Function traversing a colored de Bruijn graph stored as a BFT.
Definition: snippets.c:871
BFS_subgraph
size_t BFS_subgraph(BFT_kmer *kmer, BFT *graph, va_list args)
Function of type BFT_func_ptr starting a Breadth-First Search traversal from a k-mer that is part of ...
Definition: snippets.c:655
BFS
size_t BFS(BFT_kmer *kmer, BFT *graph, va_list args)
Function of type BFT_func_ptr starting a Breadth-First Search traversal from a k-mer.
Definition: snippets.c:593
nb_connected_components
size_t nb_connected_components(BFT_kmer *kmer, BFT *graph, va_list args)
Function of type BFT_func_ptr calling a traversal method (DFS/BFS, DFS_subgraph/BFS_subgraph) on a k-...
Definition: snippets.c:903
BFT_Root
Root vertex of a BFT.
Definition: Node.h:91
extract_simple_paths
size_t extract_simple_paths(BFT_kmer *kmer, BFT *graph, va_list args)
Function of type BFT_func_ptr extracting from a non-branching k-mer the simple (non branching) path i...
Definition: snippets.c:115
extract_singleton_kmers
size_t extract_singleton_kmers(BFT_kmer *kmer, BFT *graph, va_list args)
Function of type BFT_func_ptr extracting a singleton k-mer to disk.
Definition: snippets.c:60