iVar

alignment.h
1 #include<iostream>
2 #include <algorithm>
3 #include<vector>
4 #include<fstream>
5 #include<ctime>
6
7
8 #ifndef primer_bed
9 #define primer_bed
10
11 /* Substitution Matrix
12
13 A T G C N
14 A 1 -1 -1 -1 0
15 T -1 1 -1 -1 0
16 G -1 -1 1 -1 0
17 C -1 -1 -1 1 0
18 N 0 0 0 0 0
19 */
20
21 const int unit_score = 2;
22
23 const int substitution[5][5] = {
24 {unit_score,-unit_score,-unit_score,-unit_score, 0},
25 {-unit_score,unit_score,-unit_score,-unit_score, 0},
26 {-unit_score,-unit_score,unit_score,-unit_score, 0},
27 {-unit_score,-unit_score,-unit_score,unit_score, 0},
28 {0, 0, 0, 0, 0}
29 };
30
31 const int gap_open = unit_score - 1;
32 const int gap_extension = -1;
33 const int max_read_size = 500;
34 const int max_adapter_size = 60;
35 const int MAX_GAP = 2;
36
37 int get_sub_score(char a, char b);
38 int get_gap_penalty(int k, char a);
39 void print_matrix(int h[][max_adapter_size], int r, int c, std::string read, std::string adap);
40 int* get_score_cell(int h[][max_adapter_size], int i, int j, std::string read, std::string adap);
41 void print_alignment(char a[2][max_read_size], int n);
42 int* align_seqs(std::string read, std::string adap);
43 int find_adapters_contaminants(std::istream &cin, std::string adp_cntms_file);
44 int main(int argc, char* argv[]);
45
46 #endif
main
int main(int argc, char *argv[])
Definition: ivar.cpp:144