We will be offering an R workshop December 18-20, 2019. Learn more.


From mothur
Revision as of 17:05, 29 April 2019 by Westcott (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Provided with a fasta-formatted sequence file and group file, the rename.seqs rename the sequences appending the group name to the sequence name.


The rename.seqs command requires and fasta and group file.

mothur > rename.seqs(fasta=final.fasta, group=final.groups)

This command will create final.renamed.fasta and final.renamed.groups files. The sequence names will look like: GQY1XT001C296C_F003D000. GQY1XT001C296C was the original sequence name and F003D000 is the sample it came from.



If your dataset uses a name file, you will want to include it to avoid downstream name mismatch issues.

mothur > rename.seqs(fasta=final.fasta, group=final.groups, name=final.names)


The count parameter allows you to provide a count file.

mothur > rename.seqs(fasta=final.fasta, count=final.count_table)


The file option allows you to provide a 2 or 3 column file. The first column contains the file type: fasta or qfile. The second column is the filename, and the optional third column can be a group name. If there is a third column, all sequences in the file will be assigned to that group. This can be helpful when renaming data separated into samples.


The map parameter allows you to enter a map file. The map file is generated by the rename.seqs command and maps the old name to the new name. Providing a map file allows you to "undo" a previous rename.seqs command. This can be helpful if you want to run an analysis with complex names and then replace the original names at any point in the analysis.


The qfile allows you to provide an associated quality file.


The contigsreport allows you to provide an associated contigsreport file.


The taxonomy parameter allows you to provide an associated taxonomy file.


The delim parameter allow you to enter the character or characters you would like to separate the sequence name from the group name. Default='_'.

mothur > rename.seqs(fasta=final.fasta, group=final.groups, delim=::)

The resulting names would look like: GQY1XT001A006L::F003D144.


The placement parameter allows you to indicate whether you would like the group name appended to the front or back of the sequence name. Options are front or back. Default=back.

mothur > rename.seqs(fasta=final.fasta, group=final.groups, placement=front)

The resulting names would look like: F003D000_GQY1XT001C296C.


  • 1.32.0 - First Introduced.
  • 1.36.0 - Adds count, delim, and placement parameters
  • 1.37.0 - Adds file, map, qfile and contigsreport parameters. #132
  • 1.42.0 - Adds taxonomy parameter