How to concatenate multiple blastx output file in a way that all the hits from one query goes together as a "block"?
0
0
Entering edit mode
8.4 years ago
seta ★ 1.9k

Hi all,

I have separately done several blasx of a assembled transcriptome against some proteome organism as tabular format (-outfmt 6). Now I would like to concatenate multiple blastx output file in a way that all the hits from one query goes together as a "block". Could you please help me out for doing it? Sorry if the question is basic for you.

Thanks in advance.

alinbment sequencing blast • 1.9k views
ADD COMMENT
0
Entering edit mode

You could try something like

cat file1 file2 | sort

This would first concatenate your files and then sort the lines. This way, you get a "block" for each query.

ADD REPLY
0
Entering edit mode

Thanks. It's great the simple solutions. One friend told me it will be done using the scripting language, like python. However, I don't know how.

ADD REPLY
0
Entering edit mode

You should use a scripting language, if you want to ge a more advanced sorting (like hits sorted by score for each query). The command I posted sort alphabetically.

ADD REPLY
0
Entering edit mode

Thanks for your comment. Actually, I want to use the concatenated file as input for the following scripts, which find the chimera contigs in the assembly.

Would you please let me know your way for correct concatenation?

ADD REPLY
0
Entering edit mode

I am not very familiar with python. So, I cannot see from the code you posted, how the script reads the input.

I would recommend to take a small test dataset (where you know the result) and try the command I posted before. Also, you should take a look at a manual, or ask the author of the script, how the input should be formatted.

ADD REPLY

Login before adding your answer.

Traffic: 2694 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