peptides which do not have protein assignment drop out

reverseSeq(fasta, revLab = "REV_")

Arguments

fasta

- an r list with SeqFastaAA

revLab

- how to label reverse sequences, default = REV_

Value

string with reversed sequence

Examples

library(seqinr)
#library(prozor)

file = system.file("extdata/fgcz_contaminants2021_20210929.fasta.gz", package="prozor")
fasta = readPeptideFasta(file = file)
getAnnot(fasta[[1]])
#> [1] ">zz|fgczContaminants2021| jg: 2021-09-29 updated list of important MS contaminants, incl Preomics LysC, BioID, APEX2 domain compiled by FGCZ protInf"
x <- reverseSeq(fasta)

revseq <- reverseSeq(fasta ,revLab = "REV_")
stopifnot(length(revseq) == length(fasta))
stopifnot(grep("^REV_","REV_zz|ZZ_FGCZCont0000|")==1)

tmp <- list(as.SeqFastaAA(("DYKDDDDK"),name="Flag|FLAG|p2079",Annot=""))

reverseSeq(tmp)
#> $`REV_Flag|FLAG|p2079`
#> [1] "KDDDDKYD"
#> attr(,"name")
#> [1] "REV_Flag|FLAG|p2079"
#> attr(,"Annot")
#> [1] ">REV_"
#> attr(,"class")
#> [1] "SeqFastaAA"
#>