Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--two-pass flag only uses two sequnces in sort #52

Closed
Snerken opened this issue Oct 5, 2018 · 1 comment
Closed

--two-pass flag only uses two sequnces in sort #52

Snerken opened this issue Oct 5, 2018 · 1 comment
Labels

Comments

@Snerken
Copy link

Snerken commented Oct 5, 2018

Prerequisites

I am using v0.9.1-dev and have read "seqkit sort --help"

Describe your issue

I am following the examples given in the chapter on SEQKIT in the Biostar Handbook Bioinformatics course.
When I use the --two-pass (-2) flag with the sort function the program just returns two sequences. This does not happen when the two-pass flag is omitted.

Example with two-pass flag:
Fri Oct 05 snerx@kali-linux:~/BioPython/biostar-handbook-September-2017/Lectures/seqkit_fastq
$ seqkit sort --by-length --two-pass viral.1.1.genomic.fna.gz > viral.genomic.sorted_2pass.fa
[INFO] read and write sequences to tempory file: viral.1.1.genomic.fna.gz.fastx ...
[INFO] create and read FASTA index ...
[INFO] create FASTA index for viral.1.1.genomic.fna.gz.fastx
[INFO] read sequence IDs and lengths from FASTA index ...
[INFO] 2 sequences loaded
[INFO] sorting ...
[INFO] output ...

Example without two-pass flag:
$ seqkit sort --by-length viral.1.1.genomic.fna.gz > viral.genomic.sorted.fa
[INFO] read sequences ...
[INFO] 7 sequences loaded
[INFO] sorting ...
[INFO] output ...

Seems like a bug of some kind to me.

Regards

TEF
Bodø
Norway

@shenwei356
Copy link
Owner

shenwei356 commented Oct 5, 2018

Hi @Snerken , it is a BUG existed for almost 2 years. I'm so sorry.

Affected commands include sort, shuffle, split, it occurs when using -2/--two-pass to process .gz files.

Fixed now: v0.9.1-dev2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants