Session Ready
Exercise

Filter cells by number of expressed genes

To remove problematic cells, we want to filter out cells with small total number of genes with non-zero count (called total_features in the package scater).

Instructions
100 XP
  • Assign 6000 to variable threshold.

  • Plot the density of the library size using the plot() function and then use abline() to add a vertical line showing the chosen threshold using the abline() function. The library size is stored as a column in sce.

  • Determine the cells to keep by assigning TRUE to the variable keep if the library size is greater than threshold, and FALSE otherwise.

  • Create a table of the number of cells that were kept in keep on the previous step.