(HashMap<Integer, ArrayDeque<CompressedFastaRecord>> clusterRecords,
String outdir, boolean append)
| 2491 | } |
| 2492 | |
| 2493 | private void emptyClusterFastaBuffer(HashMap<Integer, ArrayDeque<CompressedFastaRecord>> clusterRecords, |
| 2494 | String outdir, boolean append) throws IOException { |
| 2495 | if (!clusterRecords.isEmpty()) { |
| 2496 | for (Map.Entry<Integer, ArrayDeque<CompressedFastaRecord>> e : clusterRecords.entrySet()) { |
| 2497 | int cid = e.getKey(); |
| 2498 | String filePath = outdir + File.separator + cid + File.separator + cid + FASTA_EXT + GZIP_EXT; |
| 2499 | FastaWriter fw = new FastaWriter(filePath, append); |
| 2500 | for (CompressedFastaRecord f : e.getValue()) { |
| 2501 | fw.write(f.name, f.seqbits.toString()); |
| 2502 | } |
| 2503 | fw.close(); |
| 2504 | } |
| 2505 | clusterRecords.clear(); |
| 2506 | } |
| 2507 | } |
| 2508 | |
| 2509 | private void emptyOrphanRecords(ArrayDeque<CompressedFastaRecord> records, |
| 2510 | String outdir, boolean append) throws IOException { |
no test coverage detected