-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathRead.h
73 lines (57 loc) · 2.1 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
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
// 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]
#ifndef READ_H
#define READ_H
#include <string>
#include <fstream>
#include <vector>
#include "structs.h"
class Read
{
public:
// ---- Ctors ----
//
Read();
Read(std::string& seq, std::string& id);
// ---------------
// print the matching info of this read to ofs
// FORMAT:
// Chromosome\tPosition\tKmerOverlap\tReadSeq\n*
// , where
// Chromosome is the index of the chromosome
// Position is the 0 based offset in the chromosome
// KmerOverlap is the number of kmers that match the position
// (up to ReadSize - MyConst::KMERLEN + 1)
// ReadSeq is the sequence of the read
//
// done for each match
//
void printMatch(std::ofstream& ofs);
// print the matching info to ofs in SAM format
void printMatchSam(std::ofstream& ofs);
std::string id;
// (DNA) sequence of the read
std::string seq;
// The matching positions of the read
MATCH::match mat;
// flag stating if read has an N in sequence or is too small (< Kmerlength)
// OR maps to multiple locations in the genome
// if this is the case, it won't be processed
bool isInvalid;
};
#endif /* READ_H */