Skip to content

Commit 2857de7

Browse files
committed
Merge remote-tracking branch 'remotes/origin/master'
2 parents e18935f + 74ebfb2 commit 2857de7

File tree

2 files changed

+53
-5
lines changed

2 files changed

+53
-5
lines changed

Diff for: .github/workflows/ci.yaml

+50-3
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,62 @@ on:
77
pull_request:
88

99
jobs:
10-
build:
10+
build-linux-x8664:
11+
name: Linux x86_64
1112
runs-on: ubuntu-latest
1213
strategy:
1314
matrix:
1415
compiler: [gcc, clang]
1516

1617
steps:
1718
- name: Checkout minimap2
18-
uses: actions/checkout@v2
19+
uses: actions/checkout@v4
1920

2021
- name: Compile with ${{ matrix.compiler }}
21-
run: make CC=${{ matrix.compiler }}
22+
run: |
23+
make CC=${{ matrix.compiler }}
24+
file minimap2 | grep x86-64
25+
26+
build-linux-aarch64:
27+
name: Linux aarch64
28+
runs-on: ubuntu-latest
29+
strategy:
30+
matrix:
31+
compiler: [gcc]
32+
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
37+
- name: Compile with ${{ matrix.compiler }}
38+
uses: uraimo/run-on-arch-action@v2
39+
with:
40+
arch: aarch64
41+
distro: ubuntu22.04
42+
githubToken: ${{ github.token }}
43+
dockerRunArgs: |
44+
--volume "${PWD}:/minimap2"
45+
install: |
46+
apt-get update -q -y
47+
apt-get install -q -y make ${{ matrix.compiler }} zlib1g-dev file
48+
run: |
49+
cd /minimap2
50+
make CC=${{ matrix.compiler }} arm_neon=1 aarch64=1 -j
51+
file minimap2 | grep aarch64
52+
53+
build-mac-arm64:
54+
name: Mac ARM64
55+
runs-on: macos-14
56+
strategy:
57+
matrix:
58+
compiler: [clang]
59+
60+
steps:
61+
- name: Checkout minimap2
62+
uses: actions/checkout@v4
63+
64+
- name: Compile with ${{ matrix.compiler }}
65+
run: |
66+
make CC=${{ matrix.compiler }} arm_neon=1 aarch64=1 -j
67+
file minimap2 | grep arm64
68+

Diff for: python/mappy.pyx

+3-2
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,12 @@ cdef class Aligner:
211211
c = h.cigar32[k]
212212
cigar.append([c>>4, c&0xf])
213213
if cs or MD: # generate the cs and/or the MD tag, if requested
214+
_cur_seq = _seq2 if h.seg_id > 0 and seq2 is not None else _seq
214215
if cs:
215-
l_cs_str = cmappy.mm_gen_cs(km, &cs_str, &m_cs_str, self._idx, &regs[i], _seq, 1)
216+
l_cs_str = cmappy.mm_gen_cs(km, &cs_str, &m_cs_str, self._idx, &regs[i], _cur_seq, 1)
216217
_cs = cs_str[:l_cs_str] if isinstance(cs_str, str) else cs_str[:l_cs_str].decode()
217218
if MD:
218-
l_cs_str = cmappy.mm_gen_MD(km, &cs_str, &m_cs_str, self._idx, &regs[i], _seq)
219+
l_cs_str = cmappy.mm_gen_MD(km, &cs_str, &m_cs_str, self._idx, &regs[i], _cur_seq)
219220
_MD = cs_str[:l_cs_str] if isinstance(cs_str, str) else cs_str[:l_cs_str].decode()
220221
yield Alignment(h.ctg, h.ctg_len, h.ctg_start, h.ctg_end, h.strand, h.qry_start, h.qry_end, h.mapq, cigar, h.is_primary, h.mlen, h.blen, h.NM, h.trans_strand, h.seg_id, _cs, _MD)
221222
cmappy.mm_free_reg1(&regs[i])

0 commit comments

Comments
 (0)