Sort blast result in format 6 by first column
0
0
Entering edit mode
2.8 years ago
Elene • 0

Hello, newbie here!

I have a blast result file in format 6, with the 12 columns and tab separated if I'm not mistaken.

I want to sort it by the first column. From some blogs online I tried a simple command, but the one I did kept only the first column and erased the rest. I tried this:

sort -k 1 sample1_blast.out > sample1_blast_join_try.txt

Is there a better and more correct way of doing this?

blast unix commands Sort result • 571 views
ADD COMMENT
1
Entering edit mode

that should be the way to do it, and it shouldn't remove any columns. Can you post the results of:

head -3 sample1_blast.out
sort -k 1 sample1_blast.out | head -3

This means, (1) examines the first few lines of the file, and (2) examine the first few lines after sorting.

ADD REPLY
0
Entering edit mode

Thanks for your answer. I managed to fix it, kind of by trying a bunch of commands and I think I had in previous commands messed up the spacings between columns. And then it sorted correctly.

ADD REPLY

Login before adding your answer.

Traffic: 1808 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6