Skip to contents
## The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
## which was just loaded, will retire in October 2023.
## Please refer to R-spatial evolution reports for details, especially
## https://r-spatial.org/r/2023/05/15/evolution4.html.
## It may be desirable to make the sf package available;
## package maintainers should consider adding sf to Suggests:.
## The sp package is now running under evolution status 2
##      (status 2 uses the sf package in place of rgdal)
## Warning: replacing previous import 'dplyr::combine' by 'gridExtra::combine'
## when loading 'SpatialQM'
## Loading required package: SeuratObject
## Loading required package: sp
## 
## Attaching package: 'SeuratObject'
## The following objects are masked from 'package:base':
## 
##     intersect, t
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(gridExtra)
## 
## Attaching package: 'gridExtra'
## The following object is masked from 'package:dplyr':
## 
##     combine
# Return a seurat object 
# result_seu <- readSpatial(sample_id = "test1",path="/mnt/plummergrp/Yutian/Rscripts/SpatiaTouchstone/SpatialTouchstone/Data/TOUCHSTONE_EAP_XRS_FFPE_PR_3_UOA_C_R1/",platform = "Xenium",seurat = TRUE)
result_seu <- readRDS("/mnt/plummergrp/Yutian/Rscripts/SpatiaTouchstone/SpatialTouchstone/Data/Example_Seurat/SpatialTOUCHSTONE_EAP_XRS_FFPE_PR_3_UOA_C_R1_Seurat.rds")
print(result_seu)
## An object of class Seurat 
## 541 features across 80939 samples within 4 assays 
## Active assay: RNA (377 features, 0 variable features)
##  1 layer present: counts
##  3 other assays present: BlankCodeword, ControlCodeword, ControlProbe
##  1 dimensional reduction calculated: tissue
##  1 spatial field of view present: fov
getTxPerCell_seu<- getTxPerCell(expMat=NULL,platform = "Xenium",seu_obj = result_seu)
getTxPerCell_seu
##   sample_id platform    value
## 1     test1   Xenium 63.88845