社区所有版块导航
Python
python开源   Django   Python   DjangoApp   pycharm  
DATA
docker   Elasticsearch  
aigc
aigc   chatgpt  
WEB开发
linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery  
机器学习
机器学习算法  
Python88.com
反馈   公告   社区推广  
产品
短视频  
印度
印度  
Py学习  »  Git

10X空间转录组(七)思考新版Seurat V3.2作者在Github给予的回答

Robin唔系肉饼 • 5 年前 • 1501 次点击  

问题描述:

在对自己跑出来的空间转录组数据用Seurat V3.2进行分析时取子集遇到一个问题,我不知道该如何选取像素点坐标,以及用官网给的字段会出现报错的情况,于是我在Github上作者大神提问,不出意外,下面也有一个跟我遇到的情况类似的。

github issue地址: https://github.com/satijalab/seurat/issues/2454

提问原文(biejiaodeyingwen)

Hi~I meet some problem in Subset out anatomical regions

I use the dataset: Mouse Brain Section (Coronal), and run sapceranger successfully,and get clustering_visualization img.


#Subset out anatomical regions
cortex <- subset(brain, idents = c(0, 1, 2, 5, 10, 11, 12 ))
# now remove additional cells, use SpatialDimPlots to visualize what to remove
# SpatialDimPlot(cortex,cells.highlight = WhichCells(cortex, expression = image_imagerow > 400 |
# image_imagecol < 150))
cortex <- subset(cortex, imgine_imagerow > 400 | image_imagecol < 150, invert = TRUE)
cortex <- subset(cortex, image_imagerow > 275 & image_imagecol > 370, invert = TRUE)
cortex <- subset(cortex, image_imagerow > 250 & image_imagecol > 440, invert = TRUE)

then, the error occur:

> #Subset out anatomical regions
> cortex <- subset(brain, idents = c(0, 1, 2, 5, 10, 11, 12 ))
> # now remove additional cells, use SpatialDimPlots to visualize what to remove
> # SpatialDimPlot(cortex,cells.highlight = WhichCells(cortex, expression = image_imagerow > 400 |
> # image_imagecol < 150))
> cortex <- subset(cortex, imgine_imagerow > 400 | image_imagecol < 150, invert = TRUE)
Error in FetchData(object = object, vars = expr.char[vars.use], cells = cells,  : 
  None of the requested variables were found: 
> cortex <- subset(cortex, image_imagerow > 275 & image_imagecol > 370, invert = TRUE)
Error in FetchData(object = object, vars = expr.char[vars.use], cells = cells,  : 
  None of the requested variables were found: 
> cortex <- subset(cortex, image_imagerow > 250 & image_imagecol > 440, invert = TRUE)
Error in FetchData(object = object, vars = expr.char[vars.use], cells = cells,  : 
  None of the requested variables were found: 

And I have try to use the solution: #1212 (comment) for subsetting on features that have a dash in their name. But it doesn't work.

So,I wonder the structure of seurat may be the key to solve the problem.
I tape:

cortex@images

and saw:

attr(,"class")
[1] "scalefactors"

Slot "coordinates":
                   tissue row col imagerow imagecol
AAACAATCTACTAGCA-1      1   3  43     1611     4170
AAACACCAATAACTGC-1      1  59  19     8315     2519
AAACAGAGCGACTCCT-1      1  14  94     2927     7679

I try change the imgine_imagerow into imagerow, and change the image_imagecol into the imagecol,but it doesn't work again.

And another question is : How can I further segment based on exact positions?

Because I don't know exactly about the coordinates of cortex.How the example in official website actually do in this step?

thanks!

下面有一个小哥给我的问题点了个赞,居然有些小开心。

作者的回答

Hi,

Please try replacing image_imagerow and image_imagecol with anterior1_imagerow and anterior1_imagecol .

This is still under active development but the do.identify parameter of SpatialDimPlot should allow you to select cells manually or at least give you a sense of where you could start to draw some cutoffs.

我的思考

  • 感觉取子集这部分,有点像旧的空间转录组的流程的ST viewer这步生成坐标映射关系表的感觉
  • 作者也说了,这个版本还在开发中,需要但是可以尝试用下他的输入参数

最近暂时还没有空尝试,不过出于Github的社交礼仪,还是想先对作者表示感谢~

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/52426
 
1501 次点击