1 #ifndef BIFROST_UNITIG_HPP
2 #define BIFROST_UNITIG_HPP
6 #include "CompressedSequence.hpp"
7 #include "CompressedCoverage.hpp"
21 template<
typename T =
void>
27 Unitig(
const CompressedSequence& s,
const CompressedCoverage& c) : seq(s), cov(c) {}
28 Unitig(CompressedSequence&& s, CompressedCoverage&& c) : seq(move(s)), cov(move(c)) {}
29 Unitig(
const char* s,
bool full =
false) : seq(s), cov(seq.size() - Kmer::k + 1, full) {}
31 BFG_INLINE
size_t numKmers()
const {
33 return seq.size( ) - Kmer::k + 1;
36 BFG_INLINE
size_t length()
const {
41 BFG_INLINE
const CompressedSequence& getSeq()
const {
46 BFG_INLINE CompressedSequence& getSeq() {
51 BFG_INLINE
const CompressedCoverage& getCov()
const {
56 BFG_INLINE CompressedCoverage& getCov() {
61 BFG_INLINE
const T* getData()
const {
66 BFG_INLINE T* getData() {
73 CompressedSequence seq;
74 CompressedCoverage cov;
86 Unitig(
const CompressedSequence& s,
const CompressedCoverage& c) : seq(s), cov(c) {}
87 Unitig(CompressedSequence&& s, CompressedCoverage&& c) : seq(move(s)), cov(move(c)) {}
88 Unitig(
const char* s,
bool full =
false) : seq(s), cov(seq.size() -
Kmer::k + 1, full) {}
90 BFG_INLINE
size_t numKmers()
const {
92 return seq.size( ) - Kmer::k + 1;
95 BFG_INLINE
size_t length()
const {
100 BFG_INLINE
const CompressedSequence& getSeq()
const {
105 BFG_INLINE CompressedSequence& getSeq() {
110 BFG_INLINE
const CompressedCoverage& getCov()
const {
115 BFG_INLINE CompressedCoverage& getCov() {
120 BFG_INLINE
const void* getData()
const {
125 BFG_INLINE
void* getData() {
132 CompressedSequence seq;
133 CompressedCoverage cov;
137 #endif // BFG_CONTIG_HPP