extractor.i 2.25 KB
Newer Older
jkvis's avatar
jkvis committed
1
2
3
4
5
6
7
8
9
10
11
12
// *******************************************************************
// Extractor (library)
// *******************************************************************
// FILE INFORMATION:
//   File:     extractor.i (SWIG interface file)
//   Author:   Jonathan K. Vis
// *******************************************************************
// DESCRIPTION:
//   Defines the SWIG interface for the Extractor library for use in
//   other languages than C/C++.
// *******************************************************************

jkvis's avatar
jkvis committed
13
14
15
16
17
%include "std_vector.i"

%module extractor
%{
#include "extractor.h"
Vermaat's avatar
Vermaat committed
18
%}
jkvis's avatar
jkvis committed
19
20
21
22

namespace std
{
%template(VariantVector) vector<mutalyzer::Variant>;
Vermaat's avatar
Vermaat committed
23
}
jkvis's avatar
jkvis committed
24
25
26
27

namespace mutalyzer
{

Vermaat's avatar
Vermaat committed
28
static char const* const VERSION;
29

J.K. Vis's avatar
J.K. Vis committed
30
31
typedef char char_t;

Vermaat's avatar
Vermaat committed
32
33
34
static int const TYPE_DNA;
static int const TYPE_PROTEIN;
static int const TYPE_OTHER;
35

Vermaat's avatar
Vermaat committed
36
37
38
39
40
41
static unsigned int const IDENTITY;
static unsigned int const REVERSE_COMPLEMENT;
static unsigned int const SUBSTITUTION;
static unsigned int const TRANSPOSITION_OPEN;
static unsigned int const TRANSPOSITION_CLOSE;
static unsigned int const FRAME_SHIFT;
42

Vermaat's avatar
Vermaat committed
43
44
45
46
47
48
static unsigned int const FRAME_SHIFT_NONE;
static unsigned int const FRAME_SHIFT_1;
static unsigned int const FRAME_SHIFT_2;
static unsigned int const FRAME_SHIFT_REVERSE;
static unsigned int const FRAME_SHIFT_REVERSE_1;
static unsigned int const FRAME_SHIFT_REVERSE_2;
49

Vermaat's avatar
Vermaat committed
50
51
52
53
54
55
56
static size_t const WEIGHT_BASE;
static size_t const WEIGHT_DELETION;
static size_t const WEIGHT_DELETION_INSERTION;
static size_t const WEIGHT_INSERTION;
static size_t const WEIGHT_INVERSION;
static size_t const WEIGHT_SEPARATOR;
static size_t const WEIGHT_SUBSTITUTION;
jkvis's avatar
jkvis committed
57

jkvis's avatar
jkvis committed
58
59
struct Variant
{
60
61
62
63
64
65
66
  size_t       reference_start;
  size_t       reference_end;
  size_t       sample_start;
  size_t       sample_end;
  unsigned int type;
  size_t       transposition_start;
  size_t       transposition_end;
Vermaat's avatar
Vermaat committed
67
};
jkvis's avatar
jkvis committed
68

69
70
71
72
struct Variant_List
{
  size_t               weight_position;
  std::vector<Variant> variants;
Vermaat's avatar
Vermaat committed
73
};
74
75
76
77
78

Variant_List extract(char_t const* const reference,
                     size_t const        reference_length,
                     char_t const* const sample,
                     size_t const        sample_length,
J.K. Vis's avatar
J.K. Vis committed
79
80
                     int const           type = TYPE_DNA,
                     char_t const* const codon_string = 0);
jkvis's avatar
jkvis committed
81

Vermaat's avatar
Vermaat committed
82
}