The Seurat Class and Interaction Methods

Seurat-class Seurat

The Seurat Class

Seurat-validity

Seurat Object Validity

AddMetaData()

Add in metadata associated with either cells or features.

CreateSeuratObject()

Create a Seurat object

Idents() `Idents<-`() RenameIdents() ReorderIdent() SetIdent() StashIdent() droplevels(<Seurat>) levels(<Seurat>) `levels<-`(<Seurat>)

Get, set, and manipulate an object's identity classes

Project() `Project<-`()

Get and set project information

RenameAssays()

Rename assays in a Seurat object

RenameCells()

Rename cells

UpdateSeuratObject()

Update old Seurat object to accommodate new features

as.Seurat()

Coerce to a Seurat Object

`$`(<Seurat>) `$<-`(<Seurat>) `[[<-`(<Seurat>,<character>,<missing>,<data.frame>) `[[<-`(<Seurat>,<missing>,<missing>,<data.frame>) `[[<-`(<Seurat>,<character>,<missing>,<factor>) `[[<-`(<Seurat>,<character>,<missing>,<list>) `[[<-`(<Seurat>,<missing>,<missing>,<list>) `[[<-`(<Seurat>,<character>,<missing>,<vector>)

Cell-Level Meta Data

dim(<Seurat>)

Feature and Cell Numbers

dimnames(<Seurat>) `dimnames<-`(<Seurat>)

Feature and Cell Names

merge(<Seurat>)

Merge Seurat Objects

names(<Seurat>)

Subobject Names

`[[`(<Seurat>) head(<Seurat>) tail(<Seurat>)

Subobjects and Cell-Level Meta Data

`[[<-`(<Seurat>,<character>,<missing>,<NULL>)

Remove Subobjects and Cell-Level Meta Data

`[[<-`(<Seurat>,<character>,<missing>,<Assay>) `[[<-`(<Seurat>,<character>,<missing>,<Assay5>) `[[<-`(<Seurat>,<character>,<missing>,<DimReduc>) `[[<-`(<Seurat>,<character>,<missing>,<Graph>) `[[<-`(<Seurat>,<character>,<missing>,<Neighbor>) `[[<-`(<Seurat>,<character>,<missing>,<SeuratCommand>) `[[<-`(<Seurat>,<character>,<missing>,<SpatialImage>)

Add Subobjects

subset(<Seurat>) `[`(<Seurat>)

Subset Seurat Objects

The v5 Assay Class and Interaction Methods

Assay5-class Assay5

The v5 Assay Object

Assay5-validity

V5 Assay Validity

CastAssay()

Cast Assay Layers

DefaultLayer() `DefaultLayer<-`()

Default Layer

JoinLayers()

Split and Join Layers Together

`$`(<Assay5>) `$<-`(<Assay5>)

Layer Data

dim(<Assay5>)

Feature and Cell Numbers

dimnames(<Assay5>) `dimnames<-`(<Assay5>)

Assay-Level Feature and Cell Names

merge(<Assay5>)

Merge Assays

split(<Assay5>)

Split an Assay

`[`(<Assay5>) `[<-`(<Assay5>,<character>,<ANY>,<ANY>)

Layer Data

`[[`(<Assay5>) `[[<-`(<Assay5>,<ANY>,<ANY>,<ANY>) head(<Assay5>) tail(<Assay5>)

Feature-Level Meta Data

subset(<Assay5>)

Subset an Assay

The v3 Assay Class and Interaction Methods

Assay-class Assay

The Assay Class

Assay-validity

V3 Assay Validity

CreateAssay5Object()

Create a v5 Assay object

CreateAssayObject()

Create an Assay object

`$`(<Assay>) `$<-`(<Assay>)

Layer Data

dim(<Assay>)

Feature and Cell Numbers

dimnames(<Assay>) `dimnames<-`(<Assay>)

Assay-Level Feature and Cell Names

merge(<Assay>)

Merge Assays

split(<Assay>)

Split an Assay

`[`(<Assay>) `[<-`(<Assay>,<character>,<ANY>,<ANY>)

Layer Data

`[[`(<Assay>) `[[<-`(<Assay>,<ANY>,<ANY>,<ANY>) head(<Assay>) tail(<Assay>) `[[<-`(<Assay>,<missing>,<missing>,<data.frame>)

Feature-Level Meta Data

subset(<Assay>)

Subset an Assay

The DimReduc and JackStrawData Classes and Interaction Methods

DimReduc-class DimReduc

The Dimensional Reduction Class

DimReduc-validity

Dimensional Reduction Validity

CreateDimReducObject()

Create a DimReduc object

dim(<DimReduc>) dimnames(<DimReduc>) length(<DimReduc>) names(<DimReduc>)

Dimensional Reduction Meta-Information

merge(<DimReduc>)

Merge Dimensional Reductions

print(<DimReduc>)

Print Top Feature Loadings

`[`(<DimReduc>)

Get Feature Loadings

`[[`(<DimReduc>)

Get Cell Embeddings

subset(<DimReduc>)

Subset a Dimensional Reduction

JackStrawData-class JackStrawData

The JackStrawData Class

.DollarNames(<JackStrawData>) `$`(<JackStrawData>) as.logical(<JackStrawData>) show(<JackStrawData>)

JackStrawData Methods

JS() `JS<-`()

Get and set JackStraw information

Imaging-Based Spatial Classes and Methods

FOV-class FOV

The Field of View Object

Cells(<FOV>) Features(<FOV>) FetchData(<FOV>) GetTissueCoordinates(<FOV>) Keys(<FOV>) RenameCells(<FOV>) `$`(<FOV>) `[`(<FOV>) `[[`(<FOV>) length(<FOV>) names(<FOV>) subset(<FOV>) `[[<-`(<FOV>,<character>,<missing>,<Centroids>) `[[<-`(<FOV>,<character>,<missing>,<Molecules>) `[[<-`(<FOV>,<character>,<missing>,<NULL>) `[[<-`(<FOV>,<character>,<missing>,<Segmentation>) show(<FOV>)

FOV Methods

FOV-validity

FOV Validity

Centroids-class

The Centroids Class

Cells(<Centroids>) GetTissueCoordinates(<Centroids>) Radius(<Centroids>) RenameCells(<Centroids>) Theta(<Centroids>) is.finite(<Centroids>) is.infinite(<Centroids>) length(<Centroids>) lengths(<Centroids>) subset(<Centroids>) `[`(<Centroids>,<character>,<ANY>,<ANY>) `[`(<Centroids>,<numeric>,<ANY>,<ANY>) show(<Centroids>)

Centroids Methods

Molecules-class

The Spatial Molecules Class

Features(<Molecules>) GetTissueCoordinates(<Molecules>) subset(<Molecules>) show(<Molecules>)

Molecules Methods

Segmentation-class

The Segmentation Class

Cells(<Segmentation>) GetTissueCoordinates(<Segmentation>) RenameCells(<Segmentation>) lengths(<Segmentation>) subset(<Segmentation>) `[`(<Segmentation>,<ANY>,<ANY>,<ANY>) coordinates(<Segmentation>) show(<Segmentation>)

Segmentation Methods

Boundaries() DefaultBoundary() `DefaultBoundary<-`() Molecules()

Get, Set, and Query Segmentation Boundaries

CreateCentroids()

Create a Centroids Objects

CreateFOV()

Create Spatial Coordinates

CreateMolecules()

Create a Molecules Object

CreateSegmentation()

Create a Segmentation Objects

Crop()

Crop Coordinates

DefaultFOV() `DefaultFOV<-`()

Get and Set the Default FOV

Overlay()

Overlay Spatial Objects Over One Another

Simplify()

Simplify Geometry

Theta()

Get the offset angle

as.Centroids() as.Segmentation()

Convert Segmentation Layers

The SeuratCommand Class and Interaction Methods

SeuratCommand-class SeuratCommand

The SeuratCommand Class

LogSeuratCommand()

Log a command

as.list(<SeuratCommand>)

Coerce a SeuratCommand to a list

`$`(<SeuratCommand>)

Command Log Parameter Access

.DollarNames(<SeuratCommand>)

Dollar-sign Autocompletion

`[`(<SeuratCommand>)

Command Log Data Access

The SpatialImage Class and Interaction Methods

SpatialImage-class SpatialImage

The SpatialImage class

Cells(<SpatialImage>) DefaultAssay(<SpatialImage>) `DefaultAssay<-`(<SpatialImage>) GetImage(<SpatialImage>) GetTissueCoordinates(<SpatialImage>) IsGlobal(<SpatialImage>) Key(<SpatialImage>) `Key<-`(<SpatialImage>) Radius(<SpatialImage>) RenameCells(<SpatialImage>) `[`(<SpatialImage>) dim(<SpatialImage>) subset(<SpatialImage>) show(<SpatialImage>)

SpatialImage methods

Radius()

Get the spot radius from an image

The Graph and Neighbor Classes and Interaction Methods

Graph-class Graph

The Graph Class

as.Graph()

Coerce to a Graph Object

Neighbor-class Neighbor

The Neighbor class

dim(<Neighbor>) show(<Neighbor>)

Neighbor Methods

as.Neighbor()

Coerce to a Neighbor Object

Accessing and Setting Object Data

GetAssayData() SetAssayData()

Get and Set Assay Data

Cells() Features()

Cell and Feature Names

CellsByIdentities()

Get cell names grouped by identity class

CellsByImage()

Get a vector of cell names associated with an image (or set of images)

Command()

Get SeuratCommands

DefaultAssay() `DefaultAssay<-`()

Default Assay

Distances()

Get the Neighbor nearest neighbors distance matrix

Embeddings()

Get Cell Embeddings

FetchData()

Access cellular data

GetImage()

Get image data

GetTissueCoordinates()

Get tissue coordinates

Images()

Pull spatial image names

Indices()

Get Neighbor nearest neighbor index matrices

IsGlobal()

Is an object global/persistent?

Key() Keys() `Key<-`()

Get and set object keys

LayerData() `LayerData<-`() Layers()

Query and Manipulate Assay Layers

Loadings() `Loadings<-`()

Get and set feature loadings

Misc() `Misc<-`()

Get and set miscellaneous data

Index() `Index<-`()

Get Neighbor algorithm index

Assays() Graphs() Neighbors() Reductions()

Query Specific Object Types

Stdev()

Get the standard deviations for an object

Tool() `Tool<-`()

Get and Set Additional Tool Data

HVFInfo() VariableFeatures() `VariableFeatures<-`() SVFInfo() SpatiallyVariableFeatures()

Highly Variable Features

Version()

Get Version Information

WhichCells()

Identify cells matching certain criteria

Utility Functions

`%||%` `%iff%`

Set If or If Not NULL

AttachDeps()

Attach Required Packages

CheckGC()

Conditional Garbage Collection

CheckLayersName()

Check layers names for the input list

DefaultDimReduc()

Find the default DimReduc

EmptyMatrix()

Empty Matrices

FilterObjects()

Find Sub-objects of a Certain Class

IsMatrixEmpty()

Check if a matrix is empty

IsNamedList()

Check List Names

PackageCheck()

Check the existence of a package

RandomName()

Generate a random name

RowMergeSparseMatrices()

Merge Sparse Matrices by Row

SaveSeuratRds() LoadSeuratRds()

Save and Load Seurat Objects from Rds files

StitchMatrix()

Stitch Matrices Together

UpdateSlots()

Update slots in an object

as.sparse()

Cast to Sparse

Package Information

SeuratObject SeuratObject-package

SeuratObject: Data Structures for Single Cell Data

pbmc_small

A small example version of the PBMC dataset

Logical Maps

LogMap() `[[`(<LogMap>,<character>,<missing>) `[[`(<LogMap>,<missing>,<missing>) `[[`(<LogMap>,<NULL>,<missing>) `[[<-`(<LogMap>,<character>,<missing>,<character>) `[[<-`(<LogMap>,<character>,<missing>,<integer>) `[[<-`(<LogMap>,<character>,<missing>,<NULL>) `[[<-`(<LogMap>,<character>,<missing>,<numeric>)

A Logical Map

LogMap-validity

Logical Map Validity

as.matrix(<LogMap>)

Coerce Logical Maps to Matrices

droplevels(<LogMap>)

Drop Unused Logical Map Values

intersect(<LogMap>)

Find Common Logical Map Values

labels(<LogMap>)

Find Observations by Value

show(<LogMap>)

LogMap Object Overview