splitting merging II

Let me give you an example to explain what is going on.

Fasta file:

seq1
attgc…
seq2
ggcta…

Count file:
Representative_Sequence total A B C
seq1 3 1 2 0
seq2 10 1 4 5

The split.groups command would result in 6 files.

Fasta and count files for sample A, B would contain seq1 and seq2, where as the files for sample C would only contain seq2.

NOTE: Split.groups does NOT change any sequence names. This is done so that you can easily relate the reads in the individual samples to the original reads in the complete dataset. When you try to merge the files, mothur is finding seq1 in all 3 samples and complaining because it’s not sure which fasta and count information you want to preserve for seq1.

A workaround (will not preserve sequence names):

mothur > rename.seqs(fasta=sampleA.fasta, count=sampleA.count_table)
mothur > rename.seqs(fasta=sampleB.fasta, count=sampleB.count_table)
mothur > rename.seqs(fasta=sampleC.fasta, count=sampleC.count_table)
mothur > merge.files(input=sampleA.fasta-sampleB.fasta-sampleC.fasta, output=merged.fasta)
mothur > merge.count(count=sampleA.count_table-sampleB.count_table-sampleC.count_table, output=merged.count_table)
mothur > unique.seqs(fasta=merged.fasta, count=merged.count_table)