Removes peaks that are present in blanks (i.e. negative control samples) to eliminate contaminations in the aligned data. Afterwards, blanks are deleted itself. This function is only applicable when blanks were not discarded during a previous alignment using align_chromatograms.
remove_blanks(data, blanks)
Arguments
data: An object of class "GCalign". See align_chromatograms for details. Alternatively, a list of data frames. Whereby each data frame contains the peak list for an individual sample.
blanks: Character vector of names of negative controls. Substances found in any of the blanks will be removed from the aligned dataset, before the blanks are deleted from the aligned data as well. This is an optional filtering step.
Returns
a list of data frames for each individual.
Examples
data("peak_data")## subset for faster processingdata <- lapply(peak_data[1:5],function(x) x[20:35,])x <- align_chromatograms(data, rt_col_name ="time")out <- remove_blanks(data = x, blanks = c("C2","C3"))## number of deleted peaksnrow(x[["aligned_list"]][["M2"]])- nrow(out[["M2"]])