alphagenome.visualization.plot.pad_track

Contents

alphagenome.visualization.plot.pad_track#

alphagenome.visualization.plot.pad_track(track, new_len, value=0)[source]#

Pad a track with value to the desired length.

If new_len - len(track) is an even number, the same amount of padding is added to both sides.

If new_len - len(track) is an odd number, the extra padded element will be added at the end of the array.

Parameters:
  • track (ndarray) – Track to pad.

  • new_len (int) – Desired length of the padded track.

  • value (int (default: 0)) – Value to use for padding.

Return type:

ndarray

Returns:

Padded track.