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
8 changes: 5 additions & 3 deletions conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set version = "1.8.0" %}
{% set sha256 = "915a55840e1283fa61db9507d34af479d1f8a985ed7ab56aa7ccc86716a84780" %}
{% set version = "1.8.1" %}
{% set sha256 = "d36f700264e0636d722c783d15e5722792c460235fccb748fbe73c2910a949c8" %}

package:
name: syri
Expand All @@ -17,8 +17,8 @@ build:

requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ stdlib("cxx") }}
host:
- python >=3.9
- setuptools
Expand Down Expand Up @@ -51,3 +51,5 @@ about:
extra:
maintainers:
- mnshgl0110
skip-lints:
- compiler_needs_stdlib_c
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ dependencies = [
"igraph",
"longestrunsubsequence",
'pysam',
"pulp",
]
dynamic = ["version"]

Expand Down
2 changes: 1 addition & 1 deletion syri/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.8.0"
__version__ = "1.8.1"
23 changes: 14 additions & 9 deletions syri/pyxFiles/synsearchFunctions.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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(<Py_ssize_t> n):
for j in range(<Py_ssize_t> i+1, <Py_ssize_t> 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:
Expand Down
Loading