Write a bubble to the specified file. */
| 222 | |
| 223 | /** Write a bubble to the specified file. */ |
| 224 | static inline |
| 225 | void writeBubble(std::ostream& out, const BranchGroup& group, unsigned id) |
| 226 | { |
| 227 | if (opt::snpPath.empty()) |
| 228 | return; |
| 229 | |
| 230 | char allele = 'A'; |
| 231 | for (BranchGroup::const_iterator it = group.begin(); |
| 232 | it != group.end(); ++it) { |
| 233 | const BranchRecord& currBranch = *it; |
| 234 | Sequence contig(currBranch); |
| 235 | out << '>' << id << allele++ << ' ' |
| 236 | << contig.length() << ' ' |
| 237 | << currBranch.calculateBranchMultiplicity() << '\n' |
| 238 | << contig.c_str() << '\n'; |
| 239 | } |
| 240 | assert_good(out, opt::snpPath); |
| 241 | } |
| 242 | |
| 243 | /** Collapse a bubble to a single path. */ |
| 244 | template <typename Graph> |
no test coverage detected