快速入门

0. 测试信息

测试数据:

./Test_data

测试脚本:

./Scripts/quick_start

1. 获取SAW输出的文件

方式一:直接下载SAW count输出的h5ad文件

方式二:从gef转h5ad:saw convert gef2h5ad --gef=sample.tissue.gef --bin-size=100 --h5ad=sample.h5ad

方式三:直接下载SAW aggr(alpha ver.)输出的h5mu文件

2. 细胞类型注释

cell2locationMakeRef 构建单细胞参考数据

SDAS cellAnnotation cell2locationMakeRef --reference ../Test_data/single_slice/sample_ref.h5ad -o ../output/cellAnnotation_cell2location_ref --label_key annotation2 --filter_rare_cell 0 --cell_percentage_cutoff2 0.05 --nonz_mean_cutoff 1.45 --gpu_id 0

cell2location

SDAS cellAnnotation cell2location -i ../Test_data/single_slice/sample.h5ad -o ../output/cell2location --reference_csv ../output/cellAnnotation_cell2location_ref/sample_ref_inf_aver.csv --input_gene_symbol_key _index --bin_size 100 --gpu_id 0

RCTD

SDAS cellAnnotation rctd -i ../Test_data/single_slice/sample.h5ad -o ../output/cellAnnotation_rctd --reference ../Test_data/single_slice/sample_ref.h5ad --label_key annotation2 --input_gene_symbol_key _index --filter_rare_cell 0 --bin_size 100

3. 空间结构域识别

graphST

SDAS spatialDomain graphst -i ../Test_data/single_slice/sample.h5ad -o ../output/spatialDomain_graphST --gpu_id 0 --tool mclust --n_clusters 10 --n_hvg 3000 --bin_size 100

4. 细胞邻域分析

SDAS cellularNeighborhood singleCelltype -i ../output/cellAnnotation_rctd/sample_anno_rctd.h5ad -o ../output/cellularNeighborhood_singleCelltype --bin_size 100 --label_key anno_rctd

5. CNV分析

使用细胞注释后的h5ad,准备rds文件:

SDAS dataProcess h5ad2rds -i ../output/cellAnnotation_rctd/sample_anno_rctd.h5ad -o ../output/cellAnnotation_rctd

运行inferCNV

SDAS infercnv -i ../output/cellAnnotation_rctd/sample_anno_rctd.rds --h5ad ../output/cellAnnotation_rctd/sample_anno_rctd.h5ad -o ../output/infercnv --bin_size 100 --label_key anno_rctd --gene_symbol_key _index --species human --cutoff 0.02 --ref_group_names Mac_SPP1,Monocyte_S100A8,Plasma_IgG,CD8_Tem

6. 空间基因共表达分析

hdWGCNA

SDAS coexpress hdwgcna -i ../Test_data/single_slice/sample.h5ad -o ../output/coexpress_hdwgcna --bin_size 100 --selected_genes top5000

7. 差异基因分析

wilcoxon

SDAS DEG -i ../output/spatialDomain_graphST/sample_domain_graphst.h5ad -o ../output/DEG_wilcoxon --de_method wilcoxon --group_key domain_graphst --ident1 3 --ident2 8

8. 基因集富集分析

GSEA

SDAS geneSetEnrichment gsea -i ../output/spatialDomain_graphST/sample_domain_graphst.h5ad -o ../output/geneSetEnrichment_gsea --species human --group_key domain_graphst --ident1 3 --ident2 8 --gmt sdas_deg_enrichment/lib/GSEADB/h.all.v2024.1.Hs.symbols.gmt

Enrichr

SDAS geneSetEnrichment enrichr -i ../output/DEG_wilcoxon/de_wilcoxon.domain_graphst.3-vs-8.sig_filtered.csv -o ../output/geneSetEnrichment_enrichr --species human --cut_off 0.05

9. 蛋白相互作用

SDAS PPI -i ../Test_data/PPI/gene_300.txt -o ../output/PPI --species human --cluster GN

10. 细胞通讯分析

cellchat

SDAS CCI cellchat -i ../output/cellAnnotation_rctd/sample_anno_rctd.h5ad -o ../output/CCI_cellchat_nospatial --label_key anno_rctd --gene_symbol_key _index --species human --type truncatedMean

11. 轨迹分析

使用注释后的h5ad,准备rds文件:

SDAS dataProcess h5ad2rds -i ../output/cellAnnotation_rctd/sample_anno_rctd.h5ad -o ../output/cellAnnotation_rctd

运行monocle3:

SDAS trajectory monocle3 -i ../output/cellAnnotation_rctd/sample_anno_rctd.rds -o ../output/trajectory_monocle3 --gene_symbol_key _index --root_key anno_rctd --root CAF_CXCL14

12. 转录因子分析

SDAS TF -i ../output/cellAnnotation_rctd/sample_anno_rctd.h5ad -o ../output/TF --label_key anno_rctd --gene_symbol_key _index --species human

13. 空间关系分析

squidpy

SDAS spatialRelate squidpy -i ../output/cellAnnotation_rctd/sample_anno_rctd.h5ad -o ../output/spatialRelate_squidpy --label_key anno_rctd --bin_size 100 --min_cells_per_type 3 --coord_type grid

14. 公共数据验证

immuneScore

SDAS bulkValidate immuneScore --expression ../Test_data/bulkValidate/fpkm.txt --clinical ../Test_data/bulkValidate/clinical.txt -o ../output/bulkValidate_immuneScore --group_col tissue_type.samples --group_type discrete

survivalKM

SDAS bulkValidate survivalKM --input ../output/bulkValidate_immuneScore/tme_combine.txt --clinical ../Test_data/bulkValidate/clinical.txt -o ../output/bulkValidate_survivalKM --signature Macrophages_M2_CIBERSORT --project_name survival --time OS.time --status OS.status --time_type day
© 2025 STOmics Tech. All rights reserved.Modified: 2025-08-01 16:50:17

results matching ""

    No results matching ""