LieberInstitute / spatialLIBD

Code for the spatialLIBD R/Bioconductor package and shiny app
http://LieberInstitute.github.io/spatialLIBD/
80 stars 16 forks source link

Add support for more than one image per sample #25

Closed lcolladotor closed 2 years ago

lcolladotor commented 2 years ago

Testing with similar data to the one from #24 but with

## Import the data as a SpatialExperiment object
spe_wrapper <- read10xVisiumWrapper(
    samples = tempdir(),
    sample_id = "lymph",
    type = "sparse", data = "filtered",
    images = c("lowres", "hires", "detected", "aligned"), load = TRUE,
    reference_gtf = gtf_cache
)

such that 4 images are loaded into the SPE object.

aligned

Screen Shot 2021-11-08 at 3 01 58 PM

detected

This one is nice since you can actually see the spot borders unlike the ones we approximated when plotting. It actually works well when you zoom in.

Screen Shot 2021-11-08 at 3 02 25 PM

lowres with zoom

Just an example zoomed in region.

Screen Shot 2021-11-08 at 3 03 00 PM

hires with zoom

Approximately the same zoomed in region. Loading the hires image takes much longer than the lowres one, but well, it works.

Screen Shot 2021-11-08 at 3 03 36 PM
lcolladotor commented 2 years ago

Note that https://github.com/LieberInstitute/spatialLIBD/commit/19a444a7c28677e88a39a979fb8eb8ec5291bbc2#diff-ad222588a08e311a57a72ebe96d500f87841d6ff3251ca51d644e1ada817f178L506-R513 and https://github.com/LieberInstitute/spatialLIBD/commit/19a444a7c28677e88a39a979fb8eb8ec5291bbc2#diff-ad222588a08e311a57a72ebe96d500f87841d6ff3251ca51d644e1ada817f178L660-R668 now mean that the interactive versions are fixed at 600 by 600 pixels (which well, was the case with the example data anyway). Otherwise with the hires image they would be 2000 by 2000 pixels each and become too big to see on a regular monitor.