-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCONST.cpp
69 lines (54 loc) · 2.18 KB
/
CONST.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
// Metal - A fast methylation alignment and calling tool for WGBS data.
// Copyright (C) 2017 Jonas Fischer
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// Jonas Fischer [email protected]
#include <iostream>
#include "CONST.h"
void MyConst::sanityChecks()
{
if (MyConst::KMERLEN >= 33)
{
std::cerr << "The chosen length for kmers is too large. Maximum value allowed is 32. Please redefine KMERLEN.\n\n";
exit(1);
}
if (MyConst::KMERLEN != SEED.size())
{
std::cerr << "Specified k-mer length KMERLEN and length of the seed SEED differ!\n\n";
exit(1);
}
if (MyConst::KMERLEN != MyConst::SEED.size())
{
std::cerr << "Seed size is different from k-mer length! Aborting.\n\n";
exit(1);
}
if (MyConst::READLEN <= MyConst::KMERLEN)
{
std::cerr << "The chosen maximum read length is smaller then the k (length of a kmer). Please chose another value for either of the two (READLEN, KMERLEN).\n\n";
exit(1);
}
if (MyConst::MISCOUNT >= 3)
{
std::cout << "The chosen number of allowed mismatches (" << MyConst::MISCOUNT << ") is quite large. Some of the heuristics won't work.\n\n";
}
if (MyConst::WINLEN <= (1 << 9))
{
std::cout << "The chosen Meta CpG window length (" << MyConst::WINLEN << ") is quite small. You should consider redefining WINLEN (default is 2^12).\n\n";
}
if (MyConst::HTABSIZE < 2 << 16)
{
std::cout << "The chosen size of your hash table (" << MyConst::HTABSIZE << ") is quite small. You should consider redefining HTABSIZE (default is 2^30 for the human genome).\n\n";
}
}