Skip to main content

Reverse protein sequences to create decoys

Description

Reverse protein sequences to create decoys

Usage

reverse_seq(fasta, rev_lab = "REV_")

Arguments

fasta A list of SeqFastaAA objects.
rev_lab Prefix added to the names and headers of the reversed sequences.

Value

A list of reversed SeqFastaAA objects, named with the prefixed protein names.

See Also

Other FASTA databases: create_decoy_db(), create_fgcz_fasta_db(), load_contaminants(), make_chain_id(), make_chain_id_uniprot(), make_fasta_summary(), read_fasta(), remove_signal_peptide(), write_fasta()

Examples

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"