Closed jashapiro closed 3 years ago
Thanks Joshua (@jashapiro) for noticing and reporting this issue, I accounted it in https://github.com/drighelli/SpatialExperiment/pull/91
Yes, I think simply flipping this here is correct.
This issue is caused by the conflict between the standard definitions of x and y axes in R vs. the Visium images, i.e. pxl_col_in_fullres
corresponds to x
axis in R, and pxl_row_in_fullres
corresponds to reverse of y
axis in R.
In the
read10xVisium()
source code, the.read_xyz()
function to read thetissue_positions_list.csv
file reads the position data columns in order aspxl_col
,pxl_row
: https://github.com/drighelli/SpatialExperiment/blob/6565376a6e99e5f4b05b2b15fb230ea170d7817f/R/read10xVisium.R#L168-L171This is in conflict with the vignette instructions where the instructions are to read in the order
pxl_row
,pxl_col
: https://github.com/drighelli/SpatialExperiment/blob/6536b041dcc6810e68edfec3452e6ec124b7d69b/R/SpatialExperiment.R#L136-L139Based on 10x documentation (and the
array_row
,array_col
order), it seems the latter is likely to be correct.