binary_mask_stranded

binary_mask_stranded#

Junction.binary_mask_stranded(intervals, bin_size=1)[source]#

Stranded boolean mask that is True where any interval overlaps the bin.

Parameters:
  • intervals (Sequence[Self]) – Sequence of intervals possibly overlapping self.

  • bin_size (int (default: 1)) – Resolution at which to bin the output mask.

Return type:

ndarray

Returns:

Boolean mask of shape (self.width // bin_size, 2), True where coverage_stranded > 0. Column 0 refers to intervals on the same strand as self, and column 1 to intervals on the opposite strand.