基于整合结果的Seurat再分群分析,支持对特定细胞群进行精细化的亚群分析。
本技能用于对已整合的单细胞数据进行再分群分析,支持对特定细胞群进行精细化的亚群分析,生成详细的分析结果和报告。
在执行再分群分析之前,需要完成以下分析步骤:
NG_GPC_SC_RNA_10X_INTEGRATION_SEURAT 并生成 *_combined.rds 文件。再分群完成后,可继续执行以下分析:
| 参数 |
|---|
| 类型 |
|---|
| 说明 |
|---|
| -o, --output | string | 输出目录(必填) |
| --tag | string | 筛选特定细胞群,格式:列名:值1,值2(例如:celltype:T细胞,B细胞) |
| 参数 | 类型 | 说明 |
|---|---|---|
| --rds | string | RDS文件路径(绝对路径或相对路径) |
| --rds_dir | string | RDS文件搜索目录(在该目录下自动查找 *_combined.rds) |
注意:如果指定了 --rds_dir 但未指定 --rds,脚本会在该目录下自动查找 *_combined.rds 文件。如果两者都未指定,脚本会报错。
| 参数 | 类型 | 说明 |
|---|---|---|
| --cluster_bar | string | 细胞类型定义文件路径(CSV,首列Barcode) |
| --cluster_bar_dir | string | 细胞类型定义文件搜索目录(在该目录下自动查找) |
注意:
--cluster_bar_dir 但未指定 --cluster_bar,脚本会在该目录下自动查找 *Barcode_Celltypes.csv 或 *celltype_cluster.xls 文件| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| --species | string | null | 物种信息(可从 skill_jiedu.json 自动获取,否则必须提供) |
| --prefix | string | recluster | 输出文件前缀 |
| --gene_path | string | /TJPROJ5/SC/pipeline/scMulti_model1/pipeline2.0//lib/05.Seurat | 基因注释文件路径 |
| --cca_use | int | 50 | PCA主成分数量 |
| --Nfeatures | int | 2000 | 变量特征基因数量 |
| --resolution | float | 0.6 | 聚类分辨率 |
| --UMAP_neighbors | int | 30 | UMAP邻居数 |
| --UMAP_mindist | float | 0.3 | UMAP最小距离 |
| --reaggr | flag | FALSE | 是否重新整合数据 |
| --method | string | cca | 整合方法:cca、harmony、sketch |
| --Report | string | YES | 是否生成分析报告 |
| --no-auto-celltype | flag | FALSE | 禁用自动查找细胞类型定义文件 |
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| --sjm_queue | string | SC1.q,SC2.q | SJM队列 |
| --sjm_memory | int | 40 | 内存(GB) |
| --sjm_cpu | int | 10 | CPU核心数 |
| --sjm_job_name | string | recluster_analysis | 作业名称 |
| --sjm_log_dir | string | log_file | 日志目录 |
./wrapper_recluster.sh -o <output_dir> --tag <column:value1,value2> [其他参数]
./wrapper_recluster.sh \
-o /path/to/output \
--rds /path/to/rds/data_combined.rds \
--cluster_bar /path/to/celltypes/Barcode_Celltypes.csv \
--tag "celltype:T细胞,B细胞"
./wrapper_recluster.sh \
-o /path/to/output \
--rds_dir /path/to/rds/ \
--cluster_bar_dir /path/to/celltypes/ \
--tag "celltype:T细胞,B细胞"
./wrapper_recluster.sh \
-o /path/to/output \
--rds_dir /path/to/rds/ \
--cluster_bar celltypes.csv \
--cluster_bar_dir /path/to/celltypes/ \
--tag "celltype:T细胞,B细胞"
./wrapper_recluster.sh \
-o /path/to/high_res_output \
--rds_dir /path/to/rds/ \
--tag "celltype:T细胞,B细胞" \
--resolution 1.2 \
--Nfeatures 3000
./wrapper_recluster.sh \
-o /path/to/custom_output \
--rds_dir /path/to/rds/ \
--tag "celltype:T细胞,B细胞" \
--UMAP_neighbors 50 \
--UMAP_mindist 0.1 \
--sjm_memory 64 \
--sjm_cpu 16
{output}/ ├── log.json # 执行状态日志 ├── skill_jiedu.json # 完整元数据 ├── README.txt # 分析结果说明 ├── Result-{prefix}_ReCluster/ # 再分群分析结果(当Report=YES时) │ ├── Anchors/ # 聚类结果 │ ├── DIFF/ # 差异分析 │ ├── Marker/ # 标记基因 │ ├── CellsRatio/ # 细胞比例 │ └── gene_bar/ # 基因表达数据 ├── Report-{prefix}_ReCluster/ # 分析报告(当Report=YES时) └── log_file/ # 运行日志
| 文件类型 | 说明 | 位置 |
|---|---|---|
| 聚类结果 | 再分群后的聚类结果 | Result-{prefix}_ReCluster/Anchors/ |
| 差异分析 | 亚群间差异表达基因 | Result-{prefix}_ReCluster/DIFF/ |
| 标记基因 | 各亚群的marker基因 | Result-{prefix}_ReCluster/Marker/ |
| 细胞比例 | 亚群细胞比例分析 | Result-{prefix}_ReCluster/CellsRatio/ |
| 基因表达 | 基因表达数据 | Result-{prefix}_ReCluster/gene_bar/ |
| 分析报告 | 详细的分析报告 | Report-{prefix}_ReCluster/ |
脚本会根据细胞数量自动计算资源需求:
| 细胞数量 | 内存 | CPU核心数 |
|---|---|---|
| ≤ 50,000细胞 | 32G | 8核 |
| ≤ 100,000细胞 | 64G | 16核 |
| > 100,000细胞 | 128G | 32核 |
/ 开头的路径被视为绝对路径/ 开头的路径会相对于对应的 _dir 参数解析
--rds 的相对路径相对于 --rds_dir 解析--cluster_bar 的相对路径相对于 --cluster_bar_dir 解析--rds_dir 目录下查找 *_combined.rds 文件--cluster_bar_dir 目录下按优先级查找:
*Barcode_Celltypes.csv*celltype_cluster.xls脚本会按以下顺序尝试获取物种信息:
--rds_dir 目录中查找 skill_jiedu.json--cluster_bar_dir 目录中查找 skill_jiedu.json--species 参数手动指定