Learn R Programming

phylotools (version 0.1.2)

uniquefasta: Deleting duplicated sequences in fasta object

Description

This function may be used to deleting the duplicated sequences in the fasta object. The sequences with its name same to any sequences will be ignored. Only the first sequence will be retained.

Usage

uniquefasta(fasta)

Arguments

fasta
The fasta object

Value

This function returns to the fasta object with unique sequence.

References

None

See Also

unique

Examples

Run this code


library(seqRFLP)
## loading data
data(fil.fas)
## Get the names of the sequences
fasta.names <- gnames.fas(fil.fas)
new.names0 <- substring(fasta.names,1,2 )
new.names <- paste(new.names0, sep = "")
reftable.rename <- data.frame(fasta.names, new.names)
renamed <- rename.fasta(fil.fas, reftable.rename)
uniquefasta(renamed)

Run the code above in your browser using DataLab