Partitions the position variable (first column of input data frame) in windows of the size specified in window_size and computes the average signal (second column) in each partition. Most common use case is to compress the data for plotting.

compress_signal_track(df, window_size)

Arguments

df Input signal track data as a data.frame with at least two columns: Numeric column with positions to partition Numeric column with values to average in each partition No default. Integer indicating the length (in bp) of the window (or partition) to average signal in. No default.

Examples

# NOT RUN {
compress_signal_track(df=signal_data, window_size=10)

compress_signal_track(chrI_signal, 100)
# }