From e6c9c8eb4132db04f3beebb3d9172676d952a8d9 Mon Sep 17 00:00:00 2001 From: Julian Libiseller-Egger Date: Mon, 2 Oct 2023 18:10:53 +0000 Subject: [PATCH] Update spoa and add `min_coverage` param --- CHANGELOG.md | 6 ++++++ pyspoa.cpp | 7 ++++--- setup.py | 2 +- src | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86f120a..2c7523c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v0.2.0] +### Changed +- Updated SPOA to v4.1.2 +### Added +- `min_coverage` option recently introduced in SPOA + ## [v0.1.0] ### Changed - Moved CI to internal infrastructure diff --git a/pyspoa.cpp b/pyspoa.cpp index 6b1e27f..c405f47 100644 --- a/pyspoa.cpp +++ b/pyspoa.cpp @@ -5,7 +5,7 @@ using namespace pybind11::literals; // for _a in pybind def auto poa(std::vector sequences, int algorithm, bool genmsa, - int m, int n, int g, int e, int q, int c) -> pybind11::tuple + int m, int n, int g, int e, int q, int c, int min_coverage) -> pybind11::tuple { auto alignment_engine = spoa::AlignmentEngine::Create( static_cast(algorithm), m, n, g, e, q, c @@ -18,7 +18,7 @@ auto poa(std::vector sequences, int algorithm, bool genmsa, graph.AddAlignment(alignment, it); } - auto consensus = graph.GenerateConsensus(); + auto consensus = graph.GenerateConsensus(min_coverage); std::vector msa; if (genmsa) msa = graph.GenerateMultipleSequenceAlignment(); @@ -30,7 +30,8 @@ PYBIND11_MODULE(spoa, m) { m.def( "poa", &poa, "", "sequences"_a, "algorithm"_a=0, "genmsa"_a=true, - "m"_a=5, "n"_a=-4, "g"_a=-8, "e"_a=-6, "q"_a=-10, "c"_a=-4 + "m"_a=5, "n"_a=-4, "g"_a=-8, "e"_a=-6, "q"_a=-10, "c"_a=-4, + "min_coverage"_a=-1 ); m.attr("__version__") = VERSION_INFO; diff --git a/setup.py b/setup.py index 2df4c65..883b3db 100644 --- a/setup.py +++ b/setup.py @@ -139,7 +139,7 @@ def build_extensions(self): setup( name='pyspoa', - version='0.1.0', + version='0.2.0', author='Oxford Nanoporetech Technologies, Ltd.', author_email='support@nanoporetech.com', url='https://github.com/nanoporetech/pyspoa', diff --git a/src b/src index 981ad59..1ab9ab0 160000 --- a/src +++ b/src @@ -1 +1 @@ -Subproject commit 981ad5921c989948b37e821f6f47e8e23873cf28 +Subproject commit 1ab9ab076171e5e4f5fcd4d2a2369f26c7f8f48f