Load spike-in proteomics data into a SummarizedExperiment
Usage
load_spike_data(
data,
md,
spike_column,
spike_value,
spike_concentration,
protein_column = "Protein.IDs",
gene_column = "Gene.Names",
ref_samples = NULL,
batch_column = NULL,
condition_column = NULL,
label_column = NULL
)
Arguments
- data
tabular data table with rows = proteins and columns = samples (such as proteinGroups.txt of MaxQuant)
- md
experimental design table (requires a column named "Column" for the column names of the sample intensities in data)
- spike_column
name of the column specifying which proteins are the spike-ins
- spike_value
String value specifying the spike-in proteins in the spike-in column
- spike_concentration
name of the column in md defining the spike-in concentration per sample
- protein_column
name of the column in data containing the protein IDs
- gene_column
name of the column in data containing the gene names
- ref_samples
reference samples if TMT experiment provided (names of samples)
- batch_column
name of the column in md defining the batches
- condition_column
name of the column in md defining the condition (can still be changed afterwards)
- label_column
name of the column in md containing simple sample names (for visualization)
Examples
data_path <- readPRONE_example("Ecoli_human_MaxLFQ_protein_intensities.csv")
md_path <- readPRONE_example("Ecoli_human_MaxLFQ_metadata.csv")
data <- read.csv(data_path)
md <- read.csv(md_path)
mixed <- grepl("Homo sapiens.*Escherichia|Escherichia.*Homo sapiens", data$Fasta.headers)
data <- data[!mixed,]
data$Spiked <- rep("HUMAN", nrow(data))
data$Spiked[grepl("ECOLI", data$Fasta.headers)] <- "ECOLI"
se <- load_spike_data(data, md, spike_column = "Spiked", spike_value = "ECOLI",
spike_concentration = "Concentration", protein_column = "Protein.IDs",
gene_column = "Gene.names", ref_samples = NULL, batch_column = NULL,
condition_column = "Condition", label_column = "Label")