fasta splitter

January Weiner 3 jweiner1 at
Mon Oct 7 11:47:33 UTC 2002


> almost, but not quite. This converts one file to many files containg one
> sequence. I need something like a conversion of one file containing 1000
> seqs to 10 files each  containing 100 seqs

I wrote you a simple perl script which should do the job.  Save it to a
file and make it executable (I think you are using a Unix-based system,
aren't you?) with chmod a+x  To be on the safe side, put it in a
new directory, and copy your sequence file to the same directory.  Now run

./ <filename> <number of sequences>

...where filename is the name of the file containing your 1000+ sequences,
and <number of sequences> is the number of sequences you wish to have in
each produced file.  The produced file will have the same name as the
original file with the appendix .1, .2, .3 etc.

I tried the script and it seems to work fine.  Meet the power of Perl :-)


Technologists often forget the general user. Technology is only as good as
the user experience. That is something that technology groups very often
forget... [ Linus Torvalds, taken from the GNOME Usability Project ]
-------------- next part --------------
A non-text attachment was scrubbed...
Type: application/x-perl
Size: 849 bytes
URL: <>

More information about the EMBOSS mailing list