Quick command to split BLAST output by Query?
0
0
Entering edit mode
8.2 years ago
Tom Koch ▴ 110

I used local blastn on a transcriptome of XLOC/TCONS lines from a prior mapping job. The resulting file is over 8GB, and so I attempted to use split on the text file using the -p Query\= pattern filter. It worked, but, when split got to xzz, it stopped, and spit out

split: too many files

I found another closed thread where someone had a similar issue and using csplit was suggested, which I tried, but it seems to just split on the first instance of Query=, not all instances, so I get the header of the file and then the rest of the 8gb file in two resulting xx00 and xx01 files. This is not ideal.

$ csplit blastoutlocal.txt /Query=/
281
8151460629

Is there a version of split that can handle more than 676 output files (xaa-xzz)?

blast split • 1.7k views
ADD COMMENT
1
Entering edit mode

You can increase the length of the suffixes for split. Look at the man page for split command (-a).

ADD REPLY

Login before adding your answer.

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