collapseIntesity: Collapse rows of an intensity matrix according to a...

Description Usage Arguments Details Value Author(s) Examples

Description

Collapse rows of an intensity matrix according to a vector/factor.

Usage

1
2
3
collapseIntesity(x, intensity.col, collapse.col = "Sequence", annot.col,
  n.cores = 1, collapse.method = c("sum", "mean", "median", "max.range",
  "max.range01")[1])

Arguments

x

a data.frame containing at least the intensity columns and a column according to which intensities are collapsed.

intensity.col

the columns of intensities, could be either column names or column indices

collapse.col

the column accroding to which intensity are collapsed. Most of the cases, this column should be peptide sequences or protein IDs, see details.

annot.col

the annotation columns, which will be retained in the output.

n.cores

the number of cores to be used, it is passed to mclapply

collapse.method

the collapse method, see details section.

Details

This function prepares input for fitDegNLS. Two typical usages are: 1) collapse intensitys on peptide level, i.e. if multiple rows corresponds to identical peptide, combine them into one rows in some way (see below). In this case, the peptide sequence should be used as collapse.col. 2) collapse from peptide level to protein levels, so the protein name or ID could be used as collapse.col.

The following collapse methods are avaliable:

Value

a data.frame of collapsed intensities, containing the collapsed.col, intensity.col and annot.cols.

Author(s)

Chen Meng

Examples

1
2
3
4
5
6
7
8
9
  df <- data.frame(
    sequence = c("CCAD", "CSDS", "IIURE", "IIURE", "XMNT"),
    t0 = rnorm(5),
    t1 = rnorm(5),
    t2 = rnorm(5),
    name = LETTERS[1:5]
  )
  collapseIntesity(x = df, collapse.col = "sequence", intensity.col = c("t0", "t1", "t2"), annot.col = "name")
  collapseIntesity(x = df, collapse.col = 1, intensity.col = 2:4, annot.col = 5, collapse.method = "max.range01")

mengchen18/proturn documentation built on May 30, 2019, 4:37 p.m.