Skip to content

Commit d805413

Browse files
committed
stats: fix concurrency bug introduced in v2.5.0. fix #405
1 parent dc97d9f commit d805413

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
- [SeqKit v2.5.1](https://github.com/shenwei356/seqkit/releases/tag/v2.5.1) - 2023-07-16
22
[![Github Releases (by Release)](https://img.shields.io/github/downloads/shenwei356/seqkit/v2.5.1/total.svg)](https://github.com/shenwei356/seqkit/releases/tag/v2.5.1)
3+
- `seqkit stats`:
4+
- fix concurrency bug introduced in v2.5.0. [#405](https://github.com/shenwei356/seqkit/issues/405)
35
- `seqkit subseq`:
46
- sequence/chromosome IDs are case-sensitive now. [#400)(https://github.com/shenwei356/seqkit/issues/400)
57
- [SeqKit v2.5.0](https://github.com/shenwei356/seqkit/releases/tag/v2.5.0) - 2023-07-16

seqkit/cmd/stat.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,9 @@ Tips:
261261
buf[info.id] = info // save for later check
262262

263263
// check bufferd results
264-
if info1, ok := buf[id]; ok {
264+
if info, ok := buf[id]; ok {
265265
if !tabular {
266-
statInfos = append(statInfos, info1)
266+
statInfos = append(statInfos, info)
267267
} else {
268268
fmt.Fprintf(outfh, "%s\t%s\t%s\t%d\t%d\t%d\t%.1f\t%d",
269269
info.file,
@@ -294,7 +294,7 @@ Tips:
294294
outfh.Flush()
295295
}
296296

297-
delete(buf, info1.id)
297+
delete(buf, info.id)
298298
id++
299299
}
300300
}

0 commit comments

Comments
 (0)