Skip to content

Commit

Permalink
writing + change to stage.mapped instead of celltype.mapped (too many…
Browse files Browse the repository at this point in the history
… cell types)
  • Loading branch information
andrewGhazi committed Dec 10, 2024
1 parent 77312fa commit f763bbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions episodes/intro-sce.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,12 @@ As for the other slots, we have the usual setter/getter, but it is somewhat rare

It is more common for other functions to _store_ this information in the object, e.g., the `runPCA` function from the `scater` package.

Here, we use `scater`'s `plotReducedDim` function as an example of how to extract this information _indirectly_ from the objects. Note that one could obtain the same results (somewhat less efficiently) by extracting the corresponding `reducedDim` matrix and `ggplot`.
Here, we use `scater`'s `plotReducedDim` function as an example of how to extract this information _indirectly_ from the objects. Note that one could obtain the same results by manually extracting the corresponding `reducedDim` matrix and cell type labels then passing them to `ggplot` in a data frame.

```{r, message = FALSE, warning = FALSE}
library(scater)
plotReducedDim(sce, "pca.corrected.E8.5", colour_by = "celltype.mapped")
plotReducedDim(sce, "pca.corrected.E8.5", colour_by = "stage.mapped")
```

:::::::::::::::::::::::::::::::::: challenge
Expand Down

0 comments on commit f763bbc

Please sign in to comment.