Skip to content

Commit

Permalink
small bug fix and add note about streaming k-mers through instead of …
Browse files Browse the repository at this point in the history
…reads through. #15
  • Loading branch information
dkoslicki committed Apr 2, 2020
1 parent 6e26050 commit 0968601
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CMash/Query.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,9 @@ def intersect(self):
if self.verbose:
print("dumping intersection to FASTA file")
if self.verbose:
# replacing out_path with in_path would mean we stream all the read k-mers through, instead of all the reads through
# this may speed things up in real-world applications, and it returns (basically) the same results
# so might be worth considering...
res = subprocess.run(f"{self.kmc_dump} -ci0 {out_path} {dump_path}", shell=True)
else:
res = subprocess.run(f"{self.kmc_dump} -ci0 {out_path} {dump_path}", shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
Expand Down
2 changes: 1 addition & 1 deletion scripts/StreamingQueryDNADatabase.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def map_func(sequence):
intersecter.compute_intersection()
#print("intersection located at: {}".format(intersecter.out_file))
# change query file to the intersection file
query_file = intersecter.out_file
query_file = intersecter.final_out_file
# Open the file to prepare for processing
fid = khmer.ReadParser(query_file) # This is faster than screed
match_tuples = []
Expand Down

0 comments on commit 0968601

Please sign in to comment.