createDecoyDB: Create db with decoys and contaminants

View source: R/createDecoyDB.R

createDecoyDBR Documentation

Create db with decoys and contaminants

Description

For more details and references see package vignette vignette("CreateDecoyDB", package = "prozor")

Usage

createDecoyDB(
  dbs,
  useContaminants = loadContaminantsFGCZ2022(),
  revLab = "REV_",
  annot = "zz|sourceOf|database"
)

Arguments

dbs

a path to a fasta file or an array of files

useContaminants

list with contaminant sequences

revLab

label for reversed peptides (if NULL do not generate decoys)

annot

source of database

Value

list of SeqFastaAA entries

Examples

file = system.file("extdata/fgcz_contaminants2022_20220405.fasta.gz",package="prozor")
cont <- loadContaminantsFGCZ2022()
rabbit <-readPeptideFasta(file)
tmp <- 2*(2*length(rabbit)+length(cont)) + 1
res <- createDecoyDB(c(file,file))
length(res)
stopifnot(length(res) == tmp)

res <- createDecoyDB(c(file,file), revLab=NULL)
stopifnot(length(res) == (2*length(rabbit)+length(cont) + 1))
res <- createDecoyDB(c(file,file), revLab=NULL, useContaminants = NULL)
stopifnot(length(res) == (2*length(rabbit) + 1) )


protViz/prozor documentation built on Oct. 17, 2023, 6:39 p.m.