downsample#
- TrackData.downsample(resolution, aggregation_type=AggregationType.SUM)[source]#
Downsamples the track data to a lower resolution.
- Parameters:
resolution (
int) – The desired resolution in base pairs.aggregation_type (
AggregationType(default:<AggregationType.SUM: 'sum'>)) – The aggregation method to use for pooling the values.
- Return type:
- Returns:
A new
TrackDataobject with downsampled values.- Raises:
ValueError – If
resolutionis not greater than the current resolution or not divisible by the current resolution.