| 1 |
\hypertarget{Unitig_8hpp_source}{}\doxysection{Unitig.\+hpp} |
| 2 |
\label{Unitig_8hpp_source}\index{src/Unitig.hpp@{src/Unitig.hpp}} |
| 3 |
\mbox{\hyperlink{Unitig_8hpp}{Go to the documentation of this file.}} |
| 4 |
\begin{DoxyCode}{0} |
| 5 |
\DoxyCodeLine{1 \textcolor{preprocessor}{\#ifndef BIFROST\_UNITIG\_HPP}} |
| 6 |
\DoxyCodeLine{2 \textcolor{preprocessor}{\#define BIFROST\_UNITIG\_HPP}} |
| 7 |
\DoxyCodeLine{3 } |
| 8 |
\DoxyCodeLine{4 \textcolor{preprocessor}{\#include "{}Common.hpp"{}}} |
| 9 |
\DoxyCodeLine{5 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{Kmer_8hpp}{Kmer.hpp}}"{}}} |
| 10 |
\DoxyCodeLine{6 \textcolor{preprocessor}{\#include "{}CompressedSequence.hpp"{}}} |
| 11 |
\DoxyCodeLine{7 \textcolor{preprocessor}{\#include "{}CompressedCoverage.hpp"{}}} |
| 12 |
\DoxyCodeLine{8 } |
| 13 |
\DoxyCodeLine{21 \textcolor{keyword}{template}<\textcolor{keyword}{typename} T = \textcolor{keywordtype}{void}>} |
| 14 |
\DoxyCodeLine{22 \textcolor{keyword}{class }\mbox{\hyperlink{classUnitig}{Unitig}} \{} |
| 15 |
\DoxyCodeLine{23 } |
| 16 |
\DoxyCodeLine{24 \textcolor{keyword}{public}:} |
| 17 |
\DoxyCodeLine{25 } |
| 18 |
\DoxyCodeLine{26 \mbox{\hyperlink{classUnitig}{Unitig}}() \{\}} |
| 19 |
\DoxyCodeLine{27 \mbox{\hyperlink{classUnitig}{Unitig}}(\textcolor{keyword}{const} CompressedSequence\& s, \textcolor{keyword}{const} CompressedCoverage\& c) : seq(s), cov(c) \{\}} |
| 20 |
\DoxyCodeLine{28 \mbox{\hyperlink{classUnitig}{Unitig}}(CompressedSequence\&\& s, CompressedCoverage\&\& c) : seq(move(s)), cov(move(c)) \{\}} |
| 21 |
\DoxyCodeLine{29 \mbox{\hyperlink{classUnitig}{Unitig}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* s, \textcolor{keywordtype}{bool} full = \textcolor{keyword}{false}) : seq(s), cov(seq.size() -\/ Kmer::k + 1, full) \{\}} |
| 22 |
\DoxyCodeLine{30 } |
| 23 |
\DoxyCodeLine{31 BFG\_INLINE \textcolor{keywordtype}{size\_t} numKmers()\textcolor{keyword}{ const }\{} |
| 24 |
\DoxyCodeLine{32 } |
| 25 |
\DoxyCodeLine{33 \textcolor{keywordflow}{return} seq.size( ) -\/ Kmer::k + 1;} |
| 26 |
\DoxyCodeLine{34 \}} |
| 27 |
\DoxyCodeLine{35 } |
| 28 |
\DoxyCodeLine{36 BFG\_INLINE \textcolor{keywordtype}{size\_t} length()\textcolor{keyword}{ const }\{} |
| 29 |
\DoxyCodeLine{37 } |
| 30 |
\DoxyCodeLine{38 \textcolor{keywordflow}{return} seq.size();} |
| 31 |
\DoxyCodeLine{39 \}} |
| 32 |
\DoxyCodeLine{40 } |
| 33 |
\DoxyCodeLine{41 BFG\_INLINE \textcolor{keyword}{const} CompressedSequence\& getSeq()\textcolor{keyword}{ const }\{} |
| 34 |
\DoxyCodeLine{42 } |
| 35 |
\DoxyCodeLine{43 \textcolor{keywordflow}{return} seq;} |
| 36 |
\DoxyCodeLine{44 \}} |
| 37 |
\DoxyCodeLine{45 } |
| 38 |
\DoxyCodeLine{46 BFG\_INLINE CompressedSequence\& getSeq() \{} |
| 39 |
\DoxyCodeLine{47 } |
| 40 |
\DoxyCodeLine{48 \textcolor{keywordflow}{return} seq;} |
| 41 |
\DoxyCodeLine{49 \}} |
| 42 |
\DoxyCodeLine{50 } |
| 43 |
\DoxyCodeLine{51 BFG\_INLINE \textcolor{keyword}{const} CompressedCoverage\& getCov()\textcolor{keyword}{ const }\{} |
| 44 |
\DoxyCodeLine{52 } |
| 45 |
\DoxyCodeLine{53 \textcolor{keywordflow}{return} cov;} |
| 46 |
\DoxyCodeLine{54 \}} |
| 47 |
\DoxyCodeLine{55 } |
| 48 |
\DoxyCodeLine{56 BFG\_INLINE CompressedCoverage\& getCov() \{} |
| 49 |
\DoxyCodeLine{57 } |
| 50 |
\DoxyCodeLine{58 \textcolor{keywordflow}{return} cov;} |
| 51 |
\DoxyCodeLine{59 \}} |
| 52 |
\DoxyCodeLine{60 } |
| 53 |
\DoxyCodeLine{61 BFG\_INLINE \textcolor{keyword}{const} T* getData()\textcolor{keyword}{ const }\{} |
| 54 |
\DoxyCodeLine{62 } |
| 55 |
\DoxyCodeLine{63 \textcolor{keywordflow}{return} \&data;} |
| 56 |
\DoxyCodeLine{64 \}} |
| 57 |
\DoxyCodeLine{65 } |
| 58 |
\DoxyCodeLine{66 BFG\_INLINE T* getData() \{} |
| 59 |
\DoxyCodeLine{67 } |
| 60 |
\DoxyCodeLine{68 \textcolor{keywordflow}{return} \&data;} |
| 61 |
\DoxyCodeLine{69 \}} |
| 62 |
\DoxyCodeLine{70 } |
| 63 |
\DoxyCodeLine{71 \textcolor{keyword}{private}:} |
| 64 |
\DoxyCodeLine{72 } |
| 65 |
\DoxyCodeLine{73 CompressedSequence seq;} |
| 66 |
\DoxyCodeLine{74 CompressedCoverage cov;} |
| 67 |
\DoxyCodeLine{75 } |
| 68 |
\DoxyCodeLine{76 T data;} |
| 69 |
\DoxyCodeLine{77 \};} |
| 70 |
\DoxyCodeLine{78 } |
| 71 |
\DoxyCodeLine{80 \textcolor{keyword}{template}<>} |
| 72 |
\DoxyCodeLine{81 \textcolor{keyword}{class }\mbox{\hyperlink{classUnitig}{Unitig}}<void> \{} |
| 73 |
\DoxyCodeLine{82 } |
| 74 |
\DoxyCodeLine{83 \textcolor{keyword}{public}:} |
| 75 |
\DoxyCodeLine{84 } |
| 76 |
\DoxyCodeLine{85 \mbox{\hyperlink{classUnitig}{Unitig}}() \{\}} |
| 77 |
\DoxyCodeLine{86 \mbox{\hyperlink{classUnitig}{Unitig}}(\textcolor{keyword}{const} CompressedSequence\& s, \textcolor{keyword}{const} CompressedCoverage\& c) : seq(s), cov(c) \{\}} |
| 78 |
\DoxyCodeLine{87 \mbox{\hyperlink{classUnitig}{Unitig}}(CompressedSequence\&\& s, CompressedCoverage\&\& c) : seq(move(s)), cov(move(c)) \{\}} |
| 79 |
\DoxyCodeLine{88 \mbox{\hyperlink{classUnitig}{Unitig}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* s, \textcolor{keywordtype}{bool} full = \textcolor{keyword}{false}) : seq(s), cov(seq.size() -\/ \mbox{\hyperlink{classKmer}{Kmer}}::k + 1, full) \{\}} |
| 80 |
\DoxyCodeLine{89 } |
| 81 |
\DoxyCodeLine{90 BFG\_INLINE \textcolor{keywordtype}{size\_t} numKmers()\textcolor{keyword}{ const }\{} |
| 82 |
\DoxyCodeLine{91 } |
| 83 |
\DoxyCodeLine{92 \textcolor{keywordflow}{return} seq.size( ) -\/ Kmer::k + 1;} |
| 84 |
\DoxyCodeLine{93 \}} |
| 85 |
\DoxyCodeLine{94 } |
| 86 |
\DoxyCodeLine{95 BFG\_INLINE \textcolor{keywordtype}{size\_t} length()\textcolor{keyword}{ const }\{} |
| 87 |
\DoxyCodeLine{96 } |
| 88 |
\DoxyCodeLine{97 \textcolor{keywordflow}{return} seq.size();} |
| 89 |
\DoxyCodeLine{98 \}} |
| 90 |
\DoxyCodeLine{99 } |
| 91 |
\DoxyCodeLine{100 BFG\_INLINE \textcolor{keyword}{const} CompressedSequence\& getSeq()\textcolor{keyword}{ const }\{} |
| 92 |
\DoxyCodeLine{101 } |
| 93 |
\DoxyCodeLine{102 \textcolor{keywordflow}{return} seq;} |
| 94 |
\DoxyCodeLine{103 \}} |
| 95 |
\DoxyCodeLine{104 } |
| 96 |
\DoxyCodeLine{105 BFG\_INLINE CompressedSequence\& getSeq() \{} |
| 97 |
\DoxyCodeLine{106 } |
| 98 |
\DoxyCodeLine{107 \textcolor{keywordflow}{return} seq;} |
| 99 |
\DoxyCodeLine{108 \}} |
| 100 |
\DoxyCodeLine{109 } |
| 101 |
\DoxyCodeLine{110 BFG\_INLINE \textcolor{keyword}{const} CompressedCoverage\& getCov()\textcolor{keyword}{ const }\{} |
| 102 |
\DoxyCodeLine{111 } |
| 103 |
\DoxyCodeLine{112 \textcolor{keywordflow}{return} cov;} |
| 104 |
\DoxyCodeLine{113 \}} |
| 105 |
\DoxyCodeLine{114 } |
| 106 |
\DoxyCodeLine{115 BFG\_INLINE CompressedCoverage\& getCov() \{} |
| 107 |
\DoxyCodeLine{116 } |
| 108 |
\DoxyCodeLine{117 \textcolor{keywordflow}{return} cov;} |
| 109 |
\DoxyCodeLine{118 \}} |
| 110 |
\DoxyCodeLine{119 } |
| 111 |
\DoxyCodeLine{120 BFG\_INLINE \textcolor{keyword}{const} \textcolor{keywordtype}{void}* getData()\textcolor{keyword}{ const }\{} |
| 112 |
\DoxyCodeLine{121 } |
| 113 |
\DoxyCodeLine{122 \textcolor{keywordflow}{return} \textcolor{keyword}{nullptr};} |
| 114 |
\DoxyCodeLine{123 \}} |
| 115 |
\DoxyCodeLine{124 } |
| 116 |
\DoxyCodeLine{125 BFG\_INLINE \textcolor{keywordtype}{void}* getData() \{} |
| 117 |
\DoxyCodeLine{126 } |
| 118 |
\DoxyCodeLine{127 \textcolor{keywordflow}{return} \textcolor{keyword}{nullptr};} |
| 119 |
\DoxyCodeLine{128 \}} |
| 120 |
\DoxyCodeLine{129 } |
| 121 |
\DoxyCodeLine{130 \textcolor{keyword}{private}:} |
| 122 |
\DoxyCodeLine{131 } |
| 123 |
\DoxyCodeLine{132 CompressedSequence seq;} |
| 124 |
\DoxyCodeLine{133 CompressedCoverage cov;} |
| 125 |
\DoxyCodeLine{134 \};} |
| 126 |
\DoxyCodeLine{136 } |
| 127 |
\DoxyCodeLine{137 \textcolor{preprocessor}{\#endif }\textcolor{comment}{// BFG\_CONTIG\_HPP}} |
| 128 |
|
| 129 |
\end{DoxyCode} |