diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index 3a0d3c1..27cc945 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -1,5 +1,5 @@ -{% set version = "1.8.0" %} -{% set sha256 = "915a55840e1283fa61db9507d34af479d1f8a985ed7ab56aa7ccc86716a84780" %} +{% set version = "1.8.1" %} +{% set sha256 = "d36f700264e0636d722c783d15e5722792c460235fccb748fbe73c2910a949c8" %} package: name: syri @@ -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 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/__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" 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: