Deleting duplicated sequences in fasta object

Share:

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

1
uniquefasta(fasta)

Arguments

fasta

The fasta object

Value

This function returns to the fasta object with unique sequence.

Note

This function will remove the duplicated sequences and retain the first sequence only, all according to the names of the sequences.

Author(s)

Jinlong Zhang jinlongzhang01@mail.com

References

None

See Also

unique

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.