对单细胞RNA测序数据进行质量控制、过滤低质量细胞并生成可视化结果
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "single-cell-rna-qc" 技能: 1. 下载 https://raw.githubusercontent.com/anthropics/knowledge-work-plugins/main/bio-research/skills/single-cell-rna-qc/SKILL.md 2. 保存为 ~/.claude/skills/single-cell-rna-qc/SKILL.md 3. 装好后重载技能,告诉我可以用了
请对这个 .h5ad 单细胞RNA测序数据集做质量控制,按照 scverse/scanpy 最佳实践进行 MAD-based 过滤,识别低质量细胞,并输出关键质控图与过滤建议。
返回质控指标汇总、低质量细胞过滤结果以及包含基因数、UMI数和线粒体比例等的可视化图表。
帮我评估这个 .h5 文件中的单细胞RNA测序数据质量,检查是否存在异常细胞、低复杂度细胞或高线粒体污染,并说明数据是否适合进入下游分析。
给出数据质量诊断结论、异常细胞特征说明,以及是否建议继续做聚类和差异分析的判断。
请基于这个单细胞RNA测序数据文件生成一份标准化质控报告,包括过滤阈值、保留细胞数量、剔除原因和主要可视化结果,便于我汇报实验数据质量。
输出结构化质控报告,清楚展示阈值设置、过滤前后统计对比及主要图表结论。
Automated QC workflow for single-cell RNA-seq data following scverse best practices.
Use when users:
Supported input formats:
.h5ad files (AnnData format from scanpy/Python workflows).h5 files (10X Genomics Cell Ranger output)Default recommendation: Use Approach 1 (complete pipeline) unless the user has specific custom requirements or explicitly requests non-standard filtering logic.
For standard QC following scverse best practices, use the convenience script scripts/qc_analysis.py:
python3 scripts/qc_analysis.py input.h5ad
# or for 10X Genomics .h5 files:
python3 scripts/qc_analysis.py raw_feature_bc_matrix.h5
The script automatically detects the file format and loads it appropriately.
When to use this approach:
Requirements: anndata, scanpy, scipy, matplotlib, seaborn, numpy
Parameters:
Customize filtering thresholds and gene patterns using command-line parameters:
--output-dir - Output directory--mad-counts, --mad-genes, --mad-mt - MAD thresholds for counts/genes/MT%--mt-threshold - Hard mitochondrial % cutoff--min-cells - Gene filtering threshold--mt-pattern, --ribo-pattern, --hb-pattern - Gene name patterns for different speciesUse --help to see current default values.
Outputs:
All files are saved to <input_basename>_qc_results/ directory by default (or to the directory specified by --output-dir):
qc_metrics_before_filtering.png - Pre-filtering visualizationsqc_filtering_thresholds.png - MAD-based threshold overlaysqc_metrics_after_filtering.png - Post-filtering quality metrics<input_basename>_filtered.h5ad - Clean, filtered dataset ready for downstream analysis<input_basename>_with_qc.h5ad - Original data with QC annotations preservedIf copying outputs for user access, copy individual files (not the entire directory) so users can preview them directly.
The script performs the following steps:
For custom analysis workflows or non-standard requirements, use the modular utility functions from scripts/qc_core.py and scripts/qc_plotting.py:
# Run from scripts/ directory, or add scripts/ to sys.path if needed
import anndata as ad
from qc_core import calculate_qc_metrics, detect_outliers_mad, filter_cells
from qc_plotting import plot_qc_distributions # Only if visualization needed
adata = ad.read_h5ad('input.h5ad')
calculate_qc_metrics(adata, inplace=True)
# ... custom analysis logic here
When to use this approach:
Available utility functions:
From qc_core.py (core QC operations):
…
运行 nf-core/Nextflow 流水线,完成 RNA-seq、变异检测与 ATAC-seq 数据分析
为特定组织定制 Claude Code 插件配置、连接器与工作流适配方案。
围绕客户问题进行多来源调研与溯源,快速整理背景并支持准确回复。
帮助你快速查询指标、分析趋势成因,并生成面向干系人的数据报告。
用于统计分析数据分布、趋势、异常与显著性检验,辅助得出可靠结论
帮助你用 Python 制作清晰专业的数据可视化并选择合适图表。
用于单细胞多组学深度学习分析、整合校正与参考映射的专业技能
用自然语言查询 Excel 和 CSV 数据,快速完成分析与表格洞察。
帮助用户直接分析本地 CSV 或 Parquet 大数据文件并生成洞察。
快速剖析新数据集的结构、质量与分布特征,辅助后续分析决策
帮助用户检索 Markdown 知识库、笔记与文档,快速定位所需信息。
在分享分析结论前,检查方法、计算、偏差与结论是否可靠