Skip to content

Commit

Permalink
Fix R-CMD-Check failure (due to external data)
Browse files Browse the repository at this point in the history
  • Loading branch information
GohtaAihara committed May 15, 2024
1 parent 9da59b3 commit 4071421
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
3 changes: 3 additions & 0 deletions data-raw/merfish_mousePOA.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ bregma <- "-0.29"
data_sub <- data[(data$Animal_ID == animal & data$Animal_sex == sex & data$Behavior == behavior & data$Bregma == bregma),]
dim(data_sub)

## save subsetted data for vignettes
saveRDS(data_sub, file = here("vignettes/merfish_mousePOA_raw.RDS"))

## genes-by-cells matrix
# extract the genes-by-cells matrix as a sparse matrix (dgCMatrix)
mat <- as(t(data_sub[,10:ncol(data_sub)]), "CsparseMatrix")
Expand Down
16 changes: 3 additions & 13 deletions vignettes/formatting-SpatialExperiment-for-SEraster.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ knitr::opts_chunk$set(

For this tutorial, we will format a preprocessed MERFISH dataset of the mouse preotic area (POA) into a `SpatialExperiment` so that it can be rasterized with `SEraster`. The output of this tutorial is the same as the `merfish_mousePOA` dataset in the package.

In the original work, [Moffitt J. and Bambah-Mukku D. et al. (2018), "Molecular, spatial, and functional single-cell profiling of the hypothalamic preoptic region", *Science Advances*](https://www.science.org/doi/10.1126/science.aau5324), authors collected spatial transcriptomics datasets of mouse POA regions for various sexes, behavioral conditions, and bregma sections. The full dataset can be downloaded from [Dryad](https://datadryad.org/stash/dataset/doi:10.5061/dryad.8t8s248). We only use the dataset for a bregma -0.29 slice from a female naive animal (Animal ID = 1).
In the original work, [Moffitt J. and Bambah-Mukku D. et al. (2018), "Molecular, spatial, and functional single-cell profiling of the hypothalamic preoptic region", *Science Advances*](https://www.science.org/doi/10.1126/science.aau5324), authors collected spatial transcriptomics datasets of mouse POA regions for various sexes, behavioral conditions, and bregma sections. The full dataset can be downloaded from [Dryad](https://datadryad.org/stash/dataset/doi:10.5061/dryad.8t8s248). We only use the dataset for a bregma -0.29 slice from a female naive animal (Animal ID = 1, Animal Sex = "Female", Behavior = "Naive", Bregma = "-0.29").

## Load libraries

Expand All @@ -29,20 +29,10 @@ library(Matrix)
library(ggplot2)
```

## Load dataset
## Load the subsetted dataset

```{r}
data <- read.csv('/Users/gohtaaihara/Downloads/Moffitt_and_Bambah-Mukku_et_al_merfish_all_cells.csv')
```

Subset the dataset to specific female, behavioral condition, and bregma section.

```{r}
animal <- 1
sex <- "Female"
behavior <- "Naive"
bregma <- "-0.29"
data_sub <- data[(data$Animal_ID == animal & data$Animal_sex == sex & data$Behavior == behavior & data$Bregma == bregma),]
data_sub <- readRDS(file = here("vignettes/merfish_mousePOA_raw.RDS"))
dim(data_sub)
```

Expand Down
Binary file added vignettes/merfish_mousePOA_raw.RDS
Binary file not shown.

0 comments on commit 4071421

Please sign in to comment.