本次使用GSE217414数据,包含4个结直肠癌肝转移患者样本数据,这个数据集的数据整理的挺好的,都做了归类。

1.导入
rm(list = ls())
library(Seurat) # 4.4.0
library(SeuratData) # 5.0.2
library(tidyverse)
library(sloop)
library(ggplot2)
library(patchwork)
library(dplyr)
# 10x Visium
sce_s <- Load10X_Spatial(data.dir = "./RawData/GSE6716963/",
filename = "GSM6716963_19G081_filtered_feature_bc_matrix.h5")
# # 高像素
# image <- Read10X_Image(image.dir = "./RawData/GSM5494475/spatial/",
# image.name = "tissue_hires_image.png")
# sce_s <- Load10X_Spatial(data.dir = "./RawData/GSM5494475", image = image,
# filename = "GSM5494475_HNSCC201125T04_filtered_feature_bc_matrix.h5")
2.check数据
head(sce_s[["slice1"]]@coordinates)
# tissue row col imagerow imagecol
# AAACAAGTATCTCCCA-1 1 50 102 1363 3426
# AAACACCAATAACTGC-1 1 59 19 4005 3980
# AAACAGAGCGACTCCT-1 1 14 94 1658 1430
# AAACATTTCCCGGATT-1 1 61 97 1510 4041
# AAACCGGGTAGGTACC-1 1 42 28 3736 3029
# AAACCGTTCGTCCAGG-1 1 52 42 3278 3576
dim(sce_s[["slice1"]]@image)
# [1] 564 600 3
# 564 和 600:表示图像的高度(564像素)和宽度(600像素)。
# 3:表示图像的颜色通道数,即RGB(红、绿、蓝)三通道。每个像素位置有三个值,分别对应于红色、绿色和蓝色的强度,用于合成彩色图像。
head(GetTissueCoordinates(sce_s))
# imagerow imagecol
# AAACAAGTATCTCCCA-1 148.1522 372.3913
# AAACACCAATAACTGC-1 435.3261 432.6087
# AAACAGAGCGACTCCT-1 180.2174 155.4348
# AAACATTTCCCGGATT-1 164.1304 439.2391
# AAACCGGGTAGGTACC-1 406.0869 329.2391
# AAACCGTTCGTCCAGG-1 356.3043 388.6956
head(GetTissueCoordinates(sce_s[["slice1"]]))
# imagerow imagecol
# AAACAAGTATCTCCCA-1 148.1522 372.3913
# AAACACCAATAACTGC-1 435.32

最低0.47元/天 解锁文章
2039

被折叠的 条评论
为什么被折叠?



