[med-svn] [Git][med-team/seqkit][upstream] New upstream version 2.1.0+ds

Nilesh Patra (@nilesh) gitlab at salsa.debian.org
Sun Jan 16 13:34:27 GMT 2022



Nilesh Patra pushed to branch upstream at Debian Med / seqkit


Commits:
5388a29b by Nilesh Patra at 2022-01-16T18:15:51+05:30
New upstream version 2.1.0+ds
- - - - -


23 changed files:

- − .travis.yml
- CHANGELOG.md
- README.md
- doc/docs/download.md
- go.mod
- go.sum
- seqkit/cmd/amplicon.go
- seqkit/cmd/bam.go
- seqkit/cmd/bed.go
- seqkit/cmd/faidx.go
- seqkit/cmd/fq2fa.go
- seqkit/cmd/fx2tab.go
- seqkit/cmd/grep.go
- seqkit/cmd/locate.go
- seqkit/cmd/mutate.go
- seqkit/cmd/pair.go
- seqkit/cmd/replace.go
- seqkit/cmd/root.go
- seqkit/cmd/scat.go
- seqkit/cmd/shuffle.go
- seqkit/cmd/sort.go
- seqkit/cmd/split.go
- tests/test.sh


Changes:

=====================================
.travis.yml deleted
=====================================
@@ -1,28 +0,0 @@
-language: go
-
-jobs:
-  include:
-    - os: linux
-      dist: bionic
-    - os: osx
-      osx_image: xcode10
-
-go:
-  - 1.x
-
-cache: miniconda3
-
-before_install:
-  - if [ $TRAVIS_OS_NAME = "linux" ]; then wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; fi;
-  - if [ $TRAVIS_OS_NAME = "osx" ]; then wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh; fi;
-  - bash ./miniconda.sh -u -b -p ./miniconda3 && source ./miniconda3/bin/activate;
-  - conda init bash && source $HOME/.bashrc;
-  - conda update -q --yes conda;
-  - conda update -q --yes --all;
-  - conda config --add channels conda-forge;
-  - conda config --add channels conda-forge;
-  - conda install -q --yes sed openssl;
-
-
-script:
-    - ./tests/test.sh


=====================================
CHANGELOG.md
=====================================
@@ -1,3 +1,18 @@
+- [SeqKit v2.1.0](https://github.com/shenwei356/seqkit/releases/tag/v2.1.0) - 2021-11-15
+[![Github Releases (by Release)](https://img.shields.io/github/downloads/shenwei356/seqkit/v2.1.0/total.svg)](https://github.com/shenwei356/seqkit/releases/tag/v2.1.0)
+    - `seqkit seq`:
+        - **fix filtering by average quality `-Q/-R`**. [#257](https://github.com/shenwei356/seqkit/issues/257)
+    - `seqkit convert`:
+        - fix quality encoding checking, change default value of `-N/--thresh-B-in-n-most-common` from `4` to `2`. 
+        [#254](https://github.com/shenwei356/seqkit/issues/254) and [#239](https://github.com/shenwei356/seqkit/issues/239])
+    - `seqkit split`:
+        - fix writing an extra empty file when using `--two-pass`[#244](https://github.com/shenwei356/seqkit/issues/244)
+    - `seqkit subseq`:
+        - fix `--bed` which fail to recognize strand `.`.
+    - `seqkit fq2fa`: 
+        - faster, and do not wrap sequences.
+    - `seqkit grep/locate/mutate`:
+        - detect unquoted comma and show warning message, e.g., `-p 'A{2,}'`. [#250](https://github.com/shenwei356/seqkit/issues/250)
 - [SeqKit v2.0.0](https://github.com/shenwei356/seqkit/releases/tag/v2.0.0) - 2021-08-27
 [![Github Releases (by Release)](https://img.shields.io/github/downloads/shenwei356/seqkit/v2.0.0/total.svg)](https://github.com/shenwei356/seqkit/releases/tag/v2.0.0)
     - **Performance improvements**


=====================================
README.md
=====================================
@@ -67,7 +67,7 @@ install via conda:
 |                 |[common](https://bioinf.shenwei.me/seqkit/usage/#common)           |find common sequences of multiple files by id/name/sequence                             |FASTA/Q        |+ and -           |             |               |
 |                 |[duplicate](https://bioinf.shenwei.me/seqkit/usage/#duplicate)     |duplicate sequences N times                                                             |FASTA/Q        |                  |             |★              |
 |                 |[split](https://bioinf.shenwei.me/seqkit/usage/#split)             |split sequences into files by id/seq region/size/parts (mainly for FASTA)               |FASTA preffered|                  |             |★              |
-|                 |[spit2](https://bioinf.shenwei.me/seqkit/usage/#spit2)             |split sequences into files by size/parts (FASTA, PE/SE FASTQ)                           |FASTA/Q        |                  |             |★★             |
+|                 |[split2](https://bioinf.shenwei.me/seqkit/usage/#split2)           |split sequences into files by size/parts (FASTA, PE/SE FASTQ)                           |FASTA/Q        |                  |             |★★             |
 |                 |[head](https://bioinf.shenwei.me/seqkit/usage/#head)               |print first N FASTA/Q records                                                           |FASTA/Q        |                  |             |               |
 |                 |[head-genome](https://bioinf.shenwei.me/seqkit/usage/#head-genome) |print sequences of the first genome with common prefixes in name                        |FASTA/Q        |                  |             |               |
 |                 |[range](https://bioinf.shenwei.me/seqkit/usage/#range)             |print FASTA/Q records in a range (start:end)                                            |FASTA/Q        |                  |             |               |


=====================================
doc/docs/download.md
=====================================
@@ -9,13 +9,13 @@ Please cite: **W Shen**, S Le, Y Li\*, F Hu\*. SeqKit: a cross-platform and ultr
 
 OS     |Arch      |File, 中国镜像                                                                                                                                                                                  |Download Count
 :------|:---------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-Linux  |32-bit    |[seqkit_linux_386.tar.gz](https://github.com/shenwei356/seqkit/releases/download/v2.0.0/seqkit_linux_386.tar.gz), <br/> [中国镜像](http://app.shenwei.me/data/seqkit/seqkit_linux_386.tar.gz)                            |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/seqkit/latest/seqkit_linux_386.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/seqkit/releases/download/v2.0.0/seqkit_linux_386.tar.gz)
-Linux  |**64-bit**|[**seqkit_linux_amd64.tar.gz**](https://github.com/shenwei356/seqkit/releases/download/v2.0.0/seqkit_linux_amd64.tar.gz), <br/> [中国镜像](http://app.shenwei.me/data/seqkit/seqkit_linux_amd64.tar.gz)                  |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/seqkit/latest/seqkit_linux_amd64.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/seqkit/releases/download/v2.0.0/seqkit_linux_amd64.tar.gz)
-Linux  |**arm64** |[**seqkit_linux_arm64.tar.gz**](https://github.com/shenwei356/seqkit/releases/download/v2.0.0/seqkit_linux_arm64.tar.gz), <br/> [中国镜像](http://app.shenwei.me/data/seqkit/seqkit_linux_arm64.tar.gz)                  |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/seqkit/latest/seqkit_linux_arm64.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/seqkit/releases/download/v2.0.0/seqkit_linux_arm64.tar.gz)
-macOS  |**64-bit**|[**seqkit_darwin_amd64.tar.gz**](https://github.com/shenwei356/seqkit/releases/download/v2.0.0/seqkit_darwin_amd64.tar.gz), <br/> [中国镜像](http://app.shenwei.me/data/seqkit/seqkit_darwin_amd64.tar.gz)               |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/seqkit/latest/seqkit_darwin_amd64.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/seqkit/releases/download/v2.0.0/seqkit_darwin_amd64.tar.gz)
-macOS  |**arm64** |[**seqkit_darwin_arm64.tar.gz**](https://github.com/shenwei356/seqkit/releases/download/v2.0.0/seqkit_darwin_arm64.tar.gz), <br/> [中国镜像](http://app.shenwei.me/data/seqkit/seqkit_darwin_arm64.tar.gz)               |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/seqkit/latest/seqkit_darwin_arm64.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/seqkit/releases/download/v2.0.0/seqkit_darwin_arm64.tar.gz)
-Windows|32-bit    |[seqkit_windows_386.exe.tar.gz](https://github.com/shenwei356/seqkit/releases/download/v2.0.0/seqkit_windows_386.exe.tar.gz), <br/> [中国镜像](http://app.shenwei.me/data/seqkit/seqkit_windows_386.exe.tar.gz)          |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/seqkit/latest/seqkit_windows_386.exe.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/seqkit/releases/download/v2.0.0/seqkit_windows_386.exe.tar.gz)
-Windows|**64-bit**|[**seqkit_windows_amd64.exe.tar.gz**](https://github.com/shenwei356/seqkit/releases/download/v2.0.0/seqkit_windows_amd64.exe.tar.gz), <br/> [中国镜像](http://app.shenwei.me/data/seqkit/seqkit_windows_amd64.exe.tar.gz)|[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/seqkit/latest/seqkit_windows_amd64.exe.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/seqkit/releases/download/v2.0.0/seqkit_windows_amd64.exe.tar.gz)
+Linux  |32-bit    |[seqkit_linux_386.tar.gz](https://github.com/shenwei356/seqkit/releases/download/v2.1.0/seqkit_linux_386.tar.gz), <br/> [中国镜像](http://app.shenwei.me/data/seqkit/seqkit_linux_386.tar.gz)                            |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/seqkit/latest/seqkit_linux_386.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/seqkit/releases/download/v2.1.0/seqkit_linux_386.tar.gz)
+Linux  |**64-bit**|[**seqkit_linux_amd64.tar.gz**](https://github.com/shenwei356/seqkit/releases/download/v2.1.0/seqkit_linux_amd64.tar.gz), <br/> [中国镜像](http://app.shenwei.me/data/seqkit/seqkit_linux_amd64.tar.gz)                  |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/seqkit/latest/seqkit_linux_amd64.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/seqkit/releases/download/v2.1.0/seqkit_linux_amd64.tar.gz)
+Linux  |**arm64** |[**seqkit_linux_arm64.tar.gz**](https://github.com/shenwei356/seqkit/releases/download/v2.1.0/seqkit_linux_arm64.tar.gz), <br/> [中国镜像](http://app.shenwei.me/data/seqkit/seqkit_linux_arm64.tar.gz)                  |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/seqkit/latest/seqkit_linux_arm64.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/seqkit/releases/download/v2.1.0/seqkit_linux_arm64.tar.gz)
+macOS  |**64-bit**|[**seqkit_darwin_amd64.tar.gz**](https://github.com/shenwei356/seqkit/releases/download/v2.1.0/seqkit_darwin_amd64.tar.gz), <br/> [中国镜像](http://app.shenwei.me/data/seqkit/seqkit_darwin_amd64.tar.gz)               |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/seqkit/latest/seqkit_darwin_amd64.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/seqkit/releases/download/v2.1.0/seqkit_darwin_amd64.tar.gz)
+macOS  |**arm64** |[**seqkit_darwin_arm64.tar.gz**](https://github.com/shenwei356/seqkit/releases/download/v2.1.0/seqkit_darwin_arm64.tar.gz), <br/> [中国镜像](http://app.shenwei.me/data/seqkit/seqkit_darwin_arm64.tar.gz)               |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/seqkit/latest/seqkit_darwin_arm64.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/seqkit/releases/download/v2.1.0/seqkit_darwin_arm64.tar.gz)
+Windows|32-bit    |[seqkit_windows_386.exe.tar.gz](https://github.com/shenwei356/seqkit/releases/download/v2.1.0/seqkit_windows_386.exe.tar.gz), <br/> [中国镜像](http://app.shenwei.me/data/seqkit/seqkit_windows_386.exe.tar.gz)          |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/seqkit/latest/seqkit_windows_386.exe.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/seqkit/releases/download/v2.1.0/seqkit_windows_386.exe.tar.gz)
+Windows|**64-bit**|[**seqkit_windows_amd64.exe.tar.gz**](https://github.com/shenwei356/seqkit/releases/download/v2.1.0/seqkit_windows_amd64.exe.tar.gz), <br/> [中国镜像](http://app.shenwei.me/data/seqkit/seqkit_windows_amd64.exe.tar.gz)|[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/seqkit/latest/seqkit_windows_amd64.exe.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/seqkit/releases/download/v2.1.0/seqkit_windows_amd64.exe.tar.gz)
 
 *Notes*
 
@@ -98,6 +98,21 @@ fish:
 
 ## Release History
 
+- [SeqKit v2.1.0](https://github.com/shenwei356/seqkit/releases/tag/v2.1.0) - 2021-11-15
+[![Github Releases (by Release)](https://img.shields.io/github/downloads/shenwei356/seqkit/v2.1.0/total.svg)](https://github.com/shenwei356/seqkit/releases/tag/v2.1.0)
+    - `seqkit seq`:
+        - **fix filtering by average quality `-Q/-R`**. [#257](https://github.com/shenwei356/seqkit/issues/257)
+    - `seqkit convert`:
+        - fix quality encoding checking, change default value of `-N/--thresh-B-in-n-most-common` from `4` to `2`. 
+        [#254](https://github.com/shenwei356/seqkit/issues/254) and [#239](https://github.com/shenwei356/seqkit/issues/239])
+    - `seqkit split`:
+        - fix writing an extra empty file when using `--two-pass`[#244](https://github.com/shenwei356/seqkit/issues/244)
+    - `seqkit subseq`:
+        - fix `--bed` which fail to recognize strand `.`.
+    - `seqkit fq2fa`: 
+        - faster, and do not wrap sequences.
+    - `seqkit grep/locate/mutate`:
+        - detect unquoted comma and show warning message, e.g., `-p 'A{2,}'`. [#250](https://github.com/shenwei356/seqkit/issues/250)
 - [SeqKit v2.0.0](https://github.com/shenwei356/seqkit/releases/tag/v2.0.0) - 2021-08-27
 [![Github Releases (by Release)](https://img.shields.io/github/downloads/shenwei356/seqkit/v2.0.0/total.svg)](https://github.com/shenwei356/seqkit/releases/tag/v2.0.0)
     - **Performance improvements**


=====================================
go.mod
=====================================
@@ -13,15 +13,15 @@ require (
 	github.com/iafan/cwalk v0.0.0-20210125030640-586a8832a711
 	github.com/klauspost/pgzip v1.2.5
 	github.com/logrusorgru/aurora v2.0.3+incompatible
-	github.com/mattn/go-colorable v0.1.8
-	github.com/mattn/go-isatty v0.0.13
+	github.com/mattn/go-colorable v0.1.11
+	github.com/mattn/go-isatty v0.0.14
 	github.com/mitchellh/go-homedir v1.1.0
 	github.com/pkg/errors v0.9.1
-	github.com/shenwei356/bio v0.3.1
+	github.com/shenwei356/bio v0.6.0
 	github.com/shenwei356/breader v0.3.1
 	github.com/shenwei356/bwt v0.5.1
 	github.com/shenwei356/go-logging v0.0.0-20171012171522-c6b9702d88ba
-	github.com/shenwei356/util v0.3.2
+	github.com/shenwei356/util v0.5.0
 	github.com/shenwei356/xopen v0.1.0
 	github.com/smallfish/simpleyaml v0.1.0
 	github.com/spf13/cobra v1.2.1
@@ -39,12 +39,11 @@ require (
 	github.com/klauspost/compress v1.13.6 // indirect
 	github.com/mattn/go-runewidth v0.0.13 // indirect
 	github.com/rivo/uniseg v0.2.0 // indirect
-	github.com/shenwei356/bpool v0.0.0-20160710042833-f9e0ee4d0403 // indirect
 	github.com/shenwei356/natsort v0.0.0-20190418160752-600d539c017d // indirect
 	github.com/spf13/pflag v1.0.5 // indirect
 	golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 // indirect
 	golang.org/x/image v0.0.0-20190802002840-cff245a6509b // indirect
-	golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect
+	golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6 // indirect
 	gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b // indirect
 	gopkg.in/yaml.v2 v2.4.0 // indirect
 )


=====================================
go.sum
=====================================
@@ -217,12 +217,11 @@ github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczG
 github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
 github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
 github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
-github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8=
-github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
+github.com/mattn/go-colorable v0.1.11 h1:nQ+aFkoE2TMGc0b68U2OKSexC+eq46+XwZzWXHRmPYs=
+github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
 github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
-github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
-github.com/mattn/go-isatty v0.0.13 h1:qdl+GuBjcsKKDco5BsxPJlId98mSWNKqYA+Co0SC1yA=
-github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
+github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
+github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
 github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU=
 github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
 github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
@@ -239,6 +238,7 @@ github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR
 github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
 github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
 github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow=
 github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
 github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
 github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
@@ -258,20 +258,19 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
 github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
 github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
 github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
-github.com/shenwei356/bio v0.3.1 h1:rdSoslv8HahfJpkzhN6W1Ky1lQ++gaBIfuJAC4f65cc=
-github.com/shenwei356/bio v0.3.1/go.mod h1:rHA8DoaDooXKdqX7bqoksQDKm3mEAQ3MsD9nivVTSf0=
-github.com/shenwei356/bpool v0.0.0-20160710042833-f9e0ee4d0403 h1:/3JklLnHXiWUBxWc3joQYavDQJpncRhRA909cUb7eOw=
-github.com/shenwei356/bpool v0.0.0-20160710042833-f9e0ee4d0403/go.mod h1:YkgdTWfNnJgv5HVJbVSDmxQtkK3/jZWDoqcG26BVU8k=
+github.com/shenwei356/bio v0.6.0 h1:od1J1/tpXZ5p6DiPa5kCM+ijl1uesSmndhmZkirnglE=
+github.com/shenwei356/bio v0.6.0/go.mod h1:LL8JBeJnKQ4esixngQZiTkZgO1/by1qI0XhMrUl7T8M=
 github.com/shenwei356/breader v0.3.1 h1:OjgfeHhpNGQPkS1+lgsl4eNuuO//Y16N6TkqG5oxO5U=
 github.com/shenwei356/breader v0.3.1/go.mod h1:UR11JJCxU9s7eUdU4xn3L/VodxoXzWhjJPh8WZbb+us=
 github.com/shenwei356/bwt v0.5.1 h1:pq9KxkJPwzUwPjwWqfTOkUmzwHm8JtMkZxBkqkzuIVo=
 github.com/shenwei356/bwt v0.5.1/go.mod h1:V2hX4adhr4WfFpy2ogKiV8A2WO9FeK0wkq1o3/R91mE=
 github.com/shenwei356/go-logging v0.0.0-20171012171522-c6b9702d88ba h1:UvnrxFDPmz7agYX0eQ2JEorTKn1ORnZ9dT5OzbjPvK8=
 github.com/shenwei356/go-logging v0.0.0-20171012171522-c6b9702d88ba/go.mod h1:LiqYp/K5yCEWOi7Ux/iOF/kjDxtsdYjOGcKHDbEOXFU=
+github.com/shenwei356/kmers v0.1.0/go.mod h1:23Ltr95n98LYy9OtJMFSzkmU/1nmdYwgzqB3walAQ6g=
 github.com/shenwei356/natsort v0.0.0-20190418160752-600d539c017d h1:eeXLHcXyGEr72V1SOSEI7vSzUOTJvHutwF7Ykm+hscQ=
 github.com/shenwei356/natsort v0.0.0-20190418160752-600d539c017d/go.mod h1:SiiGiRFyRtV7S9RamOrmQR5gpGIRhWJM1w0EtmuQ1io=
-github.com/shenwei356/util v0.3.2 h1:3qXkcO2erNKnPCnV8zxjN2JL5sGnOqW+muj1x4XxkuM=
-github.com/shenwei356/util v0.3.2/go.mod h1:pY/f5wR/0o0dJcodhw1Df/ghzqNt2wFSATW0zymI4mA=
+github.com/shenwei356/util v0.5.0 h1:gbPuGYVggNLOSORuZLnpaB2DrIpyDFolHiZQkyja+XU=
+github.com/shenwei356/util v0.5.0/go.mod h1:goFN/u2HgvfbOsEgoHA2hUEet+9KjZpRavrVGz9cm30=
 github.com/shenwei356/xopen v0.1.0 h1:PizY52rLA7A6EdkwKZ6A8h8/a+c9DCBXqfLtwVzsWnM=
 github.com/shenwei356/xopen v0.1.0/go.mod h1:6EQUa6I7Zsl2GQKqcL9qGLrTzVE+oZyly+uhzovQYSk=
 github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
@@ -302,11 +301,13 @@ github.com/twotwotwo/sorts v0.0.0-20160814051341-bf5c1f2b8553 h1:DRC1ubdb3ZmyyIe
 github.com/twotwotwo/sorts v0.0.0-20160814051341-bf5c1f2b8553/go.mod h1:Rj7Csq/tZ/egz+Ltc2IVpsA5309AmSMEswjkTZmq2Xc=
 github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8=
 github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
+github.com/will-rowe/nthash v0.4.0/go.mod h1:5ezweuK0J5j+/7lih/RkrSmnxI3hoaPpQiVWJ7rd960=
 github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
 github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
 github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
 github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
 github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
+github.com/zeebo/wyhash v0.0.1/go.mod h1:Ti+OwfNtM5AZiYAL0kOPIfliqDP5c0VtOnnMAqzuuZk=
 go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=
 go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
 go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ=
@@ -444,7 +445,6 @@ golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7w
 golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -470,8 +470,9 @@ golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7w
 golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I=
 golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6 h1:foEbQz/B0Oz6YIqu/69kfXPYeFQAuuMYFkjaqXzl5Wo=
+golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
 golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=


=====================================
seqkit/cmd/amplicon.go
=====================================
@@ -52,7 +52,7 @@ var ampliconCmd = &cobra.Command{
 
 Attentions:
   1. Only one (the longest) matching location is returned for every primer pair.
-  2. Mismatch is allowed, but the mismatch location (5' or 3') is not controled. 
+  2. Mismatch is allowed, but the mismatch location (5' or 3') is not controlled.
      You can increase the value of "-j/--threads" to accelerate processing.
   3. Degenerate bases/residues like "RYMM.." are also supported.
      But do not use degenerate bases/residues in regular expression, you need


=====================================
seqkit/cmd/bam.go
=====================================
@@ -707,14 +707,14 @@ var bamCmd = &cobra.Command{
 		}
 
 		fmap["RefAln"] = fieldInfo{
-			"Aligned refence length",
+			"Aligned reference length",
 			func(r *sam.Record) float64 {
 				return float64(r.Len())
 			},
 		}
 
 		fmap["RefCov"] = fieldInfo{
-			"Refence coverage",
+			"Reference coverage",
 			func(r *sam.Record) float64 {
 				return float64(r.Len()) / float64(r.Ref.Len()) * 100
 			},


=====================================
seqkit/cmd/bed.go
=====================================
@@ -94,7 +94,7 @@ func ReadBedFilteredFeatures(file string, chrs []string) ([]BedFeature, error) {
 		}
 		var strand *string
 		if n >= 6 {
-			if items[5] != "+" && items[5] != "-" {
+			if items[5] != "+" && items[5] != "-" && items[5] != "." {
 				return nil, false, fmt.Errorf("bad strand: %s", items[5])
 			}
 			strand = &items[5]
@@ -106,7 +106,7 @@ func ReadBedFilteredFeatures(file string, chrs []string) ([]BedFeature, error) {
 	if err != nil {
 		return nil, err
 	}
-	BedFeatures := []BedFeature{}
+	BedFeatures := make([]BedFeature, 0, 1024)
 	for chunk := range reader.Ch {
 		if chunk.Err != nil {
 			return nil, chunk.Err


=====================================
seqkit/cmd/faidx.go
=====================================
@@ -264,7 +264,7 @@ type faidxQuery struct {
 func init() {
 	RootCmd.AddCommand(faidxCmd)
 
-	faidxCmd.Flags().BoolP("use-regexp", "r", false, "IDs are regular expression. But subseq region is not suppored here.")
+	faidxCmd.Flags().BoolP("use-regexp", "r", false, "IDs are regular expression. But subseq region is not supported here.")
 	faidxCmd.Flags().BoolP("ignore-case", "i", false, "ignore case")
 	faidxCmd.Flags().BoolP("full-head", "f", false, "print full header line instead of just ID. New fasta index file ending with .seqkit.fai will be created")
 	faidxCmd.Flags().StringP("region-file", "l", "", "file containing a list of regions")


=====================================
seqkit/cmd/fq2fa.go
=====================================
@@ -41,7 +41,7 @@ var fq2faCmd = &cobra.Command{
 		config := getConfigs(cmd)
 		alphabet := config.Alphabet
 		idRegexp := config.IDRegexp
-		lineWidth := config.LineWidth
+		// lineWidth := config.LineWidth
 		outFile := config.OutFile
 		seq.AlphabetGuessSeqLengthThreshold = config.AlphabetGuessSeqLength
 		seq.ValidateSeq = false
@@ -70,7 +70,8 @@ var fq2faCmd = &cobra.Command{
 				}
 
 				record.Seq.Qual = []byte{}
-				record.FormatToWriter(outfh, lineWidth)
+				// record.FormatToWriter(outfh, lineWidth)
+				record.FormatToWriter(outfh, 0)
 			}
 		}
 	},


=====================================
seqkit/cmd/fx2tab.go
=====================================
@@ -26,7 +26,6 @@ import (
 	"encoding/hex"
 	"fmt"
 	"io"
-	"math"
 	"runtime"
 	"sort"
 	"strings"
@@ -212,7 +211,7 @@ Attention:
 				}
 
 				if printAvgQual {
-					outfh.WriteString(fmt.Sprintf("\t%.2f", avgQual(record.Seq, qBase)))
+					outfh.WriteString(fmt.Sprintf("\t%.2f", record.Seq.AvgQual(qBase)))
 				}
 
 				if printSeqHash {
@@ -268,16 +267,4 @@ func alphabetStr(s []byte) string {
 	return strings.Join(alphabet, "")
 }
 
-func avgQual(s *seq.Seq, base int) float64 {
-	if len(s.Qual) == 0 {
-		return 0
-	}
-	s.ParseQual(base)
-	var sum float64
-	for _, q := range s.QualValue {
-		sum += math.Pow(10, float64(q)/-10)
-	}
-	return -10 * math.Log10(sum/float64(len(s.QualValue)))
-}
-
 var _tab = []byte{'\t'}


=====================================
seqkit/cmd/grep.go
=====================================
@@ -114,6 +114,22 @@ Examples:
 			checkError(fmt.Errorf("one of flags -p (--pattern) and -f (--pattern-file) needed"))
 		}
 
+		// check pattern with unquoted comma
+		hasUnquotedComma := false
+		for _, _pattern := range pattern {
+			if reUnquotedComma.MatchString(_pattern) {
+				hasUnquotedComma = true
+				break
+			}
+		}
+		if hasUnquotedComma {
+			if outFile == "-" {
+				defer log.Warningf(helpUnquotedComma)
+			} else {
+				log.Warningf(helpUnquotedComma)
+			}
+		}
+
 		if degenerate && !bySeq {
 			log.Infof("when flag -d (--degenerate) given, flag -s (--by-seq) is automatically on")
 			bySeq = true
@@ -643,3 +659,6 @@ func init() {
 	grepCmd.Flags().BoolP("circular", "c", false, "circular genome")
 	grepCmd.Flags().BoolP("immediate-output", "I", false, "print output immediately, do not use write buffer")
 }
+
+var reUnquotedComma = regexp.MustCompile(`\{[^\}]*$|^[^\{]*\}`)
+var helpUnquotedComma = `possible unquoted comma detected, please use double quotation marks for patterns containing comma, e.g., -p '"A{2,}"' or -p "\"A{2,}\""`


=====================================
seqkit/cmd/locate.go
=====================================
@@ -103,6 +103,22 @@ Attentions:
 			checkError(fmt.Errorf("one of flags -p (--pattern) and -f (--pattern-file) needed"))
 		}
 
+		// check pattern with unquoted comma
+		hasUnquotedComma := false
+		for _, _pattern := range pattern {
+			if reUnquotedComma.MatchString(_pattern) {
+				hasUnquotedComma = true
+				break
+			}
+		}
+		if hasUnquotedComma {
+			if outFile == "-" {
+				defer log.Warningf(helpUnquotedComma)
+			} else {
+				log.Warningf(helpUnquotedComma)
+			}
+		}
+
 		if mismatches > 0 {
 			if degenerate {
 				checkError(fmt.Errorf("flag -d (--degenerate) not allowed when giving flag -m (--max-mismatch)"))
@@ -906,6 +922,7 @@ Attentions:
 				}
 			}
 		}
+
 	},
 }
 


=====================================
seqkit/cmd/mutate.go
=====================================
@@ -43,7 +43,7 @@ var mutateCmd = &cobra.Command{
 
 Attentions:
 
-  1. Mutiple point mutations (-p/--point) are allowed, but only single 
+  1. Multiple point mutations (-p/--point) are allowed, but only single
      insertion (-i/--insertion) OR single deletion (-d/--deletion) is allowed.
   2. Point mutation takes place before insertion/deletion.
 
@@ -135,6 +135,22 @@ Examples:
 		// 	checkError(fmt.Errorf("one of flags -p (--pattern) and -f (--pattern-file) needed"))
 		// }
 
+		// check pattern with unquoted comma
+		hasUnquotedComma := false
+		for _, _pattern := range pattern {
+			if reUnquotedComma.MatchString(_pattern) {
+				hasUnquotedComma = true
+				break
+			}
+		}
+		if hasUnquotedComma {
+			if outFile == "-" {
+				defer log.Warningf(helpUnquotedComma)
+			} else {
+				log.Warningf(helpUnquotedComma)
+			}
+		}
+
 		// prepare pattern
 		patterns := make(map[string]*regexp.Regexp)
 		if patternFile != "" {


=====================================
seqkit/cmd/pair.go
=====================================
@@ -65,7 +65,7 @@ Attensions:
 		runtime.GOMAXPROCS(config.Threads)
 
 		if len(args) > 0 {
-			checkError(errors.New("no positional arugments are allowed"))
+			checkError(errors.New("no positional arguments are allowed"))
 		}
 
 		read1 := getFlagString(cmd, "read1")


=====================================
seqkit/cmd/replace.go
=====================================
@@ -241,7 +241,7 @@ func init() {
 			"ATTENTION: for *nix OS, use SINGLE quote NOT double quotes or "+
 			`use the \ escape character. Record number is also supported by "{nr}".`+
 			`use ${1} instead of $1 when {kv} given!`)
-	replaceCmd.Flags().IntP("nr-width", "", 1, `minimum width for {nr} in flag -r/--replacement. e.g., formating "1" to "001" by --nr-width 3`)
+	replaceCmd.Flags().IntP("nr-width", "", 1, `minimum width for {nr} in flag -r/--replacement. e.g., formatting "1" to "001" by --nr-width 3`)
 	// replaceCmd.Flags().BoolP("by-name", "n", false, "replace full name instead of just id")
 	replaceCmd.Flags().BoolP("by-seq", "s", false, "replace seq (only FASTA)")
 	replaceCmd.Flags().BoolP("ignore-case", "i", false, "ignore case")


=====================================
seqkit/cmd/root.go
=====================================
@@ -82,11 +82,14 @@ func init() {
 	}
 	RootCmd.PersistentFlags().StringP("seq-type", "t", "auto", "sequence type (dna|rna|protein|unlimit|auto) (for auto, it automatically detect by the first sequence)")
 	RootCmd.PersistentFlags().IntP("threads", "j", defaultThreads, "number of CPUs. can also set with environment variable SEQKIT_THREADS)")
-	RootCmd.PersistentFlags().IntP("line-width", "w", 60, "line width when outputing FASTA format (0 for no wrap)")
+	RootCmd.PersistentFlags().IntP("line-width", "w", 60, "line width when outputting FASTA format (0 for no wrap)")
 	RootCmd.PersistentFlags().StringP("id-regexp", "", fastx.DefaultIDRegexp, "regular expression for parsing ID")
 	RootCmd.PersistentFlags().BoolP("id-ncbi", "", false, "FASTA head is NCBI-style, e.g. >gi|110645304|ref|NC_002516.2| Pseud...")
 	RootCmd.PersistentFlags().StringP("out-file", "o", "-", `out file ("-" for stdout, suffix .gz for gzipped out)`)
 	RootCmd.PersistentFlags().BoolP("quiet", "", false, "be quiet and do not show extra information")
 	RootCmd.PersistentFlags().IntP("alphabet-guess-seq-length", "", 10000, "length of sequence prefix of the first FASTA record based on which seqkit guesses the sequence type (0 for whole seq)")
 	RootCmd.PersistentFlags().StringP("infile-list", "", "", "file of input files list (one file per line), if given, they are appended to files from cli arguments")
+
+	RootCmd.CompletionOptions.DisableDefaultCmd = true
+	RootCmd.SetHelpCommand(&cobra.Command{Hidden: true})
 }


=====================================
seqkit/cmd/scat.go
=====================================
@@ -566,7 +566,7 @@ func init() {
 	scatCmd.Flags().StringP("in-format", "I", "", "input format: fastq or fasta (fastq)")
 	scatCmd.Flags().StringP("out-format", "O", "", "output format: fastq or fasta")
 	scatCmd.Flags().BoolP("allow-gaps", "A", false, "allow gap character (-) in sequences")
-	scatCmd.Flags().BoolP("find-only", "f", false, "concatenate exisiting files and quit")
+	scatCmd.Flags().BoolP("find-only", "f", false, "concatenate existing files and quit")
 	scatCmd.Flags().BoolP("gz-only", "g", false, "only look for gzipped files (.gz suffix)")
 	scatCmd.Flags().StringP("time-limit", "T", "", "quit after inactive for this time period")
 	scatCmd.Flags().IntP("wait-pid", "p", -1, "after process with this PID exited")


=====================================
seqkit/cmd/shuffle.go
=====================================
@@ -46,7 +46,7 @@ For FASTA format, use flag -2 (--two-pass) to reduce memory usage. FASTQ not
 supported.
 
 Firstly, seqkit reads the sequence IDs. If the file is not plain FASTA file,
-seqkit will write the sequences to tempory files, and create FASTA index..
+seqkit will write the sequences to temporary files, and create FASTA index.
 
 Secondly, seqkit shuffles sequence IDs and extract sequences by FASTA index.
 
@@ -149,7 +149,7 @@ Secondly, seqkit shuffles sequence IDs and extract sequences by FASTA index.
 				newFile = file + ".fastx"
 			}
 			if !quiet {
-				log.Infof("read and write sequences to tempory file: %s ...", newFile)
+				log.Infof("read and write sequences to temporary file: %s ...", newFile)
 			}
 
 			var nseqs int
@@ -233,5 +233,5 @@ func init() {
 	RootCmd.AddCommand(shuffleCmd)
 	shuffleCmd.Flags().Int64P("rand-seed", "s", 23, "rand seed for shuffle")
 	shuffleCmd.Flags().BoolP("two-pass", "2", false, "two-pass mode read files twice to lower memory usage. (only for FASTA format)")
-	shuffleCmd.Flags().BoolP("keep-temp", "k", false, "keep tempory FASTA and .fai file when using 2-pass mode")
+	shuffleCmd.Flags().BoolP("keep-temp", "k", false, "keep temporary FASTA and .fai file when using 2-pass mode")
 }


=====================================
seqkit/cmd/sort.go
=====================================
@@ -50,7 +50,7 @@ supported.
 
 Firstly, seqkit reads the sequence head and length information.
 If the file is not plain FASTA file,
-seqkit will write the sequences to tempory files, and create FASTA index..
+seqkit will write the sequences to temporary files, and create FASTA index.
 
 Secondly, seqkit sorts sequence by head and length information
 and extracts sequences by FASTA index.
@@ -255,7 +255,7 @@ and extracts sequences by FASTA index.
 				newFile = file + ".fastx"
 			}
 			if !quiet {
-				log.Infof("read and write sequences to tempory file: %s ...", newFile)
+				log.Infof("read and write sequences to temporary file: %s ...", newFile)
 			}
 
 			var nseqs int
@@ -463,6 +463,6 @@ func init() {
 	sortCmd.Flags().BoolP("ignore-case", "i", false, "ignore case")
 
 	sortCmd.Flags().BoolP("two-pass", "2", false, "two-pass mode read files twice to lower memory usage. (only for FASTA format)")
-	sortCmd.Flags().BoolP("keep-temp", "k", false, "keep tempory FASTA and .fai file when using 2-pass mode")
+	sortCmd.Flags().BoolP("keep-temp", "k", false, "keep temporary FASTA and .fai file when using 2-pass mode")
 	sortCmd.Flags().IntP("seq-prefix-length", "L", 10000, "length of sequence prefix on which seqkit sorts by sequences (0 for whole sequence)")
 }


=====================================
seqkit/cmd/split.go
=====================================
@@ -196,7 +196,7 @@ Examples:
 					newFile = file + ".fastx"
 				}
 				if !quiet {
-					log.Infof("read and write sequences to tempory file: %s ...", newFile)
+					log.Infof("read and write sequences to temporary file: %s ...", newFile)
 				}
 
 				var nseqs int
@@ -362,7 +362,7 @@ Examples:
 					newFile = file + ".fastx"
 				}
 				if !quiet {
-					log.Infof("read and write sequences to tempory file: %s ...", newFile)
+					log.Infof("read and write sequences to temporary file: %s ...", newFile)
 				}
 
 				var nseqs int
@@ -458,11 +458,17 @@ Examples:
 					j = 0
 				}
 			}
-			if j > 0 && !quiet {
-				log.Infof("write %d sequences to file: %s\n", j, outfile)
-			}
-			if !dryRun {
-				outfh.Close()
+			if j > 0 {
+				if quiet {
+					log.Infof("write %d sequences to file: %s\n", j, outfile)
+				}
+				if !dryRun {
+					outfh.Close()
+				}
+			} else {
+				if !dryRun {
+					checkError(os.Remove(outfile))
+				}
 			}
 
 			if (isstdin || !isPlainFile(file)) && !keepTemp {
@@ -531,7 +537,7 @@ Examples:
 					newFile = file + ".fastx"
 				}
 				if !quiet {
-					log.Infof("read and write sequences to tempory file: %s ...", newFile)
+					log.Infof("read and write sequences to temporary file: %s ...", newFile)
 				}
 
 				var nseqs int
@@ -555,7 +561,7 @@ Examples:
 				}
 				if isFastq {
 					checkError(os.Remove(newFile))
-					checkError(fmt.Errorf("Sorry, two-pass mode does not support FASTQ format"))
+					checkError(fmt.Errorf("sorry, two-pass mode does not support FASTQ format"))
 				}
 			}
 			fileExt = suffixFA
@@ -722,7 +728,7 @@ Examples:
 					newFile = file + ".fastx"
 				}
 				if !quiet {
-					log.Infof("read and write sequences to tempory file: %s ...", newFile)
+					log.Infof("read and write sequences to temporary file: %s ...", newFile)
 				}
 
 				var nseqs int
@@ -854,7 +860,7 @@ func init() {
 		`e.g 1:12 for first 12 bases, -12:-1 for last 12 bases. type "seqkit split -h" for more examples`)
 	splitCmd.Flags().BoolP("two-pass", "2", false, "two-pass mode read files twice to lower memory usage. (only for FASTA format)")
 	splitCmd.Flags().BoolP("dry-run", "d", false, "dry run, just print message and no files will be created.")
-	splitCmd.Flags().BoolP("keep-temp", "k", false, "keep tempory FASTA and .fai file when using 2-pass mode")
+	splitCmd.Flags().BoolP("keep-temp", "k", false, "keep temporary FASTA and .fai file when using 2-pass mode")
 	splitCmd.Flags().StringP("out-dir", "O", "", "output directory (default value is $infile.split)")
 	splitCmd.Flags().BoolP("force", "f", false, "overwrite output directory")
 }


=====================================
tests/test.sh
=====================================
@@ -203,7 +203,7 @@ assert_equal $(cat $STDOUT_FILE | md5sum | cut -d" " -f 1) $($app seq $file | md
 
 file=tests/reads_1.fq.gz
 run fq2fa $app fq2fa $file
-assert_equal $(cat $STDOUT_FILE | md5sum | cut -d" " -f 1) $($app fx2tab $file | cut -f 1,2 | $app tab2fx | md5sum | cut -d" " -f 1)
+assert_equal $(cat $STDOUT_FILE | md5sum | cut -d" " -f 1) $($app fx2tab $file | cut -f 1,2 | $app tab2fx -w 0 | md5sum | cut -d" " -f 1)
 
 READS_FQ=tests/pcs109_5k.fq
 NANO_FQ_TSV=tests/pcs109_5k_fq_NanoPlot.tsv



View it on GitLab: https://salsa.debian.org/med-team/seqkit/-/commit/5388a29b97ce90095f23d015cbd4224431e555f4

-- 
View it on GitLab: https://salsa.debian.org/med-team/seqkit/-/commit/5388a29b97ce90095f23d015cbd4224431e555f4
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20220116/7e259d19/attachment-0001.htm>


More information about the debian-med-commit mailing list