library("prozor")
file <- system.file("extdata/fgcz_contaminants2021_20210929.fasta.gz", package = "prozor")
fasta <- read_fasta(file)
decoys <- reverse_seq(fasta)
names(decoys)[1:3][1] "REV_zz|fgczContaminants2021|" "REV_zz|Y-FGCZCont00001|"
[3] "REV_zz|Y-FGCZCont00002|"
# an entry as read_fasta() returns it
tag <- structure(
"DYKDDDDK",
name = "Flag|FLAG|p2079",
Annot = ">Flag|FLAG|p2079",
class = "SeqFastaAA"
)
reverse_seq(list(tag), rev_lab = "DECOY_")$`DECOY_Flag|FLAG|p2079`
[1] "KDDDDKYD"
attr(,"name")
[1] "DECOY_Flag|FLAG|p2079"
attr(,"Annot")
[1] ">DECOY_Flag|FLAG|p2079"
attr(,"class")
[1] "SeqFastaAA"