Skip to content

Commit

Permalink
Empty sample fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiandeorowicz authored and agudys committed Jun 28, 2024
1 parent 79ab971 commit 1e6033f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libs/zlib-ng
Submodule zlib-ng updated 81 files
+5 −9 .gitattributes
+75 −34 .github/workflows/cmake.yml
+35 −5 .github/workflows/configure.yml
+1 −1 .github/workflows/lint.yml
+3 −3 .github/workflows/pigz.yml
+89 −19 CMakeLists.txt
+2 −2 Makefile.in
+32 −0 PORTING.md
+15 −14 README.md
+4 −4 adler32.c
+15 −0 arch/arm/arm_features.c
+35 −1 arch/arm/arm_functions.h
+7 −0 arch/arm/neon_intrins.h
+1 −1 arch/generic/adler32_fold_c.c
+2 −2 arch/generic/crc32_fold_c.c
+19 −0 arch/generic/generic_functions.h
+37 −0 arch/power/power_functions.h
+8 −1 arch/riscv/riscv_features.c
+24 −0 arch/riscv/riscv_functions.h
+2 −4 arch/riscv/slide_hash_rvv.c
+0 −6 arch/s390/Makefile.in
+34 −41 arch/s390/README.md
+0 −40 arch/s390/dfltcc_common.c
+83 −8 arch/s390/dfltcc_common.h
+9 −30 arch/s390/dfltcc_deflate.c
+3 −5 arch/s390/dfltcc_deflate.h
+57 −90 arch/s390/dfltcc_detail.h
+14 −28 arch/s390/dfltcc_inflate.c
+2 −5 arch/s390/dfltcc_inflate.h
+8 −0 arch/s390/s390_functions.h
+42 −40 arch/s390/self-hosted-builder/actions-runner.Dockerfile
+12 −18 arch/s390/self-hosted-builder/actions-runner.service
+0 −11 arch/s390/self-hosted-builder/qemu-user-static.service
+5 −0 arch/s390/self-hosted-builder/runner-global.json
+243 −0 arch/s390/self-hosted-builder/runner-s390x.patch
+10 −1 arch/x86/x86_features.c
+5 −1 arch/x86/x86_features.h
+102 −0 arch/x86/x86_functions.h
+2 −2 arch/x86/x86_intrins.h
+24 −25 cmake/detect-intrinsics.cmake
+40 −10 configure
+4 −0 cpu_features.h
+2 −2 crc32.c
+147 −59 deflate.c
+22 −3 deflate.h
+1 −1 deflate_fast.c
+17 −32 deflate_medium.c
+1 −1 deflate_quick.c
+2 −2 deflate_slow.c
+1 −1 deflate_stored.c
+6 −2 functable.c
+23 −0 functable.h
+13 −6 infback.c
+127 −85 inflate.c
+22 −4 inflate.h
+11 −10 inflate_p.h
+2 −1 test/CMakeLists.txt
+1 −0 test/benchmarks/CMakeLists.txt
+7 −1 test/benchmarks/benchmark_adler32.cc
+8 −2 test/benchmarks/benchmark_adler32_copy.cc
+6 −0 test/benchmarks/benchmark_compare256.cc
+67 −0 test/benchmarks/benchmark_compress.cc
+7 −1 test/benchmarks/benchmark_crc32.cc
+4 −0 test/benchmarks/benchmark_main.cc
+6 −0 test/benchmarks/benchmark_slidehash.cc
+0 −7 test/infcover.c
+7 −1 test/test_adler32.cc
+0 −48 test/test_aligned_alloc.cc
+10 −4 test/test_compare256.cc
+2 −2 test/test_compare256_rle.cc
+5 −1 test/test_cpu_features.h
+7 −1 test/test_crc32.cc
+2 −0 test/test_dict.cc
+31 −0 test/test_inflate_copy.cc
+4 −1 test/test_main.cc
+3 −3 win32/depcheck.cpp
+67 −0 zbuild.h
+2 −0 zlib-config.cmake.in
+1 −1 zlib.h.in
+0 −48 zutil.c
+1 −9 zutil.h
6 changes: 6 additions & 0 deletions src/prefix_kmer_db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,12 @@ sample_id_t PrefixKmerDb::addKmers(
sample_id_t sampleId = AbstractKmerDb::addKmers(sampleName, kmers, kmersCount, kmerLength, fraction, atp);
uint32_t n_kmers = static_cast<uint32_t>(kmersCount);

if (n_kmers == 0)
{
LOG_NORMAL << "Empty sample: " << sampleName << endl;
return sampleId;
}

// std::fill(stats.workerReallocs.begin(), stats.workerReallocs.end(), 0);
// std::fill(stats.workerAdditions.begin(), stats.workerAdditions.end(), 0);

Expand Down

0 comments on commit 1e6033f

Please sign in to comment.