
Process multiple MaxQuant datasets for volcano plot
Source:R/process_multiple_maxquant.R
process_multiple_maxquant.RdThis function takes a list of data frames containing MaxQuant output and processes it to prepare for a volcano plot. It identifies the experimental groups, allows the user to select which groups to compare, imputes missing values, calculates log2 fold changes and p-values for each protein, and returns a processed data frame ready for plotting. It uses equivalent processing as Perseus, including imputation of missing values from a Gaussian distribution with specified downshift and width parameters. Note, group1 is compared to group2, so the log2 fold change is calculated as group1 - group2, meaning that a positive value indicates enrichment in group1 and a negative value indicates enrichment in group2.
Usage
process_multiple_maxquant(
data = NULL,
group1 = NULL,
group2 = NULL,
meas = "LFQ.intensity",
baseval = 0,
width = 0.3,
downshift = 1.8,
seed = 123,
var.equal = TRUE,
paired = FALSE,
ratio = FALSE
)Arguments
- data
list of data frame containing MaxQuant outputs, typically loaded using
load_multiple_maxquant().- group1
character string specifying the name of the first experimental group to compare (e.g., "Treatment"). If NULL, the user will be prompted to select from the groups found in the data frame.
- group2
character string specifying the name of the second experimental group to compare (e.g., "Control"). If NULL, the user will be prompted to select from the groups found in the data frame.
- meas
character string specifying the prefix of the measurement columns to use for the comparison (default is "LFQ.intensity").
- baseval
numeric value specifying the base value to impute for missing values (default is 0). This is typically 0 for MaxQuant LFQ intensity data, but may be different for other types of data.
- width
numeric value specifying the width parameter for imputation of missing values from a Gaussian distribution (default is 0.3). This is typically 0.3 for MaxQuant LFQ intensity data, but may be different for other types of data.
- downshift
numeric value specifying the downshift parameter for imputation of missing values from a Gaussian distribution (default is 1.8). This is typically 1.8 for MaxQuant LFQ intensity data, but may be different for other types of data.
- seed
numeric value specifying the random seed to use for imputation of missing values from a Gaussian distribution (default is 123). Setting a seed ensures that the imputation is reproducible.
- var.equal
boolean indicating whether to assume equal variances for the t-test (default is TRUE). This is typically TRUE for MaxQuant LFQ intensity data, but may be different for other types of data.
- paired
boolean indicating whether to perform a paired t-test (default is FALSE ). Note, paired assumes the columns for group1 and group2 are in the same order and correspond to each other. No check is made to match the columns by name.
- ratio
boolean indicating whether the enrichment in group 1 vs group 2 is calculated for each protein for each run and then averaged (default is FALSE). If FALSE, the mean of the measure of a group 1 protein is compared with the mean of the measure for group 2. The ratio method is useful when files have been processed in different batches and the means of the groups are not comparable. The ratio method is more robust to batch effects, but it requires that the number of replicates in group 1 and group 2 are the same.
Value
A data frame containing the processed MaxQuant data suitable for volcano plot visualization, including columns for log2 fold change and p-values.
Examples
if (FALSE) { # \dontrun{
# load the MaxQuant data
df_list <- load_multiple_maxquant()
# process the MaxQuant data to get the subset for the volcano plot
df_subset <- process_multiple_maxquant(data = df_list, group1 = "Treatment", group2 = "Control")
} # }