# rename.seqs

Provided with a fasta-formatted sequence file or file file the rename.seqs rename the sequences by number. Adding a group or count file will allow you to append the sample name to the sequence name.

## Default

The rename.seqs command requires a fasta or file file.

mothur > rename.seqs(fasta=final.fasta)


This command will create a final.renamed.fasta file with sequence names like 0, 1.

You can add a name or group file to append sample names to the sequence names as follows:

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


This command will create final.renamed.fasta and final.renamed.count_table files. The sequence names will look like: 21_F3D9.

## Options

### name

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)


### count

The count parameter allows you to provide a count file.

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


### file

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.

### map

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.

### qfile

The qfile allows you to provide an associated quality file.

### contigsreport

The contigsreport allows you to provide an associated contigsreport file.

### taxonomy

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

### list

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

### delim

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: 21::F3D9.

### placement

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: F3D9_21.

## Revisions

• 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
• 1.45.0 - Rework of command function
• 1.46.0 - Rework of rename.seqs file option. #772