Skip to content

Commit

Permalink
variant calling prototype
Browse files Browse the repository at this point in the history
  • Loading branch information
gf777 committed Jul 4, 2024
1 parent 3fd24eb commit 12b75da
Show file tree
Hide file tree
Showing 6 changed files with 450 additions and 534 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ LDFLAGS := -pthread
#gfalibs
GFALIBS_DIR := $(CURDIR)/gfalibs

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

head: $(OBJECTS) gfalibs | $(BUILD)
Expand Down
4 changes: 3 additions & 1 deletion include/kreeq.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ class DBG : public Kmap<DBG, UserInputKreeq, uint64_t, DBGkmer, DBGkmer32> { //

void printVCF();

bool searchGraph(std::array<uint16_t, 2> mapRange);
void searchGraph();

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

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

bool DBGtoVariants(InSegment *inSegment);

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);

bool variantsToGFA(InSegment *inSegment, Log &threadLog);

void collapseNodes();
Expand Down
5 changes: 5 additions & 0 deletions include/variants.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#ifndef variants_h
#define variants_h


#endif /* variants_h */
8 changes: 8 additions & 0 deletions src/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,14 @@ void Input::read() {
knav.loadGenome(&genome);
}
knav.subgraph();

lg.verbose("Searching graph");
knav.searchGraph();
lg.verbose("Remove missing edges");
knav.removeMissingEdges();
lg.verbose("Generating GFA");
knav.DBGgraphToGFA();

knav.report(); // output
knav.cleanup(); // delete tmp files
break;
Expand Down
Loading

0 comments on commit 12b75da

Please sign in to comment.