MCPcopy Create free account
hub / github.com/BirolLab/RNA-Bloom / writeClusterFastaFiles

Method writeClusterFastaFiles

src/rnabloom/olc/Layout.java:2265–2279  ·  view source on GitHub ↗
(ArrayList<ArrayDeque<CompressedFastaRecord>> clusterRecords, String outdir)

Source from the content-addressed store, hash-verified

2263 }
2264
2265 private int[] writeClusterFastaFiles(ArrayList<ArrayDeque<CompressedFastaRecord>> clusterRecords, String outdir) throws IOException {
2266 int size = clusterRecords.size();
2267 int[] counts = new int[size];
2268 for (int cid=0; cid<size; ++cid) {
2269 String filePath = outdir + File.separator + cid + File.separator + cid + FASTA_EXT + GZIP_EXT;
2270 FastaWriter fw = new FastaWriter(filePath, false);
2271 ArrayDeque<CompressedFastaRecord> records = clusterRecords.get(cid);
2272 for (CompressedFastaRecord f : records) {
2273 fw.write(f.name, f.seqbits.toString());
2274 }
2275 fw.close();
2276 counts[cid] = records.size();
2277 }
2278 return counts;
2279 }
2280
2281 public int[] extractClustersFromOverlaps(String outdir, int maxMergedClusterSize) throws IOException {
2282 Timer timer = new Timer();

Callers 1

Calls 5

writeMethod · 0.95
closeMethod · 0.95
getMethod · 0.65
sizeMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected