SubsetSTData | R Documentation |
Subsets a Seurat object containing Spatial Transcriptomics data while
making sure that the images and the spot coordinates are subsetted correctly.
If you use the default subset
function there is a risk that images
are kept in the output Seurat object which will make the STUtility functions
crash.
SubsetSTData( object, expression, spots = NULL, features = NULL, idents = NULL, ... )
object |
A Seurat object containing Staffli data |
expression |
Logical expression indicating features/variables to keep |
spots |
A vector of spots to keep |
features |
A vector of features to keep |
idents |
A vector of identity classes to keep |
... |
Extra parameters passed to WhichCells, such as slot, invert, or downsample |
## Not run: # Subset using meta data to keep spots with more than 1000 unique genes se.subset <- SubsetSTData(se, expression = nFeature_RNA >= 1000) # Subset by a predefined set of spots se.subset <- SubsetSTData(se, spots = keep.spots) # Subset by a predefined set of features se.subset <- SubsetSTData(se, features = keep.features) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.