forked from marbl/canu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import the freshly re-implemented 'meryl' (and 'sequence').
- Loading branch information
1 parent
da012a3
commit 231896d
Showing
29 changed files
with
8,489 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
|
||
/****************************************************************************** | ||
* | ||
* This file is part of 'sequence' and/or 'meryl', software programs for | ||
* working with DNA sequence files and k-mers contained in them. | ||
* | ||
* Modifications by: | ||
* | ||
* Brian P. Walenz beginning on 2018-FEB-26 | ||
* are a 'United States Government Work', and | ||
* are released in the public domain | ||
* | ||
* File 'README.license' in the root directory of this distribution contains | ||
* full conditions and disclaimers. | ||
*/ | ||
|
||
#include "kmers.H" | ||
#include "bits.H" | ||
|
||
int | ||
main(int argc, char **argv) { | ||
|
||
kmerCountFileReader *rr = new kmerCountFileReader(argv[1], false, true); | ||
kmerCountExactLookup *ll = new kmerCountExactLookup(rr); | ||
|
||
delete rr; | ||
|
||
rr = new kmerCountFileReader(argv[2], false, true); | ||
|
||
uint64 tested = 0; | ||
uint64 found = 0; | ||
|
||
while (rr->nextMer()) { | ||
kmer k = rr->theFMer(); | ||
uint32 c = rr->theCount(); | ||
|
||
tested++; | ||
|
||
if (ll->exists(k)) | ||
found++; | ||
|
||
if ((tested % 100000) == 0) | ||
fprintf(stderr, "Tested %lu kmers, found %lu.\n", tested, found); | ||
} | ||
|
||
delete ll; | ||
delete rr; | ||
|
||
fprintf(stderr, "Tested %lu kmers, found %lu.\n", tested, found); | ||
|
||
exit(0); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
# If 'make' isn't run from the root directory, we need to set these to | ||
# point to the upper level build directory. | ||
ifeq "$(strip ${BUILD_DIR})" "" | ||
BUILD_DIR := ../$(OSTYPE)-$(MACHINETYPE)/obj | ||
endif | ||
ifeq "$(strip ${TARGET_DIR})" "" | ||
TARGET_DIR := ../$(OSTYPE)-$(MACHINETYPE) | ||
endif | ||
|
||
TARGET := lookup | ||
SOURCES := lookup.C \ | ||
|
||
SRC_INCDIRS := . utility | ||
|
||
TGT_LDFLAGS := -L${TARGET_DIR}/lib | ||
TGT_LDLIBS := -lsequence -lbits -lkmer -lmeryl | ||
TGT_PREREQS := libmeryl.a | ||
|
||
SUBMAKEFILES := |
Oops, something went wrong.