-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgaf.cpp
More file actions
28 lines (24 loc) · 749 Bytes
/
Copy pathgaf.cpp
File metadata and controls
28 lines (24 loc) · 749 Bytes
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
#include "gaf.hpp"
GAFREC::GAFREC() {}
void GAFREC::write() {
std::ostringstream oss;
oss << qname << "\t" << qlen << "\t" << qs << "\t" << qe << "\t"
<< (strand ? "+" : "-") << "\t";
for (const std::string &v : path)
oss << v;
oss << "\t" << plen << "\t" << ps << "\t" << pe << "\t" << tot_res_matches
<< "\t" << tot_cigar_len << "\t" << mapq << "\t"
<< "AS:i:" << as << "\t"
<< "cg:Z:" << cigar << "\t"
<< "cs:Z:" << cs
<< "\t"
// << "cl:Z:" << (clipped ? 1 : 0) << "\t"
<< "rs:Z:";
oss << reads[0];
for (size_t x = 1; x < reads.size(); ++x)
oss << "|" << reads[x];
oss << "\t"
<< "qs:Z:" << qseq << "\t"
<< "ps:Z:" << pseq << "\n";
std::cout << oss.str();
}