Csplit Multifasta File Into A *Smaller Multifasta File
1
2
Entering edit mode
11.8 years ago
neal.platt ▴ 240

I am trying to split a large multifasta file into several smaller mutlifasta files. I have seen several examples of csplit being used to split multifasta files into single fasta, but for our purposes this is less than ideal.

I have been using the following command:

  csplit -kf fastafile '%^>%' '/^>/' "{10}"

How would I modify this to generate a file with 10 fasta sequences rather than splitting at individual fasta headers (>).

Would awk be more useful?

Thanks for the help in advance.

split fasta • 5.4k views
ADD COMMENT
0
Entering edit mode
11.8 years ago

From your description I am not exactly sure how you want to split your file but there are a number of posts on splitting fasta files, perhaps those help

http://www.biostars.org/post/show/2226/how-to-split-a-multiple-fasta/

and

http://www.biostars.org/post/show/13270/how-to-split-one-big-sequence-file-into-multiple-files-with-less-than-1000-sequences-in-a-single-file/

ADD COMMENT

Login before adding your answer.

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