Combines split peaks into a single column of the peak table.
Usage
merge_peaks(peak_table, peaks, method = c("max", "sum"))Arguments
- peak_table
A
peak_tableobject fromget_peaktable.- peaks
A vector specifying the names or indices of peaks to be merged.
- method
Method to merge peaks. Either
"max"to select the largest peak from each sample or"sum"to add the peaks together.
Details
In each sample, method = "max" keeps the largest of the specified peaks
and method = "sum" adds them. The result replaces the peak with the
highest mean across samples, whose metadata is retained; the other peaks
are removed.
See also
Other utility functions:
combine_peaks(),
reshape_chroms(),
reshape_peaktable()
