Get total.seqs + splitting a fasta file into several ones?

Dear forum members,

I hope someone has a suggestion for this (probably very simple) problem

I have analysed a 454 run with 22 tags and resampled down to 160 per tag. Here is a summary:

mothur > summary.seqs(fasta=P1.fasta, name=P1.names)


Start End NBases Ambigs Polymer NumSeqs Minimum: 348 1309 286 0 3 1 2.5%-tile: 348 1309 380 0 4 89 25%-tile: 391 1309 418 0 4 881 Median: 446 1522 473 0 5 1761 75%-tile: 465 1522 497 0 6 2641 97.5%-tile: 613 1522 518 0 6 3433 Maximum: 774 1522 538 0 7 3520 Mean: 437.436 1466.03 461.507 0 4.86278 # of unique seqs: 1185 total # of seqs: 3520

Output File Name:
P1.fasta.summary

Now, I want to

a) get the fasta file with the 3520 seqs, and
b) split it into 22 separate fasta files for each tag.

How do I best do this? Kind regards, Christoffer

Try combining theseā€¦

http://www.mothur.org/wiki/Split.groups
http://www.mothur.org/wiki/Deunique.seqs

Worked fine. Thanks. Great forum, great programme. Need I say more? :wink:

I had tried another (perhaps a little more convoluted) way around, which was

  1. get.groups (producing a group file)
  2. list.seqs for the resulting groups (generating an accnos file)
  3. get.seqs using the resulting accnos and the original fasta file (generating a fasta file with only the desired sqs)
  4. split.groups on the fasta file from 3) and the group file from 1)

but it gave a similar output.