create_db: Create a peptide collection

Description Usage Arguments Details Author(s) See Also Examples

View source: R/create_db.R

Description

Constructor to create peptide collection to be used in summarizePeptides.

Usage

1

Arguments

position

A data.frame or GRanges object. If a data.frame is provided, it should contain 'start' and 'end' or 'width' columns as well as a peptide column. If position is a GRanges object, then it must either have peptide as names or contain a peptide metadata column.

Details

position can have additional columns. These columns will be kept in the resulting peptide collection. This is especially useful to include clades and grouping parameters for the makeCalls function.

If the input contains all the z-scores (z1 to z5), then they will not be re-calculated. If some (but not all) z-scores are missing, a warning message will be sent and the z-scores are re-calculated.

Author(s)

Renan Sauteraud

See Also

GRanges

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#construct data.frame object
   AA <- c("A", "C", "D", "E", "F", "G", "H", "I", "K", "L", "M", "N", "P",
   "Q","R", "S", "T", "V", "W", "Y")
   starts <- seq(1, 30, 3)
   ends <- starts + 14
   peptides <- sapply(1:10, function(x) {
     paste0(AA[floor(runif(15, 1, 20))], collapse = "")
   })
   data <- data.frame(start = starts, end = ends, peptide = peptides)
#from data.frame
   new_pep <- create_db(data)
#from GRanges
   new_pep <- create_db(new_pep)

pepStat documentation built on Nov. 8, 2020, 6:45 p.m.