This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Quick command to split BLAST output by Query?

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

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

0 answers

No answers yet.

Log in to answer this question.