Debian Codegraph @

src/primer_bed.h

raw symbols SCIP
1 #include <algorithm>
2 #include <cstdint>
3 #include <fstream>
4 #include <iostream>
5 #include <sstream>
6 #include <vector>
7
8 #ifndef primer_bed
9 #define primer_bed
10
11 class primer {
12 private:
13 std::string region;
14 uint32_t start; // 0 based
15 uint32_t end; // 0 based
16 std::string name;
17 int score = 0;
18 char strand;
19 int16_t pair_indice;
20 int16_t indice;
21 uint32_t read_count = 0;
22
23 public:
24 std::string get_name();
25 std::string get_region();
26 int get_score();
27 uint32_t get_start() const;
28 uint32_t get_end() const;
29 char get_strand();
30 int get_length();
31 int16_t get_pair_indice();
32 int16_t get_indice() const;
33 uint32_t get_read_count() const;
34 void set_start(uint32_t s);
35 void set_end(uint32_t e);
36 void set_strand(char s);
37 void set_region(std::string r);
38 void set_name(std::string n);
39 void set_score(int s);
40 void set_pair_indice(int16_t i);
41 void set_indice(int16_t i);
42 void set_read_count(uint32_t rc);
43 void add_read_count(uint32_t rc);
44 bool operator==(const primer& p) const {
45 return (indice == p.get_indice()) ? true : false;
46 }
47 };
48
49 std::vector<primer> populate_from_file(std::string path, int32_t offset);
50 std::vector<primer> populate_from_file(std::string path);
51 std::vector<primer> get_primers(std::vector<primer> p, unsigned int pos);
52 int get_primer_indice(std::vector<primer> p, std::string name);
53 int populate_pair_indices(std::vector<primer>& primers, std::string path);
54 void print_primer_info(primer primers);
55 void print_all_primer_info(std::vector<primer> primers);
56 primer get_min_start(std::vector<primer> primers);
57 primer get_max_end(std::vector<primer> primers);
58
59 #endif