Skip to content

Commit 44b15d7

Browse files
author
kjenike1
committed
updated
1 parent d684205 commit 44b15d7

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

cpp/Makefile

+2-4
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ INCLUDE=./htslib
77
SRC=.
88
BUILD=build
99

10-
#ANCHOR_BIN=anchor
11-
#SW_BIN = $(BIN)/sw
1210

1311
KMC_API_DIR = ../KMC/kmc_api
1412
KMC_DUMP_DIR = ../KMC/kmc_dump
@@ -28,9 +26,9 @@ OBJS = $(patsubst %, $(BUILD)/%, $(_OBJS))
2826

2927
DEPENDS := $(patsubst %.o, %.d, $(OBJS))
3028

31-
all: dirs anchor
29+
all: dirs run_anchor
3230

33-
anchor: build/anchor.o
31+
run_anchor: build/anchor.o
3432
$(CC) $(KMC_API_OBJS) $(CFLAGS) $< -o $@ -lz $(HTS_LIB) $(LIBS)
3533

3634
-include $(DEPENDS)

cpp/anchor.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ struct KMCdb {
8080

8181
size_t s = name.find(' ');
8282
chrs_out << name.substr(0,s) << "\t" << chr_num << "\t" << ksize << "\t0\n";
83+
chrs_out.flush();
8384
chr_num += 1;
8485
}
8586
name = line.substr(1);
@@ -92,6 +93,7 @@ struct KMCdb {
9293
auto ksize = write_bits(chr_num, seq, bitmap1, bitmap100, bitsum_out);
9394
size_t s = name.find(' ');
9495
chrs_out << name.substr(0,s) << "\t" << chr_num << "\t" << ksize << "\t0\n";
96+
chrs_out.flush();
9597
}
9698

9799
bgzf_index_dump(bitmap1, basename.c_str(), ".gzi");
@@ -169,6 +171,7 @@ struct KMCdb {
169171
bitsum_out << "\t" << c;
170172
}
171173
bitsum_out << "\n";
174+
bitsum_out.flush();
172175
}
173176
return popcnts.size();
174177

0 commit comments

Comments
 (0)