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

A doubt about csvtk sort #79

Closed
flystar233 opened this issue May 23, 2019 · 2 comments
Closed

A doubt about csvtk sort #79

flystar233 opened this issue May 23, 2019 · 2 comments

Comments

@flystar233
Copy link

I am a bioinformatics worker and often deal with some genotype files like this :

chr10   111     A T T
chr10   222     A T T
chr11   111     A T T
chr1    122     A T T
chr20   111     A T T
chr20   222     A T T
chr2    111     A T T

The frist column was out-of-order when cat all chromosome genotype files. So I used

csvtk -H -t  sort -k 1:N  text.txt

The result is :

chr1    122     A T T
chr2    111     A T T
chr10   111     A T T
chr10   222     A T T
chr11   111     A T T
chr20   222     A T T
chr20   111     A T T

OK~,The first column was ordered correctly,but the chr20 snp site of second column is out-of-order,even if I used csvtk -H -t sort -k 1:N -k 2:n text.txt, The result was not changed:

chr1    122     A T T
chr2    111     A T T
chr10   111     A T T
chr10   222     A T T
chr11   111     A T T
chr20   222     A T T
chr20   111     A T T

I don't know what happened inside the program.

@shenwei356
Copy link
Owner

Sorry, it's a little bug and fixed now, you can try the pre-release here:

@flystar233
Copy link
Author

Thank you for your contribution~, it works correctly.

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

No branches or pull requests

2 participants