Skip to content

Commit

Permalink
v0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
shenwei356 committed Feb 9, 2020
1 parent dabd956 commit a6ba049
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- v0.8.0
- `unikmer`:
- do not ignore files from cli arugments when given flag `-i/--infile-list`.
- new option `-i/--infile-list`, if given, files in the list file are appended to files from cli arguments.
- improve performance of binary file reading and writing.
- `unikmer sort/split/merge`: safer forcing deletion of existed outdir, and better log.
- `unikmer split`: performance improvement for single sorted input file.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# unikmer

unikmer (unique-kmer) is a golang package and a command-line toolkit for
manipulating unique small [k-mers](https://en.wikipedia.org/wiki/K-mer) (k <= 32)
manipulating small [k-mers](https://en.wikipedia.org/wiki/K-mer) (k <= 32)
without frequency information.

K-mers (k <= 32) are encoded into `uint64`, stored in builtin `map` of golang in RAM,
Expand Down Expand Up @@ -29,7 +29,7 @@ and serialized in binary format.
[![GoDoc](https://godoc.org/github.com/shenwei356/unikmer?status.svg)](https://godoc.org/github.com/shenwei356/unikmer)
[![Go Report Card](https://goreportcard.com/badge/github.com/shenwei356/unikmer)](https://goreportcard.com/report/github.com/shenwei356/unikmer)

The unikmer package provides basic manipulations of unique small K-mers
The unikmer package provides basic manipulations of small K-mers
(without frequency information) and also provides serialization methods.

### Installation
Expand All @@ -56,7 +56,7 @@ CPU: AMD Ryzen 7 2700X Eight-Core Processor, 3.7 GHz
## The toolkit

`unikmer` is a command-line toolkit providing functions including counting,
format convertion, set operations and searching on unique small k-mers (k <= 32)
format convertion, set operations and searching on small k-mers (k <= 32)
without frequency information.

### Installation
Expand Down
12 changes: 7 additions & 5 deletions unikmer/cmd/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,10 @@ Tips:
}
// -----------------------------------------------------------------------

if threads > len(files)-1 {
threads = len(files) - 1
}

done := make(chan int)

toStop := make(chan int, threads+2)
Expand Down Expand Up @@ -338,13 +342,11 @@ Tips:
}

// -----------------------------------------------------------------------
log.Infof("%d workers in position", threads)

hasDiff := true
var wgWorkers sync.WaitGroup
nWorkers := opt.NumCPUs
if len(files) == 2 { // only need one worker
nWorkers = 1
}
for i := 0; i < nWorkers; i++ { // workers
for i := 0; i < threads; i++ { // workers
wgWorkers.Add(1)

go func(i int) {
Expand Down
2 changes: 1 addition & 1 deletion unikmer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var RootCmd = &cobra.Command{
Long: fmt.Sprintf(`unikmer - Unique-Kmer Toolkit
A command-line toolkit providing functions including counting, format
convertion, set operations and searching on unique small k-mers (k <= 32)
convertion, set operations and searching on small k-mers (k <= 32)
without frequency information.
K-mers (k <= 32) are encoded into 'uint64', stored in builtin 'map' of golang
Expand Down

0 comments on commit a6ba049

Please sign in to comment.