Skip to content

Rebased the SpatialImage classes on Annotated. - #122

Merged
lmweber merged 1 commit into
drighelli:masterfrom
LTLA:master
Nov 4, 2022
Merged

lmweber merged 1 commit into
drighelli:masterfrom
LTLA:master

Conversation

@LTLA

@LTLA LTLA commented Nov 2, 2022

Copy link
Copy Markdown
Contributor

Since no one else seems to want to do this...

Closes #25 by enabling storage of diameters on a per-image basis.

example(SpatialImage, ask=FALSE, verbose=FALSE)
metadata(spi)$spot_diameter <- 1
metadata(spi)$fiducial_diameter <- 2

metadata(spi)
## $spot_diameter
## [1] 1
## 
## $fiducial_diameter
## [1] 2

Works for images inside an SPE as well:

example(SpatialExperiment, ask=FALSE)
metadata(imgData(spe)$data[[1]]) <- list(foo=1, bar=2)
metadata(imgData(spe)$data[[1]])
## $foo
## [1] 1
## 
## $bar
## [1] 2

I will leave it to someone else to edit readVisium to store the diameters inside each image. Duplication is fine, there's no guarantee that all images in an SPE have the same diameters anyway, e.g., if the object is created by combining different experiments with different resolutions, Visium versions, whatever.

@lmweber

lmweber commented Nov 3, 2022

Copy link
Copy Markdown
Collaborator

Thanks for this, yes this looks good. I think we can merge this and then make a note to update read10xVisium() and add examples separately.

@drighelli @HelenaLC let me know if you have any comments, otherwise I'll merge tomorrow. Thanks!

(The failed checks above are unrelated. I ran checks locally and they are ok.)

@lmweber
lmweber merged commit e62291f into drighelli:master Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spot and fiducial diameters should be stored somewhere

2 participants