|
384 | 384 | "outputs": [], |
385 | 385 | "source": [ |
386 | 386 | "# Scatter plots — visually identify outlier cells\n", |
387 | | - "fig, axes = plt.subplots(1, 3, figsize=(18, 4))\n", |
| 387 | + "fig, axes = plt.subplots(1, 2, figsize=(12, 4))\n", |
388 | 388 | "\n", |
389 | 389 | "sc.pl.scatter(adata, x='total_counts', y='pct_counts_mt', ax=axes[0], show=False)\n", |
390 | 390 | "axes[0].axhline(5, color='red', linestyle='--', label='5% MT threshold')\n", |
| 391 | + "axes[0].axvline(7500, color='green', linestyle='--', label='7500 total_counts cutoff')\n", |
391 | 392 | "axes[0].legend()\n", |
392 | 393 | "\n", |
393 | 394 | "sc.pl.scatter(adata, x='total_counts', y='n_genes_by_counts', ax=axes[1], show=False)\n", |
394 | 395 | "axes[1].axhline(2500, color='red', linestyle='--', label='2500 gene threshold')\n", |
| 396 | + "axes[1].axvline(7500, color='green', linestyle='--', label='7500 total_counts cutoff')\n", |
395 | 397 | "axes[1].legend()\n", |
396 | 398 | "\n", |
397 | | - "# Standard total_counts cutoff — flag cells with very low library size\n", |
398 | | - "sc.pl.scatter(adata, x='total_counts', y='n_genes_by_counts', ax=axes[2], show=False)\n", |
399 | | - "axes[2].axvline(500, color='green', linestyle='--', label='500 UMI min (total_counts)')\n", |
400 | | - "axes[2].set_title('total_counts — standard cutoff')\n", |
401 | | - "axes[2].legend()\n", |
402 | | - "\n", |
403 | 399 | "plt.tight_layout()\n", |
404 | 400 | "plt.show()\n" |
405 | 401 | ] |
|
0 commit comments