Skip to content

Commit

Permalink
Merge pull request #63 from carpentries-incubator/intro_upd
Browse files Browse the repository at this point in the history
writing + change to stage.mapped instead of celltype.mapped (too many…
  • Loading branch information
andrewGhazi authored Dec 10, 2024
2 parents 77312fa + f763bbc commit 471d356
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 471d356

Please sign in to comment.