Skip to content

Commit

Permalink
Add knee plot and remove mitochondrial plots
Browse files Browse the repository at this point in the history
No need to have mitochondrial plots in this vigneettee because these genes are not targeted in the experiment.
  • Loading branch information
kayla-jackson committed Jul 5, 2023
1 parent 202b784 commit 75f5666
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions vignettes/vig12_crispr.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ The data in this vignette is shipped with the `cellatlas` repository. The count
```{r, message=FALSE}
library(stringr)
library(Matrix)
library(DropletUtils)
library(SpatialExperiment)
library(SpatialFeatureExperiment)
library(scater)
Expand Down Expand Up @@ -88,8 +89,7 @@ names(colData(sce))

```{r}
plotColData(sce, "sum") +
plotColData(sce, "detected") +
plotColData(sce, "subsets_mito_percent")
plotColData(sce, "detected")
```

```{r}
Expand All @@ -102,8 +102,21 @@ plotColData(sce, x = "sum", y = "subsets_mito_detected", bins = 100) +
scale_fill_distiller(palette = "Blues", direction = 1)
```

```{r knee-plot}
bcrank <- barcodeRanks(counts(sce))
knee <- metadata(bcrank)$knee
inflection <- metadata(bcrank)$inflection
plot(bcrank$rank, bcrank$total, log="xy",
xlab="Rank", ylab="Total ClickTags count", cex.lab=1.2)
abline(h=inflection, col="darkgreen", lty=2)
abline(h=knee, col="dodgerblue", lty=2)
```

```{r subset-qc}
sce <- sce[, which(sce$subsets_mito_percent < 20)]
sce <- sce[, which(sce$total > inflection)]
sce <- sce[rowSums(counts(sce)) > 0,]
sce
Expand Down

0 comments on commit 75f5666

Please sign in to comment.