ContextSV 0.0.1
Integrative SV calling.
All Classes Files Functions Variables Typedefs Macros
sv_data.h
Go to the documentation of this file.
1#ifndef SV_DATA_H
2#define SV_DATA_H
3
4#include "fasta_query.h" // For querying the reference genome
5#include "types.h"
6
8#include <string>
9#include <map>
11
12
13class SVData {
14 private:
15 // SV candidate to read depth map
17
18 // Store a reference to the reference genome
20
21 // SV type to string map
22 std::map<int, std::string> sv_type_map = {
23 {0, "DEL"},
24 {1, "DUP"},
25 {2, "INV"},
26 {3, "INS"},
27 {4, "BND"}
28 };
29
30 public:
32 void addSVCall(std::string chr, int start, int end, int sv_type, std::string alt_allele);
33 //void addSVCalls(SVData sv_calls);
34
35 std::string getRefGenome();
36
37 // Query the reference genome for a given sequence
38 std::string getSequence(std::string chr, int pos_start, int pos_end);
39
40 // Update the SV type for a given SV candidate
41 void updateSVType(SVCandidate key, int sv_type);
42
43 // Save SV calls to VCF
44 void saveToVCF(FASTAQuery& ref_genome, std::string output_dir);
45
46 // Begin and end iterators for the SV candidate map
47 SVDepthMap::iterator begin() { return this->sv_calls.begin(); }
48 SVDepthMap::iterator end() { return this->sv_calls.end(); }
49};
50
51#endif // SV_DATA_H
Definition fasta_query.h:11
Definition sv_data.h:13
void updateSVType(SVCandidate key, int sv_type)
Definition sv_data.cpp:42
void addSVCall(std::string chr, int start, int end, int sv_type, std::string alt_allele)
Definition sv_data.cpp:8
std::string getRefGenome()
Definition sv_data.cpp:31
FASTAQuery * ref_genome
Definition sv_data.h:19
std::map< int, std::string > sv_type_map
Definition sv_data.h:22
SVDepthMap::iterator begin()
Definition sv_data.h:47
void saveToVCF(FASTAQuery &ref_genome, std::string output_dir)
Definition sv_data.cpp:54
SVDepthMap::iterator end()
Definition sv_data.h:48
std::string getSequence(std::string chr, int pos_start, int pos_end)
Definition sv_data.cpp:36
SVDepthMap sv_calls
Definition sv_data.h:16
std::map< SVCandidate, SVInfo > SVDepthMap
Definition types.h:22
std::tuple< std::string, int, int, std::string > SVCandidate
Definition types.h:20