作者,Evil Genius
生信是一种手段,大家要学会灵活运用,不要生搬硬套,很多时候大家需要根据自己的情况进行修改。
![](https://img-blog.csdnimg.cn/img_convert/aaa667ba59aaf979bfe5888cdf8690b2.webp?x-oss-process=image/format,png)
这也是空转系列课程中上课所得到分析结果。
在文章Integrating microarray-based spatial transcriptomics and single-cell RNA-seq reveals tissue architecture in pancreatic ductal adenocarcinomas中MIA的运用结果是
![](https://img-blog.csdnimg.cn/img_convert/e21d4349c3c9853ca13daa6c8de44f7d.webp?x-oss-process=image/format,png)
好的图片在绘制的时候也需要精心的准备
我们来补充一下,还是用上课的示例数据,初步的实现效果
![](https://img-blog.csdnimg.cn/img_convert/5a65b2eb3320f9e1df258d35f06eaef1.webp?x-oss-process=image/format,png)
#! usr/bin/R
### zhaoyunfei
### 20231111
suppressMessages({
library(Seurat)
library(argparse)
library(dplyr)
library(ggplot2)
library(tidyverse)
})
parser = ArgumentParser()
parser$add_argument("--sc_rds", help="the sc data",required = T)
parser$add_argument("--spatial_rds", help="the sp data",required = T)
parser$add_argument("--sample", help="the sample name",required = T)
parser$add_argument("--outdir", help="the outdir",default = './')
parser$add_argument("--celltype", help="the annotation for celltype")
parser$add_argument("--normalization_method",default = 'SCT',choice = c('SCT','LogNormalize'))
parser$add_argument("-s","--sc_min_pct", help="the min pct for sc diff test",default = 0.3)
parser$add_argument("--sc_logfc", help="the threshold of logfc for sc diff test",default = 0.25)
parser$add_argument("--region", help="the spatial region annotation,eg:Barcode,Cluster")
parser$add_argument("--sp_min_pct", help="the min pct for sp diff test",