make_se_parse: Data.frame to SummarizedExperiment object conversion using...

Description Usage Arguments Value Examples

View source: R/functions.R

Description

make_se_parse creates a SummarizedExperiment object based on a single data.frame.

Usage

1
2
make_se_parse(proteins_unique, columns, mode = c("char", "delim"),
  chars = 1, sep = "_")

Arguments

proteins_unique

Data.frame, Protein table with unique names annotated in the 'name' column (output from make_unique()).

columns

Integer vector, Column numbers indicating the columns containing the assay data.

mode

"char" or "delim", The mode of parsing the column headers. "char" will parse the last number of characters as replicate number and requires the 'chars' parameter. "delim" will parse on the separator and requires the 'sep' parameter.

chars

Numeric(1), The number of characters to take at the end of the column headers as replicate number (only for mode == "char").

sep

Character(1), The separator used to parse the column header (only for mode == "delim").

Value

A SummarizedExperiment object with log2-transformed values.

Examples

1
2
3
4
5
6
7
8
9
# Load example
data <- UbiLength
data <- data[data$Reverse != "+" & data$Potential.contaminant != "+",]
data_unique <- make_unique(data, "Gene.names", "Protein.IDs", delim = ";")

# Make SummarizedExperiment
columns <- grep("LFQ.", colnames(data_unique))
se <- make_se_parse(data_unique, columns, mode = "char", chars = 1)
se <- make_se_parse(data_unique, columns, mode = "delim", sep = "_")

DEP documentation built on Nov. 8, 2020, 7:49 p.m.