minimap2 0.2.25.0 → 0.2.25.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -3
- data/ext/Rakefile +2 -2
- data/ext/minimap2/Makefile +6 -2
- data/ext/minimap2/NEWS.md +38 -0
- data/ext/minimap2/README.md +9 -3
- data/ext/minimap2/align.c +5 -3
- data/ext/minimap2/cookbook.md +2 -2
- data/ext/minimap2/format.c +7 -4
- data/ext/minimap2/kalloc.c +20 -1
- data/ext/minimap2/kalloc.h +13 -2
- data/ext/minimap2/ksw2.h +1 -0
- data/ext/minimap2/ksw2_extd2_sse.c +1 -1
- data/ext/minimap2/ksw2_exts2_sse.c +79 -40
- data/ext/minimap2/ksw2_extz2_sse.c +1 -1
- data/ext/minimap2/lchain.c +15 -16
- data/ext/minimap2/main.c +13 -6
- data/ext/minimap2/map.c +0 -5
- data/ext/minimap2/minimap.h +40 -31
- data/ext/minimap2/minimap2.1 +19 -5
- data/ext/minimap2/misc/paftools.js +545 -24
- data/ext/minimap2/options.c +1 -1
- data/ext/minimap2/pyproject.toml +2 -0
- data/ext/minimap2/python/mappy.pyx +3 -1
- data/ext/minimap2/seed.c +1 -1
- data/ext/minimap2/setup.py +32 -22
- data/lib/minimap2/version.rb +1 -1
- metadata +4 -3
data/ext/minimap2/options.c
CHANGED
@@ -3,7 +3,7 @@ from libc.stdlib cimport free
|
|
3
3
|
cimport cmappy
|
4
4
|
import sys
|
5
5
|
|
6
|
-
__version__ = '2.
|
6
|
+
__version__ = '2.25'
|
7
7
|
|
8
8
|
cmappy.mm_reset_timer()
|
9
9
|
|
@@ -172,6 +172,7 @@ cdef class Aligner:
|
|
172
172
|
cdef cmappy.mm_mapopt_t map_opt
|
173
173
|
|
174
174
|
if self._idx == NULL: return
|
175
|
+
if ((self.map_opt.flag & 4) and (self._idx.flag & 2)): return
|
175
176
|
map_opt = self.map_opt
|
176
177
|
if max_frag_len is not None: map_opt.max_frag_len = max_frag_len
|
177
178
|
if extra_flags is not None: map_opt.flag |= extra_flags
|
@@ -217,6 +218,7 @@ cdef class Aligner:
|
|
217
218
|
cdef int l
|
218
219
|
cdef char *s
|
219
220
|
if self._idx == NULL: return
|
221
|
+
if ((self.map_opt.flag & 4) and (self._idx.flag & 2)): return
|
220
222
|
s = cmappy.mappy_fetch_seq(self._idx, name.encode(), start, end, &l)
|
221
223
|
if l == 0: return None
|
222
224
|
r = s[:l] if isinstance(s, str) else s[:l].decode()
|
data/ext/minimap2/seed.c
CHANGED
@@ -7,7 +7,7 @@ void mm_seed_mz_flt(void *km, mm128_v *mv, int32_t q_occ_max, float q_occ_frac)
|
|
7
7
|
mm128_t *a;
|
8
8
|
size_t i, j, st;
|
9
9
|
if (mv->n <= q_occ_max || q_occ_frac <= 0.0f || q_occ_max <= 0) return;
|
10
|
-
|
10
|
+
a = Kmalloc(km, mm128_t, mv->n);
|
11
11
|
for (i = 0; i < mv->n; ++i)
|
12
12
|
a[i].x = mv->a[i].x, a[i].y = i;
|
13
13
|
radix_sort_128x(a, a + mv->n);
|
data/ext/minimap2/setup.py
CHANGED
@@ -1,29 +1,40 @@
|
|
1
1
|
try:
|
2
2
|
from setuptools import setup, Extension
|
3
|
+
from setuptools.command.build_ext import build_ext
|
3
4
|
except ImportError:
|
4
5
|
from distutils.core import setup
|
5
6
|
from distutils.extension import Extension
|
7
|
+
from distutils.command.build_ext import build_ext
|
6
8
|
|
7
|
-
import sys, platform
|
9
|
+
import sys, platform, subprocess
|
8
10
|
|
9
|
-
sys.path.append('python')
|
10
|
-
|
11
|
-
extra_compile_args = ['-DHAVE_KALLOC']
|
12
|
-
include_dirs = ["."]
|
13
|
-
|
14
|
-
if platform.machine() in ["aarch64", "arm64"]:
|
15
|
-
include_dirs.append("sse2neon/")
|
16
|
-
extra_compile_args.extend(['-ftree-vectorize', '-DKSW_SSE2_ONLY', '-D__SSE2__'])
|
17
|
-
else:
|
18
|
-
extra_compile_args.append('-msse4.1') # WARNING: ancient x86_64 CPUs don't have SSE4
|
19
11
|
|
20
12
|
def readme():
|
21
13
|
with open('python/README.rst') as f:
|
22
14
|
return f.read()
|
23
15
|
|
16
|
+
|
17
|
+
class LibMM2Build(build_ext):
|
18
|
+
# Uses Makefile to build library, avoids duplicating logic
|
19
|
+
# determining which objects to compile but does require
|
20
|
+
# end users to have Make (since precompiled wheels are not
|
21
|
+
# distributed on PyPI).
|
22
|
+
def run(self):
|
23
|
+
def compile_libminimap2(*args, **kwargs):
|
24
|
+
cmd = ['make', 'libminimap2.a'] + list(args)
|
25
|
+
subprocess.check_call(cmd)
|
26
|
+
options = []
|
27
|
+
if platform.machine() in ["aarch64", "arm64"]:
|
28
|
+
options = ["arm_neon=1", "aarch64=1"]
|
29
|
+
self.execute(
|
30
|
+
compile_libminimap2, options,
|
31
|
+
'Compiling libminimap2 using Makefile')
|
32
|
+
build_ext.run(self)
|
33
|
+
|
34
|
+
|
24
35
|
setup(
|
25
36
|
name = 'mappy',
|
26
|
-
version = '2.
|
37
|
+
version = '2.25',
|
27
38
|
url = 'https://github.com/lh3/minimap2',
|
28
39
|
description = 'Minimap2 python binding',
|
29
40
|
long_description = readme(),
|
@@ -32,16 +43,15 @@ setup(
|
|
32
43
|
license = 'MIT',
|
33
44
|
keywords = 'sequence-alignment',
|
34
45
|
scripts = ['python/minimap2.py'],
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
libraries = ['z', 'm', 'pthread'])],
|
46
|
+
cmdclass = {'build_ext': LibMM2Build},
|
47
|
+
ext_modules = [
|
48
|
+
Extension(
|
49
|
+
'mappy',
|
50
|
+
sources = ['python/mappy.pyx'],
|
51
|
+
depends = ['python/cmappy.h', 'python/cmappy.pxd'],
|
52
|
+
include_dirs = ['.'],
|
53
|
+
extra_objects = ['libminimap2.a'],
|
54
|
+
libraries = ['z', 'm', 'pthread'])],
|
45
55
|
classifiers = [
|
46
56
|
'Development Status :: 5 - Production/Stable',
|
47
57
|
'License :: OSI Approved :: MIT License',
|
data/lib/minimap2/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minimap2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.25.
|
4
|
+
version: 0.2.25.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kojix2
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -98,6 +98,7 @@ files:
|
|
98
98
|
- ext/minimap2/mmpriv.h
|
99
99
|
- ext/minimap2/options.c
|
100
100
|
- ext/minimap2/pe.c
|
101
|
+
- ext/minimap2/pyproject.toml
|
101
102
|
- ext/minimap2/python/README.rst
|
102
103
|
- ext/minimap2/python/cmappy.h
|
103
104
|
- ext/minimap2/python/cmappy.pxd
|
@@ -164,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
164
165
|
- !ruby/object:Gem::Version
|
165
166
|
version: '0'
|
166
167
|
requirements: []
|
167
|
-
rubygems_version: 3.4.
|
168
|
+
rubygems_version: 3.4.6
|
168
169
|
signing_key:
|
169
170
|
specification_version: 4
|
170
171
|
summary: minimap2
|