Skip to content

Commit 12b75da

Browse files
committed
variant calling prototype
1 parent 3fd24eb commit 12b75da

File tree

6 files changed

+450
-534
lines changed

6 files changed

+450
-534
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ LDFLAGS := -pthread
1919
#gfalibs
2020
GFALIBS_DIR := $(CURDIR)/gfalibs
2121

22-
SOURCES := main input graph-builder kreeq subgraph kreeq-output
22+
SOURCES := main input graph-builder kreeq subgraph kreeq-output variants
2323
OBJECTS := $(addprefix $(BINDIR)/, $(SOURCES))
2424

2525
head: $(OBJECTS) gfalibs | $(BUILD)

include/kreeq.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ class DBG : public Kmap<DBG, UserInputKreeq, uint64_t, DBGkmer, DBGkmer32> { //
209209

210210
void printVCF();
211211

212-
bool searchGraph(std::array<uint16_t, 2> mapRange);
212+
void searchGraph();
213213

214214
std::pair<DBGkmer*,bool> findDBGkmer(uint8_t *origin);
215215

@@ -229,6 +229,8 @@ class DBG : public Kmap<DBG, UserInputKreeq, uint64_t, DBGkmer, DBGkmer32> { //
229229

230230
bool DBGtoVariants(InSegment *inSegment);
231231

232+
std::pair<bool,std::deque<DBGpath>> searchVariants(std::pair<const uint64_t,DBGkmer32> source, std::array<uint16_t, 2> mapRange, phmap::parallel_flat_hash_map<uint64_t,bool> &targetsMap, ParallelMap32* localGraphCache);
233+
232234
bool variantsToGFA(InSegment *inSegment, Log &threadLog);
233235

234236
void collapseNodes();

include/variants.h

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#ifndef variants_h
2+
#define variants_h
3+
4+
5+
#endif /* variants_h */

src/input.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,14 @@ void Input::read() {
167167
knav.loadGenome(&genome);
168168
}
169169
knav.subgraph();
170+
171+
lg.verbose("Searching graph");
172+
knav.searchGraph();
173+
lg.verbose("Remove missing edges");
174+
knav.removeMissingEdges();
175+
lg.verbose("Generating GFA");
176+
knav.DBGgraphToGFA();
177+
170178
knav.report(); // output
171179
knav.cleanup(); // delete tmp files
172180
break;

0 commit comments

Comments
 (0)