createDecoyDB: Create db with decoys and contaminants

Description Usage Arguments Value Examples

View source: R/createDecoyDB.R

Description

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

Usage

1
2
3
4
5
6
createDecoyDB(
  dbs,
  useContaminants = loadContaminantsFasta2021(),
  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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
file = system.file("extdata/fgcz_contaminants2021_20210929.fasta.gz",package="prozor")
cont <- loadContaminantsFasta2021()
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) )

prozor documentation built on Dec. 11, 2021, 9:51 a.m.