make_se_parse {DEP}R Documentation

Data.frame to SummarizedExperiment object conversion using parsing from column names

Description

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

Usage

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

# 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 = "_")

[Package DEP version 1.14.0 Index]