Skip to content

Commit

Permalink
merge: trim tailing tab in merged result. #38
Browse files Browse the repository at this point in the history
  • Loading branch information
shenwei356 committed Sep 2, 2023
1 parent a57cc96 commit fd8808f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

### v0.9.4 - 2023-07-16

- `kmcp merge`:
- trim tailing tab in merged result, download results are not affected. [#38](https:/shenwei356/kmcp/issues/38)
- `kmcp profile`:
- fix log of "xx% (yy/zz) reads matched", the numerator should be the number of matched reads instead of reads belonging to references.
- early quick when no target detected.
- early quit when no target detected.

### v0.9.3 - 2023-07-16

Expand Down
6 changes: 4 additions & 2 deletions kmcp/cmd/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,11 @@ Example:
for _, match = range buf0 {
(*match.Data)[hitsFieldM1] = hits

for _, item = range *match.Data {
for _, item = range (*match.Data)[:len(*match.Data)-1] {
outfh.WriteString(item)
outfh.WriteByte('\t')
}
outfh.WriteString((*match.Data)[len(*match.Data)-1])
outfh.WriteByte('\n')

// poolStrings.Put(match.Data)
Expand Down Expand Up @@ -248,10 +249,11 @@ Example:
for _, match = range buf0 {
(*match.Data)[hitsFieldM1] = hits

for _, item = range *match.Data {
for _, item = range (*match.Data)[:len(*match.Data)-1] {
outfh.WriteString(item)
outfh.WriteByte('\t')
}
outfh.WriteString((*match.Data)[len(*match.Data)-1])
outfh.WriteByte('\n')

// poolStrings.Put(match.Data)
Expand Down

0 comments on commit fd8808f

Please sign in to comment.