Skip to content

Commit

Permalink
scautoqc plus logo
Browse files Browse the repository at this point in the history
  • Loading branch information
ktpolanski committed Nov 7, 2023
1 parent a76b8fd commit 9c0dd19
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 30 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,6 @@ pip install --upgrade pip

## Usage and Documentation

SCTK's documentation is available [here](https://teichlab.github.io/sctk/), and features a tutorial and API reference for the automated QC workflow.
SCTK's documentation is available [here](https://teichlab.github.io/sctk/), and features a tutorial and API reference for scAutoQC (an automated QC workflow).

<img src="https://github.com/Teichlab/sctk/tree/master/docs/notebooks/scautoqc_logo.png" alt="scautoqc_logo" width="200"/>
4 changes: 2 additions & 2 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
API Reference
=============

QC pipeline
-----------
scAutoQC
--------
.. module:: sctk
.. autosummary::
:toctree: modules
Expand Down
62 changes: 35 additions & 27 deletions docs/notebooks/automatic_qc.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,24 @@
"cells": [
{
"cell_type": "markdown",
"id": "mexican-skill",
"id": "previous-province",
"metadata": {},
"source": [
"# Automatic QC workflow tutorial"
"# scAutoQC workflow tutorial"
]
},
{
"cell_type": "markdown",
"id": "peripheral-feeling",
"metadata": {},
"source": [
"<img src=\"scautoqc_logo.png\" alt=\"scautoqc_logo\" width=\"200\"/>"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "hindu-treaty",
"id": "entitled-cargo",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -23,10 +31,10 @@
},
{
"cell_type": "markdown",
"id": "increasing-commercial",
"id": "foster-exhibit",
"metadata": {},
"source": [
"This notebook will show how to apply SCTK's automatic QC workflow. The process has four steps:\n",
"This notebook will show how to apply SCTK's automatic QC workflow, scAutoQC. The process has four steps:\n",
"\n",
" - `sctk.calculate_qc()` computes QC measures\n",
" - `sctk.generate_qc_clusters()` creates QC-space clusters of cells\n",
Expand All @@ -39,7 +47,7 @@
{
"cell_type": "code",
"execution_count": 2,
"id": "identified-costume",
"id": "economic-punishment",
"metadata": {},
"outputs": [
{
Expand All @@ -61,7 +69,7 @@
},
{
"cell_type": "markdown",
"id": "electrical-fighter",
"id": "streaming-facial",
"metadata": {},
"source": [
"This object features raw counts for some PBMC data, and nothing else for now. We can use `sctk.calculate_qc()` to automatically flag some common technical features (the defaults are human mitochondrial, ribosomal and hemoglobin genes) and subsequently use `sc.pp.calculate_qc_metrics()` to compute their percentages in each cell, along with standard measures like the number of genes and counts."
Expand All @@ -70,7 +78,7 @@
{
"cell_type": "code",
"execution_count": 3,
"id": "responsible-valentine",
"id": "hybrid-riverside",
"metadata": {},
"outputs": [
{
Expand All @@ -93,7 +101,7 @@
},
{
"cell_type": "markdown",
"id": "smoking-forum",
"id": "natural-rebound",
"metadata": {},
"source": [
"You can see the `.obs` of the object populated with the QC measures we just generated.\n",
Expand All @@ -104,7 +112,7 @@
{
"cell_type": "code",
"execution_count": 4,
"id": "internal-tissue",
"id": "trained-account",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -138,7 +146,7 @@
},
{
"cell_type": "markdown",
"id": "average-proceeding",
"id": "driven-consumption",
"metadata": {},
"source": [
"There's now an `.obs` column called `qc_cluster`, and an embedding called `X_umap_qc`. Let's take a look!"
Expand All @@ -147,7 +155,7 @@
{
"cell_type": "code",
"execution_count": 5,
"id": "separated-domain",
"id": "frozen-learning",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -180,16 +188,16 @@
},
{
"cell_type": "markdown",
"id": "alpine-friend",
"id": "educational-riding",
"metadata": {},
"source": [
"The next step of the workflow involves determining which of the cells pass QC individually."
"The next step of the scAutoQC workflow involves determining which of the cells pass QC individually."
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "cutting-pressure",
"id": "behind-adjustment",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -227,7 +235,7 @@
},
{
"cell_type": "markdown",
"id": "dominican-thousand",
"id": "endless-cooperative",
"metadata": {},
"source": [
"There's now a `cell_passed_qc` column in `.obs` which features per-cell QC calls."
Expand All @@ -236,7 +244,7 @@
{
"cell_type": "code",
"execution_count": 7,
"id": "capable-gauge",
"id": "ceramic-attention",
"metadata": {},
"outputs": [
{
Expand All @@ -256,7 +264,7 @@
},
{
"cell_type": "markdown",
"id": "ranging-knitting",
"id": "enhanced-server",
"metadata": {},
"source": [
"Controlling the desired QC thresholds requires a bit of explanation.\n",
Expand Down Expand Up @@ -292,7 +300,7 @@
{
"cell_type": "code",
"execution_count": 8,
"id": "incredible-parks",
"id": "mechanical-sympathy",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -323,20 +331,20 @@
},
{
"cell_type": "markdown",
"id": "basic-johnson",
"id": "square-technique",
"metadata": {},
"source": [
"The gene count filtering is different now, as expected.\n",
"\n",
"The final step of the workflow determines computes a fraction of passing cells for each cluster. If a cluster has a high enough fraction of passing cells (controlled via the `threshold` parameter, default 0.5), it's deemed to be a good QC cluster.\n",
"The final step of the scAutoQC workflow determines computes a fraction of passing cells for each cluster. If a cluster has a high enough fraction of passing cells (controlled via the `threshold` parameter, default 0.5), it's deemed to be a good QC cluster.\n",
"\n",
"You can use your own per-cell QC calls here rather than the ones provided by `sctk.cellwise_qc()` if desired, just specify which `.obs` column to take via the `cell_qc_key` argument."
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "lovely-webcam",
"id": "southern-highway",
"metadata": {},
"outputs": [
{
Expand All @@ -361,7 +369,7 @@
},
{
"cell_type": "markdown",
"id": "smoking-reaction",
"id": "rural-margin",
"metadata": {},
"source": [
"There's now a `cluster_passed_qc` column. Let's take a look how it compares to the cell level QC."
Expand All @@ -370,7 +378,7 @@
{
"cell_type": "code",
"execution_count": 10,
"id": "dedicated-hungarian",
"id": "norwegian-difficulty",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -398,7 +406,7 @@
},
{
"cell_type": "markdown",
"id": "eligible-episode",
"id": "economic-satisfaction",
"metadata": {},
"source": [
"We seem to get a nontrivial number of cells individually flagged as poor quality colocating in the top left of the plot, but only a small subset of them remain after cluster membership is leveraged. Let's generate a new set of QC clusters by increasing the resolution parameter value, creating a higher number of smaller clusters as a result."
Expand All @@ -407,7 +415,7 @@
{
"cell_type": "code",
"execution_count": 11,
"id": "optimum-cathedral",
"id": "assumed-westminster",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -438,7 +446,7 @@
},
{
"cell_type": "markdown",
"id": "pleased-superintendent",
"id": "expensive-check",
"metadata": {},
"source": [
"The plots align better now.\n",
Expand Down
Binary file added docs/notebooks/scautoqc_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9c0dd19

Please sign in to comment.