This repository has been archived by the owner. It is now read-only.
Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
ReporteR.scRNAseq/inst/content/02-quality-control-G-saturation.Rmd
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
27 lines (22 sloc)
1.67 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```{r parameters-and-defaults, include = FALSE} | |
module <- "scRNAseq" | |
section <- "quality_control" | |
``` | |
```{r parameter-merge, include = FALSE} | |
local_params <- module %>% | |
options() %>% | |
magrittr::extract2(module) %>% | |
magrittr::extract2(section) %>% | |
ReporteR.base::validate_params(parameters_and_defaults) | |
``` | |
```{r scRNAseq-quality-control-G-saturation-checks} | |
assertive.sets::assert_is_subset(local_params$features, colnames(SummarizedExperiment::colData(object))) | |
``` | |
### Sequencing saturation | |
Sequencing is called *saturated* when generating more sequencing output from a cDNA library does not substantially increase the number of detected features in a sample. Since the number of detected features can act as a technical confounder, and thereby drive substructure in the data, it is advisable to aim for a saturated sequencing by either adding more sequencing output or decreasing the number of samples until saturation is achieved (Figure \@ref(fig:scRNAseq-quality-control-G-saturation-figure)). [@zhang_one_2018] gives advise on how to choose the optimal cell number given a fixed sequencing budget. | |
```{r scRNAseq-quality-control-G-saturation-figure, warning = FALSE, message = FALSE, echo = FALSE, fig.cap = "Scatterplot between sequencing depth and detected features. The dashed red line indicates a smooth trend that has been fit to the data using a general additive model. Saturation occurs when the trend line becomes flat."} | |
object_filtered %>% | |
scater::plotColData(y = "total_features", x = paste0("total_", local_params$assay), colour_by = local_params$features[1], show_se = FALSE, show_smooth = TRUE) + | |
ggplot2::xlab("Sequencing depth") + | |
ggplot2::ylab("Detected features") | |
``` |