# merge.files

The merge.files command will concatenate multiple files and output the result to a new file. This command is useful for merging multiple fasta-formatted sequence files, 454 quality files, group files, name files, or anything else.

To run the merge.files command you need to provide the input files separated by hyphens as well as the name file that the contents of those files should be written to. The merging occurs in the order that you provide the input files. The following example demonstrates how to use the command:

mothur > merge.files(input=fileA-fileB-fileC, output=fileABC)


Alternatively, the merge.files command can be used to combine the information in a fasta, taxonomy, name or count files into a new fasta file.

mothur > merge.files(fasta=final.fasta, count=final.count_table, taxonomy=final.taxonomy)


The resulting fasta file would look like:

>GQY1XT001CFHYQ 467 Bacteria(100);Firmicutes(100);Clostridia(100);Clostridiales(100);Clostridiales_unclassified(100);Clostridiales_unclassified(100);Clostridiales_unclassified(100);
T-C--T-G--GA-A-A-C-T-G-T--GT-A-A-C--T-G-G-A-G-T-G-C-AG-GA-G-A-G-G-C-A--GG-C-GG-A-ATT-C-C-T-A-GT-GT-A-G-CGGT-G-AAA--TG-C-GT-AG--AT-A-TT-A-G-G-AG-G-A-AC-...

sfffile -o combined.sff infile1.sff infile2.sff