Learn R Programming

seqRFLP (version 1.0.1)

rename.fas: Change the sequence names of fasta objects.

Description

This function could be used to change the names of the DNA squences according to given names. If no names provided by names, the function will return the original sequences.

Usage

rename.fas(x, names = NULL)

Arguments

x
fasta object to be renamed.
names
A vector of character strings indicating the names..

Value

A fasta object with all the sequences with new names.

Details

The number of names provided by the user must be equal to the number of sequences, otherwise the function will stop.

References

None.

See Also

See Also gnames.fas, for obtaining the names of sequences from fasta objects.

Examples

Run this code

### rename.fas() example
data(fil.fas)
rename.fas(fil.fas, name = paste("Sequence", as.character(1:19), sep = ""))

Run the code above in your browser using DataLab