iced.utils.get_intra_mask

iced.utils.get_intra_mask(lengths, counts=None)

Returns a mask for intrachromosomal interactions

Parameters:

lengths : ndarray, (n, )

lengths of the chromosomes

counts : ndarray or sparse matrix (n, n), optional, default: None

if provided, and if sparse, will only return genomic distances for non-zero elements of the sparse matrix.

Returns:

mask : ndarray (m, m)

boolean mask