diff --git a/.github/workflows/dnmtools_release_linux.yml b/.github/workflows/dnmtools_release_linux.yml index d4f12f78..23bce442 100644 --- a/.github/workflows/dnmtools_release_linux.yml +++ b/.github/workflows/dnmtools_release_linux.yml @@ -59,7 +59,7 @@ jobs: cd /workspace && \ autoreconf -i && \ mkdir build && cd build && \ - ../configure --with-libdeflate && \ + ../configure --with-libdeflate --with-htsmods && \ ../data/make_full_license_info_header.sh ../data/LICENSE > license.h && \ echo "#define INCLUDE_FULL_LICENSE_INFO 1" >> config.h && \ make -j4 LDFLAGS="-static-libgcc -static-libstdc++ -s" && \ diff --git a/.github/workflows/dnmtools_release_macos.yml b/.github/workflows/dnmtools_release_macos.yml index 54f48513..eeca2b16 100644 --- a/.github/workflows/dnmtools_release_macos.yml +++ b/.github/workflows/dnmtools_release_macos.yml @@ -54,7 +54,7 @@ jobs: run: | ./autogen.sh mkdir build && cd build - ../configure --with-libdeflate \ + ../configure --with-libdeflate --with-htsmods \ CXX=g++-14 \ LDFLAGS="-L/opt/dnmtools/lib -static-libgcc -static-libstdc++ -Wl,-dead_strip" \ CPPFLAGS="-I/opt/dnmtools/include" diff --git a/src/analysis/nanopore.cpp b/src/analysis/nanopore.cpp index 0027e74a..e44b5ee5 100644 --- a/src/analysis/nanopore.cpp +++ b/src/analysis/nanopore.cpp @@ -942,14 +942,16 @@ valid_modification_types(const std::string &infile, // ADS: or bam_parse_basemod2(aln.b, m, HTS_MOD_REPORT_UNCHECKED) int n_types{}; const auto types = bam_mods_recorded(m.get(), &n_types); - valid_types = (n_types == 1 && types[0] == 'C') || - (n_types >= 2 && types[0] == 'h' && types[1] == 'm'); + // clang-format off + valid_types = ((n_types == 0) || + (n_types == 1 && types[0] == 'C') || + (n_types >= 2 && types[0] == 'h' && types[1] == 'm')); + // clang-format on if (!valid_types) { message = "n_types: " + std::to_string(n_types) + "\n"; - for (auto i = 0; i < n_types; ++i) { + for (auto i = 0; i < n_types; ++i) message += "type[" + std::to_string(i) + "]=" + std::to_string(static_cast(types[i])) + "\n"; - } } } return std::make_pair(valid_types, message);