-
Notifications
You must be signed in to change notification settings - Fork 1
/
kProcessor.i
118 lines (82 loc) · 3.03 KB
/
kProcessor.i
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
%module kProcessor
%{
/* Everything in this block will be copied in the wrapper file. We include the C header file necessary to compile the interface */
#include "kDataFrame.hpp" // including kDataframe
%}
using namespace std; // Extremly important
%include "std_vector.i" /*Using std::vector typemaps*/
%include std_map.i
%template(IntVector) vector<int>; /*vector to tuple conversion*/
%include "stdint.i" /*This mainly used for converting python int to C++ uint64_t*/
%include std_string.i /*And this for converting python str to C++ std::string*/
/* ~~~~ENABLED FOR NOW~~~~~~ */
/* ~~~~COMMENT TO DISABLE namesMap interface~~~~ */
/* ~~~~WORKS ONLY IN SWIG4.0 ~~~~ */
%include std_unordered_map.i
/*
%template(MAPsi) unordered_map<int, std::string>;
%template(MAPis) unordered_map<std::string, int>;
*/
%template(batchQuery_sources) std::unordered_map<std::string, std::vector<std::vector<uint32_t>>>;
%template(colorsList) vector<uint32_t>;
%template(batchQuery_counts) std::unordered_map<std::string, std::vector<uint32_t>>;
%template(kmerDecoderParams) map<string, int>;
%include "swig_interfaces/modules/custom_typemaps.i"
/*Just copy/paste the snippet I'm interested in to be wrapped!*/
// no need to include subclasses if all their methods (that we are interested in) are defined in the superclass
// Wrapping enums of kmerDecoder hashing/reading modes
enum readingModes{
KMERS = 1,
SKIPMERS = 2,
MINIMIZERS = 3,
PROTEIN = 4,
};
enum hashingModes{
mumur_hasher = 0,
integer_hasher = 1,
TwoBits_hasher = 2,
nonCanonicalInteger_Hasher = 3,
protein_hasher = 4,
proteinDayhoff_hasher = 5,
};
/******** kDataFrame Interface ************/
%include "swig_interfaces/kDataFrame/kDataFrameIterator.i"
%include "swig_interfaces/kDataFrame/kmerRow.i"
%include "swig_interfaces/kDataFrame/kDataFrame.i"
%include "swig_interfaces/kDataFrame/kDataFrameMQF.i"
%include "swig_interfaces/kDataFrame/kDataFrameMAP.i"
%include "swig_interfaces/kDataFrame/kDataFramePHMAP.i"
%include "swig_interfaces/kDataFrame/kDataFrameBMQF.i"
/******** kDataFrame Interface ************/
/******** colored_kDataFrame Interface ************/
%{
#include "colored_kDataFrame.hpp"
%}
%include "swig_interfaces/colored_kDataFrame.i"
/******** colored_kDataFrame Interface ************/
/******** colorTable Interface ************/
%{
#include "colorTable.hpp"
%}
%include "swig_interfaces/colorTable.i"
/******** colorTable Interface ************/
%{
#include "batchQuery.hpp"
%}
%include "swig_interfaces/batchQuery.i"
/******** colorTable Interface ************/
%{
#include "algorithms.hpp" // including algorithms
%}
%template(kFramesVector) vector<kDataFrame*>; /*vector to tuple conversion*/
%include "swig_interfaces/algorithms/algorithms.i"
/******** HashUtils Interface ************/
%{
#include "hashUtils/hashutil.hpp" // including HashUtils
%}
%include "swig_interfaces/HashUtils/hashutil.i"
%{
#include "Utils/kmer.h" // including Kmer
%}
%include "swig_interfaces/Utils/kmer.i"
/******** END kDataFrame ************/