From 60fa1978cefffa906a92a044252ec856ea834373 Mon Sep 17 00:00:00 2001 From: Leon Rauschning <99650940+lrauschning@users.noreply.github.com> Date: Wed, 20 May 2026 17:04:19 +0200 Subject: [PATCH 1/4] update conda sha256sum --- conda.recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index 3a0d3c1..e199063 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -1,5 +1,5 @@ {% set version = "1.8.0" %} -{% set sha256 = "915a55840e1283fa61db9507d34af479d1f8a985ed7ab56aa7ccc86716a84780" %} +{% set sha256 = "d36f700264e0636d722c783d15e5722792c460235fccb748fbe73c2910a949c8" %} package: name: syri From f3a9bfd79cf15e6fa0c1ff909f06dfa2b9a22262 Mon Sep 17 00:00:00 2001 From: Leon Rauschning <99650940+lrauschning@users.noreply.github.com> Date: Wed, 20 May 2026 17:57:01 +0200 Subject: [PATCH 2/4] disable c stdlib warning in lint, seems to be how other cython projects do it --- conda.recipe/meta.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index e199063..80cfeb7 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -17,8 +17,8 @@ build: requirements: build: - - {{ compiler('c') }} - {{ compiler('cxx') }} + - {{ stdlib("cxx") }} host: - python >=3.9 - setuptools @@ -51,3 +51,5 @@ about: extra: maintainers: - mnshgl0110 + skip-lints: + - compiler_needs_stdlib_c From 3d6b681438afd6497caccf882903f340532ba198 Mon Sep 17 00:00:00 2001 From: Leon Rauschning <99650940+lrauschning@users.noreply.github.com> Date: Wed, 17 Jun 2026 18:46:05 +0200 Subject: [PATCH 3/4] handle single-aln cases in apply_TS --- pyproject.toml | 1 - syri/pyxFiles/synsearchFunctions.pyx | 23 ++++++++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7674dfa..82f387b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,6 @@ dependencies = [ "igraph", "longestrunsubsequence", 'pysam', - "pulp", ] dynamic = ["version"] diff --git a/syri/pyxFiles/synsearchFunctions.pyx b/syri/pyxFiles/synsearchFunctions.pyx index 892b50b..1058a79 100644 --- a/syri/pyxFiles/synsearchFunctions.pyx +++ b/syri/pyxFiles/synsearchFunctions.pyx @@ -865,20 +865,25 @@ def syri(chromo, threshold, coords, cwdPath, bRT, prefix, tUC, tUP, invgl, tdgl, ######################################################################################################################## -cpdef apply_TS(const long[:] astart, const long[:] aend, const long[:] bstart, const long[:] bend, int threshold, int mxgap = 100000000000): +# builds a matrix indicating which alignments are consistent with one another +cpdef apply_TS(const long[:] astart, const long[:] aend, const long[:] bstart, const long[:] bend, int threshold, int mxgap = 100_000_000_000): cdef: - Py_ssize_t i, j, n = len(astart) + Py_ssize_t i, j # init loop vars + Py_ssize_t n = len(astart) cpp_map[long, cpp_deq[long]] df - cpp_map[long, cpp_deq[long]].iterator mapit # Leon: unused? + #cpp_map[long, cpp_deq[long]].iterator mapit # Leon: unused? + # handle single aln case + if n == 1: + return {0:[0]} + for i in range( n): for j in range( i+1, n): - if (astart[j] - aend[i]) < mxgap: # Select only alignments with small gaps - if (astart[j] - astart[i]) > threshold: + if ((astart[j] - aend[i]) < mxgap) and ((bstart[j] - bend[i]) < mxgap): # Select only alignments with small gaps + if (astart[j] - astart[i]) > threshold: # check compatibility on a if (aend[j] - aend[i]) > threshold: - if (bstart[j] - bend[i]) < mxgap: # Select only alignments with small gaps - if (bstart[j] - bstart[i]) > threshold: - if (bend[j] - bend[i]) > threshold: - df[i].push_back(j) + if (bstart[j] - bstart[i]) > threshold: # check compatibility on b + if (bend[j] - bend[i]) > threshold: + df[i].push_back(j) # add to list of compatible alns out = {} for i in range(n): if df.count(i)== 1: From b039923be1dc1f354a7b4c6479a77e8a84a68514 Mon Sep 17 00:00:00 2001 From: Leon Rauschning <99650940+lrauschning@users.noreply.github.com> Date: Fri, 19 Jun 2026 17:32:26 +0200 Subject: [PATCH 4/4] bump version --- conda.recipe/meta.yaml | 2 +- syri/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index 80cfeb7..27cc945 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -1,4 +1,4 @@ -{% set version = "1.8.0" %} +{% set version = "1.8.1" %} {% set sha256 = "d36f700264e0636d722c783d15e5722792c460235fccb748fbe73c2910a949c8" %} package: diff --git a/syri/__init__.py b/syri/__init__.py index 29654ee..2d986fc 100644 --- a/syri/__init__.py +++ b/syri/__init__.py @@ -1 +1 @@ -__version__ = "1.8.0" +__version__ = "1.8.1"