-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
87 lines (71 loc) · 2.52 KB
/
main.cpp
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
#include "input_module.hpp"
#include <iostream>
#include <queue>
using namespace std;
int main()
{
int count = 0;
std::queue<std::string> kmers;
std::queue<std::string> skipmers;
std::queue<std::string> minimzers;
string seq = "ATGAGGGGGATGCCCCTCTTTGAGCCCAAGGACGTAGCCTATATTTTGCAACGCGTGAC";
/*
--------------------------------------------------------
Skipmers
--------------------------------------------------------
*/
const vector<int> skipmers_params = {2, 3, 14}; // params = {m, n, k}
InputModule *skp = InputModuleFactory::newInputModule("skipmers");
skp->setParms(skipmers_params);
skp->getKmers(skipmers, seq);
std::cout << "\n[*] Skipmers -----\n";
while (!skipmers.empty())
{
std::cout << ++count << ": " << skipmers.front() << std::endl;
skipmers.pop();
}
/*
--------------------------------------------------------
Default kmers
--------------------------------------------------------
*/
const vector<int> kmers_params = {15}; // params = {k}
InputModule *df = InputModuleFactory::newInputModule("default");
df->setParms(kmers_params);
df->getKmers(kmers, seq);
count = 0;
std::cout << "\n[*] Kmers -----\n";
while (!kmers.empty())
{
std::cout << ++count << ": " << kmers.front() << std::endl;
kmers.pop();
}
/*
--------------------------------------------------------
Minimzers kmers
--------------------------------------------------------
*/
const vector<int> minimzers_params = {5, 10}; // params = {k, w}
InputModule *mini = InputModuleFactory::newInputModule("minimzers");
mini->setParms(minimzers_params);
mini->getKmers(minimzers, seq);
count = 0;
std::cout << "\n[*] Minimzers -----\n";
while (!minimzers.empty())
{
std::cout << ++count << ": " << minimzers.front() << std::endl;
minimzers.pop();
}
/*
--------------------------------------------------------
Minimzers kmers triples
--------------------------------------------------------
*/
// std::cout << "\n[*] Minimzers kmers triples -----\n" << std::endl;
// InputModuleMinimzers *mini_triples = new InputModuleMinimzers(5, 10);
// vector<mkmh_minimizer> mh = mini_triples->getMinimizers(seq);
// for (auto z : mh)
// {
// cout << "pos: " << z.pos << " len: " << z.length << " seq: " << z.seq << endl;
// }
}