单细胞数据降维可视化分析,支持 UMAP 和 t-SNE 可视化,可根据不同分组变量生成多种样式的降维图。
本技能用于对单细胞数据进行降维可视化分析,支持 UMAP 和 t-SNE 两种降维方法。
| 参数 | 类型 | 说明 |
|---|---|---|
| input | string | 输入项目集群路径(例如:/TJPROJ5/SC/project/xxx) |
| output | string | 输出目录 |
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| execution_mode | string | local | 执行模式:local(本地执行)或 cluster(投递任务) |
| group | string/list | seurat_clusters | 分组变量,支持多个 |
| reduction | string | both | 降维方法:umap、tsne、both |
| theme | string | default | 主题样式:default、theme_blank、theme_classic |
| palette | string | default | 配色方案:default、seurat |
| legend_position | string | right | 图例位置:right、left、top、bottom、none |
| 参数 | 固定值 | 说明 |
|---|---|---|
| width | 7 | 图片宽度(英寸) |
| height | 6 | 图片高度(英寸) |
| dpi | 300 | 图片DPI |
脚本会根据数据大小自动计算资源需求(sjm格式):
| 数据规模 | 内存(vf) | CPU(p) | 时间 |
|---|---|---|---|
| < 5千细胞 | 2G | 1核 | 0:10:00 |
| 5千-1万细胞 | 4G | 2核 | 0:15:00 |
| 1-2万细胞 | 8G | 4核 | 0:20:00 |
| 2-5万细胞 | 16G | 8核 | 0:40:00 |
| 5-10万细胞 | 32G | 16核 | 1:30:00 |
| > 10万细胞 | 64G | 16核 | 2:00:00+ |
{output}/ ├── log.json # 执行日志(status、error_code、error_msg) ├── skill_jiedu.json # 完整元数据 ├── job_info.json # (仅cluster模式)任务投递信息 └── viz_{group}{reduction}{theme}{palette}.png └── viz{group}{reduction}{theme}_{palette}.pdf
{sjm_log_dir}/ ├── {job_name}{timestamp}.sh # 实际执行的shell脚本 └── {job_name}{timestamp}.sjm # SJM提交文件(job_begin/job_end格式)
job_begin name dimplot_20240324_143022 sched_options -S /bin/bash -q SC1.q -q SC2.q -q SC3.q -w n -cwd -V -l vf=16G,p=8 cmd sh /path/to/log_file/dimplot_20240324_143022.sh job_end
{
"input": "/TJPROJ5/SC/project/single_cell_data",
"output": "./dimplot_results",
"execution_mode": "local",
"group": ["seurat_clusters"],
"reduction": "both"
}
### 投递到集群
{
"input": "/TJPROJ5/SC/project/large_dataset",
"output": "/TJPROJ5/SC/results/dimplot",
"execution_mode": "cluster",
"group": ["cell_type"],
"reduction": "umap",
"sjm_queue": "SC1.q,SC2.q,SC3.q",
"sjm_job_name": "large_dimplot"
}
## 注意事项
输入目录必须包含 .rds 格式的Seurat对象文件
数据必须已完成降维分析(UMAP 或 t-SNE)
图片尺寸固定为 7x6 英寸,DPI 300
Cluster模式下,资源需求会根据数据大小自动计算
生成的SJM文件格式为 job_begin/job_end,使用 sjm 命令提交