Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
strategy:
fail-fast: false
matrix:
compiler: ["clang-latest", "clang-second-latest", "gcc-latest", "gcc-second-latest", "gcc-third-latest", "intel"]
compiler: ["clang-latest", "clang-second-latest", "gcc-latest", "gcc-second-latest", "intel"]
include:
- compiler: "intel"
cxx_flags: "-fp-model=strict -Wno-overriding-option"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ defaults:
jobs:
build:
name: ${{ matrix.compiler }}
runs-on: macos-14
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
compiler: ["clang-latest", "clang-second-latest", "gcc-latest", "gcc-second-latest", "gcc-third-latest"]
compiler: ["clang-latest", "clang-second-latest", "gcc-latest", "gcc-second-latest"]
steps:
- name: Checkout
uses: actions/checkout@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ defaults:
jobs:
lint:
name: Lint
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: write
Expand Down
4 changes: 2 additions & 2 deletions cmake/CPM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#
# SPDX-FileCopyrightText: Copyright (c) 2019-2023 Lars Melchior and contributors

set (CPM_DOWNLOAD_VERSION 0.42.0)
set (CPM_HASH_SUM "2020b4fc42dba44817983e06342e682ecfc3d2f484a581f11cc5731fbe4dce8a")
set (CPM_DOWNLOAD_VERSION 0.42.1)
set (CPM_HASH_SUM "f3a6dcc6a04ce9e7f51a127307fa4f699fb2bade357a8eb4c5b45df76e1dc6a5")

if (CPM_SOURCE_CACHE)
set (CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
Expand Down
14 changes: 8 additions & 6 deletions cmake/package-lock.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# cmake-format: off

# hibf
set (HIBF_VERSION 7cc3e7119e203b8b65fb6f2ea92cfe3e7645a106 CACHE STRING "")
set (HIBF_VERSION 37108885a53eec0a0d64251ffc60d43bcf9f9b49 CACHE STRING "")
CPMDeclarePackage (hibf
NAME hibf
GIT_TAG ${HIBF_VERSION} # main
Expand All @@ -19,18 +19,19 @@ CPMDeclarePackage (hibf
)

# sharg
set (SHARG_VERSION cafa602ced86f3a347064c5b8188316db09ade72 CACHE STRING "")
set (SHARG_VERSION 1.2.2 CACHE STRING "")
CPMDeclarePackage (sharg
NAME sharg
GIT_TAG ${SHARG_VERSION} # main
VERSION ${SHARG_VERSION}
GIT_TAG ${SHARG_VERSION}
GITHUB_REPOSITORY seqan/sharg-parser
SYSTEM TRUE
EXCLUDE_FROM_ALL TRUE
OPTIONS "INSTALL_SHARG OFF" "INSTALL_TDL OFF" "CMAKE_MESSAGE_LOG_LEVEL WARNING" "SHARG_NO_TDL ON"
)

# seqan3
set (SEQAN3_VERSION 3.4.0 CACHE STRING "")
set (SEQAN3_VERSION 3.4.2 CACHE STRING "")
CPMDeclarePackage (seqan3
NAME seqan3
VERSION ${SEQAN3_VERSION}
Expand All @@ -54,10 +55,11 @@ CPMDeclarePackage (fmt
)

# fmindex
set (FMINDEX_VERSION e35626ba983dde88107709345f1efe49f1ac02e1 CACHE STRING "")
set (FMINDEX_VERSION 1.6.2 CACHE STRING "")
CPMDeclarePackage (fmindex
NAME fmindex
GIT_TAG ${FMINDEX_VERSION} # main
VERSION ${FMINDEX_VERSION} # latest
GIT_TAG v${FMINDEX_VERSION}
GITHUB_REPOSITORY SGSSGene/fmindex-collection
SYSTEM TRUE
EXCLUDE_FROM_ALL TRUE
Expand Down
43 changes: 43 additions & 0 deletions include/fpgalign/utility/compat.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
// SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
// SPDX-License-Identifier: BSD-3-Clause

#pragma once

#include <fmindex-collection/search/SearchNg26.h>

namespace fmc::search_ng26
{

template <bool Edit = true, typename index_t, Sequence query_t, typename delegate_t>
void search(index_t const & index,
query_t && query,
size_t maxErrors,
delegate_t && delegate,
size_t n = std::numeric_limits<size_t>::max())
{
auto selectSearchScheme = [&]([[maybe_unused]] size_t length) -> auto
{
auto const & search_scheme = getCachedSearchScheme<Edit>(0, maxErrors, /*.shortLen=*/(length == 2));
auto const & partition = getCachedPartition(search_scheme[0].pi.size(), length);
return std::tie(search_scheme, partition);
};
size_t ct{};
auto const & [search_scheme, partition] = selectSearchScheme(query.size());
search_impl<Edit>(index,
query,
search_scheme,
partition,
[&](auto cur, size_t e)
{
if (cur.count() + ct > n)
{
cur.len = n - ct;
}
ct += cur.count();
delegate(cur, e);
return ct == n;
});
}

} // namespace fmc::search_ng26
2 changes: 1 addition & 1 deletion src/argument_parsing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// SPDX-License-Identifier: BSD-3-Clause

#include <algorithm> // for find_if
#include <charconv> // for from_chars
#include <cstddef> // for size_t
#include <filesystem> // for operator<<, operator>>
#include <iomanip> // for operator<<, quoted
Expand All @@ -18,6 +17,7 @@
#include <sharg/detail/to_string.hpp> // for to_string
#include <sharg/exceptions.hpp> // for validation_error
#include <sharg/parser.hpp> // for parser
#include <sharg/std/charconv> // for from_chars
#include <sharg/validators.hpp> // for arithmetic_range_validator, input_file_validator, output_file_open_...

#include <fpgalign/argument_parsing.hpp> // for parse_result, subcommand, parse_arguments
Expand Down
3 changes: 2 additions & 1 deletion src/search/do_alignment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// SPDX-License-Identifier: BSD-3-Clause

#include <algorithm> // for find_if
#include <charconv> // for to_chars
#include <cstddef> // for size_t
#include <cstdint> // for uint8_t
#include <filesystem> // for path
Expand All @@ -14,6 +13,8 @@
#include <utility> // for pair
#include <vector> // for vector

#include <sharg/std/charconv> // for to_chars

#include <seqan3/alignment/cigar_conversion/cigar_from_alignment.hpp> // for cigar_from_alignment
#include <seqan3/alignment/configuration/align_config_edit.hpp> // for edit_scheme
#include <seqan3/alignment/configuration/align_config_gap_cost_affine.hpp> // for gap_cost_affine
Expand Down
7 changes: 5 additions & 2 deletions src/search/fmindex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
#include <seqan3/alphabet/nucleotide/dna4.hpp> // for dna4
#include <seqan3/io/sequence_file/record.hpp> // for sequence_record

// clang-format: off
#include <fpgalign/utility/compat.hpp> // IWYU pragma: keep
// clang-format: on

#include <fmindex-collection/fmindex/BiFMIndex.h> // for BiFMIndex
#include <fmindex-collection/search/search.h> // for search

Expand Down Expand Up @@ -45,8 +49,7 @@ void fmindex(config const & config,
{
for (auto j : cursor)
{
auto [entry, offset] = index.locate(j);
auto [seqId, pos] = entry;
auto [seqId, pos, offset] = index.locate(j);
alignment_queue.enqueue(slot,
alignment_info{.query_idx = idx,
.reference_number = seqId,
Expand Down
Loading