Skip to content

Commit 550867a

Browse files
committed
sample: fix -n for in-memory mode. #518
1 parent e0fdbaa commit 550867a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
- fix decimal places of some fields when using `-T`.
55
- `seqkit fx2tab`:
66
- fix the calculation of GC content (`--gc`). Previously, the denominator was the total sequence length, which could lead to inaccuracies due to the potential presence of gaps in the sequence. [#515](https://github.com/shenwei356/seqkit/issues/515)
7+
- `seqkit sample`:
8+
- fix `-n` for in-memory mode. [#518](https://github.com/shenwei356/seqkit/issues/518)
79
- [SeqKit v2.10.0](https://github.com/shenwei356/seqkit/releases/tag/v2.10.0) - 2025-03-12
810
[![Github Releases (by Release)](https://img.shields.io/github/downloads/shenwei356/seqkit/v2.10.0/total.svg)](https://github.com/shenwei356/seqkit/releases/tag/v2.10.0)
911
- `seqkit`:

seqkit/cmd/sample.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ Attention:
154154
config.LineWidth = 0
155155
}
156156

157-
proportion = float64(number) / float64(len(records))
157+
proportion = float64(number) / float64(len(records)) * 1.1
158158

159159
for _, record := range records {
160160
// if <-randg <= proportion {

0 commit comments

Comments
 (0)