netmap.masking.internal.create_pairwise_binary_mask¶
- netmap.masking.internal.create_pairwise_binary_mask(binary_matrix, gene_list)¶
Creates a dictionary of binary masks for each cell and pair of genes, including both forward, reverse, and self-pairs (which are all zeros).
- Parameters:
matrix_cells_x_genes (np.ndarray) – A 2D numpy array where rows are cells and columns are genes.
gene_list (list) – A list of strings containing the names of the genes, in the same order as the columns in the matrix.
- Returns:
- A dictionary where keys are gene pair strings (e.g., ‘GeneA_GeneB’)
and values are 1D numpy arrays representing the binary mask for that pair across all cells.
- Return type:
dict