-
Notifications
You must be signed in to change notification settings - Fork 0
/
read.h
44 lines (30 loc) · 1.21 KB
/
read.h
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
#ifndef READ_H
#define READ_H
#include <vector>
#include <thread>
#include <mutex>
#include "tools.h"
class Read
{
public:
Read(int num_threads);
unsigned int barcode;
short barcode_extension; //here a number to deconvolve the reads
Sequence sequence;
Sequence sequence_paired; //if the read is paired, here is the other end
void new_mini(long int idx, int thread_id);
std::vector<std::vector<long int>> &get_minis();
void get_minis_seq(int k, std::vector<Sequence> &res, int thread_id);
std::vector<std::vector<int>> get_pos_minis();
void compute_minimisers(int k, int h, int w);
void reset_minis_seq_thread (int thread); //a function to clear get_minis_seq when not needed anymore, to free memory
private :
// each long int represents the index of the minimizer in the index
std::vector<std::vector<long int>> minis; //one vector for each thread (in the simplest case, juste a vector)
//each int is the position of a minimizer on the sequence
std::vector<std::vector<int>> minis_seq;
std::vector<std::vector<int>> minis_seq_rev;
std::vector<std::vector<int>> minis_paired_seq;
std::vector<std::vector<int>> minis_paired_seq_rev;
};
#endif // READ_H