upsample

upsample#

TrackData.upsample(resolution, aggregation_type=AggregationType.SUM)[source]#

Upsamples the track data to a higher 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:

TrackData

Returns:

A new TrackData object with upsampled values.

Raises:

ValueError – If resolution is not lower than the current resolution or not divisible by the current resolution.