drighelli / SpatialExperiment

55 stars 20 forks source link

spatialData/spatialCoords arguments in constructor #17

Closed lmweber closed 3 years ago

lmweber commented 3 years ago

Now that we have both spatialData and spatialCoords accessors, we should also think about consistency for the SpatialExperiment constructor.

E.g. spatialCoords accessor returns a matrix, but spatialCoords argument in the constructor accepts a DataFrame.

Maybe one option is to simply replace the argument in the constructor, so have an argument spatialData instead of spatialCoords:

SpatialExperiment(
  ...,
  sample_id = "Sample01",
  spatialData = NULL,
  scaleFactors = 1,
  imageSources = NULL,
  image_id = NULL,
  loadImage = TRUE,
  imgData = NULL
)
drighelli commented 3 years ago

You're right, I forgot to correct that argument!

lmweber commented 3 years ago

Update from today's testing:

Thanks!

drighelli commented 3 years ago

done