drighelli / SpatialExperiment

55 stars 20 forks source link

Custom column names in spatialData #29

Closed lmweber closed 3 years ago

lmweber commented 3 years ago

Currently when I create an object from scratch using the SpatialExperiment() constructor, it gives an error when using custom column names in spatialData - e.g. see error message below when I use column names x_coord and y_coord.

It works when I use the default of x and y, but we should make this flexible to give users the option to also use custom column names.

Error in .sce_to_spe(sce = sce, sample_id = sample_id, spatialData = spatialData,  : 
  all(spatialCoordsNames %in% colnames(spatialData)) is not TRUE
drighelli commented 3 years ago

Can you please provide a reproducible example with the error and the sessionInfo?