bin2cell.check_array_coordinates

bin2cell.check_array_coordinates(adata, row_max=3349, col_max=3349)

Assess the relationship between .obs["array_row"]/.obs["array_col"] and .obsm["spatial"], as the array coordinates tend to have their origin in places that isn’t the top left of the image. Array coordinates are deemed to be flipped or not based on the Pearson correlation with the corresponding spatial dimension. Creates .uns["bin2cell"]["array_check"] that is used by b2c.grid_image(), b2c.insert_labels() and b2c.get_crop().

Input

adataAnnData

2um bin VisiumHD object.

row_maxint, optional (default: 3349)

Maximum possible array_row value.

col_maxint, optional (default: 3349)

Maximum possible array_col value.