Session Ready
Exercise

Nesting between batches and biology

In scRNA-Seq data analysis, we want to detect the biological signal of interest (e.g., difference of gene expression in cells from different patients) but remove the technical signals (e.g., difference of gene expression in cells sequenced from different technical batches). When biological (e.g., patients) and technical (e.g., batches) variables are confounded, it could be problematic because the two signals could be difficult to disentangle.

Let's find if batch and patient are confounded in our toy scRNA-Seq dataset, whose cell information is stored in the matrix cell_info and is available in your workspace.

Instructions
100 XP
  • Extract the column batch from cell_info. Assign it to the variable batch.

  • Extract the column patient from cell_info. And assign it to the variable patient.

  • Use the function table() with arguments batch and patient to observe the partial nesting of batches within patients. Explore the batch_patient table.