| 316 | } |
| 317 | |
| 318 | void writeBaseCountsJson(ofstream& ofs, string pad, string key, long total, long (&counts)[4]) { |
| 319 | ofs << pad << "\t\"total_" << key << "\": " << total << "," << endl; |
| 320 | ofs << pad << "\t\"" << key << "\":{"; |
| 321 | for (int b=0; b<4; b++) { |
| 322 | if(b > 0) |
| 323 | ofs << ", "; |
| 324 | ofs << "\"" << ATCG_BASES[b] << "\": " << counts[b]; |
| 325 | } |
| 326 | ofs << "}"; |
| 327 | } |
| 328 | |
| 329 | void FilterResult::reportPolyXTrimJson(ofstream& ofs, string padding) { |
| 330 | ofs << padding << "{" << endl; |