Installation

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install("SingleCellMultiModal")

Load packages

library(MultiAssayExperiment)
library(SpatialExperiment)
library(SingleCellMultiModal)

seq-FISH dataset

The dataset consists of two data types, seq-FISH data was provided by @Zhu2018identification, while scRNA-seq data was provided by @Tasic2016adult.

Data have been retrievedas part of the Hackathon in the Mathematical Frameworks for Integrative Analysis of Emerging Biological DataTypes workshop.

Downloading datasets

The user can see the available dataset by using the default options

seqFISH(
    DataType="mouse_visual_cortex", modes="*", dry.run=TRUE, version="2.0.0"
)

Or simply by running:

seqfish <- seqFISH(
    DataType="mouse_visual_cortex", modes="*", dry.run=FALSE, version="2.0.0"
)
seqfish

Extract the list of experiments without the associated colData.

experiments(seqfish)

Exploring the data structure

Check row annotations for all experiments:

rownames(seqfish)

Take a peek at the sampleMap (graph representation of assays, cells, and barcodes):

sampleMap(seqfish)

Visualize matching cell identifiers across assays

upsetSamples(seqfish)

This shows that about 1597 cells match across both modalities / assays.

scRNA-seq data

The scRNA-seq data are accessible with $scRNAseq, which returns a SingleCellExperiment class object, with all its associated methods.

seqfish[["scRNAseq"]]

Otherwhise the assay function can be used to access the scRNAseq assay stored in the seqfish MultiAssayExperiment object.

head(assay(seqfish, "scRNAseq"))[,1:4]

seq-FISH data

The seq-FISH data are accessible with $seqFISH, which returns a SpatialExperiment class object.

seqfish[["seqFISH"]]

Otherwhise the assay function can be used to access the seqFISH assay stored in the seqfish MultiAssayExperiment object.

head(assay(seqfish, "seqFISH"))[,1:4]

Spatial data can be retrieved with spatialData function on the SpatialExperiment object.

(sd <- spatialData(seqfish[["seqFISH"]]))

Spatial coordinates within the spatial data can be retrieved in matrix form with spatialCoords function on the SpatialExperiment object.

head(sc <- spatialCoords(seqfish[["seqFISH"]]))

Direct access to the colnames of the spacial coordinates with spatialCoordsNames function.

spatialCoordsNames(seqfish[["seqFISH"]])

Other data version

The provided seqFISH dataset comes out in two different versions:

Data version 1.0.0

The full scRNA-seq data matrix is 24057 rows x 1809 columns.

To access the v1.0.0 simply run

seqFISH(
    DataType="mouse_visual_cortex", modes="*", dry.run=FALSE, version="1.0.0"
)

Session Info

sessionInfo()


waldronlab/SingleCellMultiModal documentation built on Nov. 3, 2024, 7:32 p.m.