| 1 |
#ifndef SEQLIB_UNALIGNED_SEQ_H |
| 2 |
#define SEQLIB_UNALIGNED_SEQ_H |
| 3 |
|
| 4 |
extern "C" { |
| 5 |
#include "bwa/bwa.h" |
| 6 |
#include "bwa/bwt.h" |
| 7 |
#include "bwa/bntseq.h" |
| 8 |
#include "bwa/kseq.h" |
| 9 |
#include <stdlib.h> |
| 10 |
#include "bwa/utils.h" |
| 11 |
#include "bwa/bwamem.h" |
| 12 |
int is_bwt(ubyte_t *T, int n); |
| 13 |
KSEQ_DECLARE(gzFile) |
| 14 |
} |
| 15 |
|
| 16 |
|
| 17 |
#include <cstring> |
| 18 |
#include <vector> |
| 19 |
#include <iostream> |
| 20 |
|
| 21 |
namespace SeqLib { |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
struct UnalignedSequence { |
| 26 |
|
| 27 |
|
| 28 |
UnalignedSequence() {} |
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
UnalignedSequence(const std::string& n, const std::string& s) : Name(n), Com(std::string()), Seq(s), Qual(std::string()), Strand('*') {} |
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
UnalignedSequence(const std::string& n, const std::string& s, const std::string& q) : Name(n), Com(std::string()), Seq(s), Qual(q), Strand('*') {} |
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
UnalignedSequence(const std::string& n, const std::string& s, const std::string& q, char t) : Name(n), Com(std::string()), Seq(s), Qual(q), Strand(t) {} |
| 50 |
|
| 51 |
std::string Name; |
| 52 |
std::string Com; |
| 53 |
std::string Seq; |
| 54 |
std::string Qual; |
| 55 |
char Strand; |
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
friend std::ostream& operator<<(std::ostream& os, const SeqLib::UnalignedSequence& us){ |
| 62 |
os << "@" << us.Name << " " << us.Com << "\n"; |
| 63 |
os << us.Seq << "\n+\n"; |
| 64 |
os << us.Qual << "\n"; |
| 65 |
return os; |
| 66 |
} |
| 67 |
}; |
| 68 |
|
| 69 |
typedef std::vector<UnalignedSequence> UnalignedSequenceVector; |
| 70 |
|
| 71 |
} |
| 72 |
|
| 73 |
#endif |