Sometimes, redundant rows (i.e. groups of resembling a homologous peak) remain in an aligned dataset. This is the case when two or more adjacent rows exhibit a difference in the mean retention time that is greater than min_diff_peak2peak, the parameter that determines a threshold below that redundancy is checked within align_chromatograms. Therefore, this function allows to raise the threshold for a post processing step that groups the homologous peaks together without the need of repeating a potentially time-consuming alignment with adjusted parameters.
data: An object of class "GCalign". See align_chromatograms for details.
min_diff_peak2peak: A numerical giving a threshold in minutes below which rows of similar retention time are checked for redundancy.
Returns
a list of two items - GCalign: input data with updated input to gc_heatmap
peak_list: a list of data frames containing the updated dataset
Details
Based on the value of parameter threshold, possibly redundant rows are identified by comparing mean retention times. Next, rows are checked for redundancy. When one or more samples contain peaks in a pair of compared rows, no redundancy is existent and the pair is skipped.
Examples
## Load example datasetdata("peak_data")## Subset for faster processingpeak_data <- peak_data[1:3]peak_data <- lapply(peak_data,function(x) x[1:50,])## align data whith strict parametersout <- align_chromatograms(peak_data, rt_col_name ="time",max_diff_peak2mean =0.01, min_diff_peak2peak =0.02)## relax threshold to merge redundant rowsout2 <- merge_redundant_rows(data = out, min_diff_peak2peak =0.05)