Skip to contents

Giotto

Create a Giotto Object

createGiottoObject()
Create a giotto object
createGiottoObjectSubcellular()
Create a giotto object from subcellular data

Updaters

Objects version compatibility v3.0 and up

updateGiottoObject()
Update giotto object
updateGiottoPointsObject()
Update giotto points object
updateGiottoPolygonObject()
Update giotto polygon object

Ingestion

Read

Read data in and create Giotto-native objects

readCellMetadata()
Read cell metadata
readFeatMetadata()
Read feature metadata
readPolygonData()
Read list of polygons information
readFeatData()
Read feature information
readExprData()
Read expression data
readExprMatrix()
Read expression matrix
readSpatLocsData()
Read spatial location data
readSpatNetData()
Read spatial networks
readSpatEnrichData()
Read spatial enrichment
readDimReducData()
Read dimensional reduction data
readNearestNetData()
Read nearest neighbor network data

evaluate

Evaluate and format data for usage with Giotto

evaluate_input()
Evaluate raw inputs to Giotto formatting

Create

Create Giotto-native objects

Access

Getters

Get data from a Giotto Object

getCellMetadata()
getCellMetadata
getFeatureMetadata()
getFeatureMetadata
getPolygonInfo()
Get polygon info
getFeatureInfo()
Get feature info
getExpression()
Get expression values
getSpatialLocations()
Get spatial locations
getSpatialNetwork()
Get spatial network
getSpatialEnrichment()
Get spatial enrichment
getDimReduction()
Get dimension reduction
getMultiomics()
Get multiomics integration results
getNearestNetwork()
Get nearest neighbor network
getGiottoImage()
Get giotto image object
spatValues()
Giotto object spatial values

Setters

Set (and replace) Giotto-native data objects in a Giotto Object

Append

Add information to the Giotto Object

addCellMetadata()
Add cell metadata
addFeatMetadata()
Add feature metadata
addGiottoImage()
addGiottoImage
addGiottoImageMG()
addGiottoImageMG
addGiottoLargeImage()
addGiottoLargeImage

Gobject Contents

Print

Print Giotto object slot contents

showGiottoCellMetadata()
showGiottoCellMetadata
showGiottoFeatMetadata()
showGiottoFeatMetadata
showGiottoSpatialInfo()
showGiottoSpatialInfo
showGiottoFeatInfo()
showGiottoFeatInfo
showGiottoExpression()
showGiottoExpression
showGiottoSpatLocs()
showGiottoSpatLocs
showGiottoSpatNetworks()
showGiottoSpatNetworks
showGiottoSpatEnrichments()
showGiottoSpatEnrichments
showGiottoDimRed()
showGiottoDimRed
showGiottoNearestNetworks()
showGiottoNearestNetworks
showGiottoImageNames()
showGiottoImageNames

Return available data

Return slot contents as data.table with nested locations

list_cell_metadata()
list_cell_metadata
list_dim_reductions()
list_dim_reductions
list_expression()
list_expression
list_feat_metadata()
list_feat_metadata
list_feature_info()
list_feature_info
list_images()
list_images
list_nearest_networks()
list_nearest_networks
list_spatial_enrichments()
list_spatial_enrichments
list_spatial_grids()
list_spatial_grids
list_spatial_info()
list_spatial_info
list_spatial_locations()
list_spatial_locations
list_spatial_networks()
list_spatial_networks

Return names of available data

List slot contents as character vector. The spat_unit and/or feat_type usually must be provided.

list_cell_id_names()
List cell ID names
list_feat_id_names()
List feat ID names
list_dim_reductions_names()
list_dim_reductions_names
list_expression_names()
list_expression_names
list_feature_info_names()
list_feature_info_names
list_images_names()
list_images_names
list_nearest_networks_names()
list_nearest_networks_names
list_spatial_enrichments_names()
list_spatial_enrichments_names
list_spatial_grids_names()
list_spatial_grids_names
list_spatial_info_names()
list_spatial_info_names
list_spatial_locations_names()
list_spatial_locations_names
list_spatial_networks_names()
list_spatial_networks_names

Annotate

Giotto object metdata and annotation tools

pDataDT()
pDataDT
fDataDT()
fDataDT
annotateGiotto()
Annotate Giotto object
removeCellAnnotation()
Remove cell annotation
removeFeatAnnotation()
Remove feature annotation
annotateSpatialNetwork()
annotateSpatialNetwork
calculateMetaTable()
calculateMetaTable
calculateMetaTableCells()
calculateMetaTableCells
calculateSpatCellMetadataProportions()
calculateSpatCellMetadataProportions

Instructions

Set instructions for Giotto Object behavior

Subset

Subsetting the Giotto Object

subsetGiotto()
subsetGiotto
subsetGiottoLocs()
Subset by spatial locations
subsetGiottoLocsMulti()
deprecated
subsetGiottoLocsSubcellular()
Subset raw subcellular information by location

Join and Split

Joining and Splitting Giotto Objects

joinGiottoObjects()
Join giotto objects
splitGiotto()
Split a Giotto Object
sliceGiotto()
Slice giotto object by spat_unit and feat_type

Poly Generation

Creation of polygon shapes and arrays

hexVertices()
Generate regular hexagon vertices
rectVertices()
Generate rectangular polygon vertices
circleVertices()
Generate circle polygon vertices
makePseudoVisium()
makePseudoVisium
polyStamp()
Spatial polygons stamp
tessellate()
Tessellated grid of polygons
triGrid() orthoGrid()
Spatial grids

Interoperability

From

Convert from other frameworks to Giotto

anndataToGiotto()
Convert anndata to Giotto
gefToGiotto()
Convert gef to Giotto
seuratToGiotto()
Deprecated
seuratToGiottoV4()
Convert a Seurat V4 object to a Giotto object
seuratToGiottoV5()
Convert a Seurat V5 object to a Giotto object
spatialExperimentToGiotto()
Utility function to convert a SpatialExperiment object to a Giotto object
spatialdataToGiotto()
Convert SpatialData to Giotto
giottoMasterToSuite()
Convert a master Giotto object to suite

To

Convert Giotto Object to other frameworks

giottoToAnnData()
Convert Giotto to anndata
giottoToSeurat()
Deprecated
giottoToSeuratV4()
Convert Giotto to Seurat V4
giottoToSeuratV5()
Convert Giotto to Seurat V5
giottoToSpatialData()
Convert Giotto to SpatialData
giottoToSpatialExperiment()
Utility function to convert a Giotto object to a SpatialExperiment object.
createBentoAdata()
Create bento adata object from gobject

Aggregate

Polygon

Polygon and spatial unit aggregation and combination

aggregateStacks()
aggregateStacks
aggregateStacksExpression()
aggregateStacksExpression
aggregateStacksLocations()
aggregateStacksLocations
aggregateStacksPolygonOverlaps()
aggregateStacksPolygonOverlaps
aggregateStacksPolygons()
aggregateStacksPolygons
combineToMultiPolygon()
Combine giottoPolygon geometries

Feature

Calculate spatial features overlapped by polygons

Matrix

Convert overlapped features to raw expression matrix

Centroids

Centroid calculation

addSpatialCentroidLocations()
addSpatialCentroidLocations
addSpatialCentroidLocationsLayer()
addSpatialCentroidLocationsLayer
centroids(<giottoPolygon>)
centroids-generic

Combine

Create combined table of metadata and other results and data

combineCellData()
combineCellData
combineFeatureData()
combineFeatureData
combineFeatureOverlapData()
combineFeatureOverlapData
combineMetadata()
combineMetadata
combineSpatialCellMetadataInfo()
combineSpatialCellMetadataInfo

Metafeatures

Metafeature creation

createMetafeats()
createMetafeats

Classes

GiottoClass defined classes

cellMetaObj-class cellMetaObj
S4 cellMetaObj
dimObj-class dimObj
S4 dimObj Class
exprObj-class exprObj
S4 exprObj
featMetaObj-class featMetaObj
S4 featMetaObj
featureNetwork-class featureNetwork
S4 giotto feature network Class
giotto-class giotto
S4 giotto Class
giottoAffineImage-class
S4 giottoAffineImage Class
giottoImage-class giottoImage
S4 giottoImage Class
giottoLargeImage-class giottoLargeImage
S4 giottoLargeImage Class
giottoPoints-class giottoPoints
S4 giotto points Class
giottoPolygon-class giottoPolygon
S4 giotto polygon Class
miscData-class
Basic class for additional miscellaneous information
nnNetObj-class nnNetObj
S4 nnNetObj
spatEnrObj-class
S4 spatEnrObj Class
spatLocsObj-class spatLocsObj
S4 spatLocsObj Class
spatialGridObj-class
S4 spatialGridObj Class
spatialNetworkObj-class
S4 spatialNetworkObj Class
terraVectData-class terraVectData
Basic class for terra SpatVector-based objects

Networks

Network creation and tools

createNetwork()
Create a network
edge_distances()
Calculate network edge euclidean distances
createSpatialNetwork()
Create spatial network
createSpatialDelaunayNetwork()
Create a spatial Delaunay network
createSpatialFeaturesKNNnetwork()
Create kNN spatial feature network
createSpatialKNNnetwork()
createSpatialKNNnetwork
createSpatialWeightMatrix()
Create a spatial weight matrix
spat_net_to_igraph()
Convert spatialNetworkObj to igraph
createNearestNetwork()
createNearestNetwork
addNetworkLayout()
addNetworkLayout

Spatial

Manipulation

Spatial manipulation and terra-based functions

ext(<spatLocsObj>) ext(<giottoPolygon>) ext(<giottoPoints>) ext(<spatialNetworkObj>) ext(<giottoLargeImage>) ext(<giottoImage>) ext(<giotto>) ext(<giottoAffineImage>) ext(<affine2d>) `ext<-`(<giottoPoints>,<SpatExtent>) `ext<-`(<giottoPolygon>,<SpatExtent>) `ext<-`(<giottoLargeImage>,<SpatExtent>) `ext<-`(<ANY>,<ANY>) `ext<-`(<giottoImage>,<SpatExtent>) `ext<-`(<affine2d>,<ANY>)
Get a SpatExtent
XY(<spatLocsObj>) `XY<-`(<spatLocsObj>,<matrix>) XY(<giottoPoints>) `XY<-`(<giottoPoints>,<ANY>) XY(<giottoPolygon>) `XY<-`(<giottoPolygon>,<ANY>) XY(<SpatVector>) `XY<-`(<SpatVector>,<matrix>)
Spatial coordinates
flip(<giotto>) flip(<giottoPolygon>) flip(<giottoPoints>) flip(<spatLocsObj>) flip(<spatialNetworkObj>) flip(<giottoLargeImage>) flip(<SpatExtent>) flip(<giottoAffineImage>) flip(<affine2d>)
Flip an object
crop(<giottoLargeImage>) crop(<giottoAffineImage>) crop(<spatLocsObj>) crop(<spatialNetworkObj>) crop(<giottoPoints>) crop(<giottoPolygon>)
Crop to a spatial subset
t(<giotto>) t(<spatLocsObj>) t(<spatialNetworkObj>) t(<giottoPoints>) t(<giottoPolygon>) t(<giottoLargeImage>) t(<giottoAffineImage>) t(<affine2d>)
Transpose
spin(<giotto>) spin(<giottoPolygon>) spin(<giottoPoints>) spin(<spatLocsObj>) spin(<data.frame>) spin(<giottoLargeImage>) spin(<giottoAffineImage>) spin(<affine2d>)
Spin an object
spatShift(<giotto>) spatShift(<SpatExtent>) spatShift(<spatLocsObj>) spatShift(<data.frame>) spatShift(<spatialNetworkObj>) spatShift(<giottoPolygon>) spatShift(<giottoPoints>) spatShift(<giottoLargeImage>) spatShift(<giottoImage>) spatShift(<giottoAffineImage>) spatShift(<affine2d>)
Spatially shift an object
rescale(<giotto>) rescale(<spatLocsObj>) rescale(<data.frame>) rescale(<giottoPolygon>) rescale(<giottoPoints>) rescale(<giottoImage>) rescale(<giottoLargeImage>) rescale(<giottoAffineImage>) rescale(<affine2d>)
Rescale an object
shear(<spatLocsObj>) shear(<SpatVector>) shear(<giottoPoints>) shear(<giottoPolygon>) shear(<giottoLargeImage>) shear(<giottoAffineImage>) shear(<affine2d>)
Apply a shear tranform
affine(<giotto>,<matrix>) affine(<missing>,<missing>) affine(<ANY>,<missing>) affine(<ANY>,<affine2d>) affine(<SpatVector>,<matrix>) affine(<giottoPoints>,<matrix>) affine(<giottoPolygon>,<matrix>) affine(<spatLocsObj>,<matrix>) affine(<giottoLargeImage>,<matrix>) affine(<giottoAffineImage>,<matrix>) affine(<affine2d>,<matrix>)
Affine transformations
area(<giottoPolygon>) area(<SpatVector>)
Get the area of individual polygons
convHull(<spatLocsObj>) convHull(<giottoSpatial>) minRect(<spatLocsObj>) minRect(<giottoSpatial>) minCircle(<spatLocsObj>) minCircle(<giottoSpatial>)
Convex hull, minimal bounding rotated rectangle, and minimal bounding circle
buffer(<spatLocsObj>) buffer(<giottoPoints>) buffer(<giottoPolygon>)
Create a buffer around vector geometries
settleGeom(<giottoPolygon>) settleGeom(<SpatVector>)
Settle polygon bounds
relate(<giottoSpatial>,<giottoSpatial>) relate(<giotto>,<giottoSpatial>)
Spatial relationships between geometries
erase(<spatialClasses>,<spatialClasses>) snap(<giottoSpatial>) symdif(<spatialClasses>,<spatialClasses>) union(<spatialClasses>,<spatialClasses>) intersect(<spatialClasses>,<spatialClasses>)
Spatial binary operations
rescalePolygons()
rescalePolygons
wrap(<giottoPolygon>) wrap(<giotto>) wrap(<giottoPoints>) vect(<packedGiottoPolygon>) vect(<packedGiottoPoints>) vect(<packedGiotto>)
Wrap giotto terra pointer information

Querying

Spatial querying

spatQueryGiottoPolygons()
Spatially query polygons within Giotto object

Object generics

Standard generics for Giotto exported classes

plot(<giottoImage>,<missing>) plot(<giottoLargeImage>,<missing>) plot(<giottoAffineImage>,<missing>) plot(<giottoPolygon>,<missing>) plot(<giottoPoints>,<missing>) plot(<spatLocsObj>,<missing>) plot(<dimObj>,<missing>) plot(<spatialNetworkObj>,<missing>) plot(<affine2d>,<missing>)
Preview a Giotto spatial object
`[`(<gdtData>,<gIndex>,<gIndex>,<missing>) `[`(<gdtData>,<logical>,<missing>,<missing>) `[`(<gdtData>,<character>,<missing>,<missing>) `[`(<gdtData>,<missing>,<numeric>,<missing>) `[`(<gdtData>,<missing>,<logical>,<missing>) `[`(<coordDataDT>,<ANY>,<ANY>,<missing>) `[`(<coordDataDT>,<missing>,<ANY>,<missing>) `[`(<coordDataDT>,<missing>,<character>,<missing>) `[`(<coordDataDT>,<ANY>,<missing>,<missing>) `[`(<coordDataDT>,<missing>,<missing>,<missing>) `[`(<giottoPoints>,<gIndex>,<missing>,<missing>) `[`(<metaData>,<missing>,<ANY>,<missing>) `[`(<metaData>,<missing>,<character>,<missing>) `[`(<metaData>,<ANY>,<missing>,<missing>) `[`(<metaData>,<missing>,<missing>,<missing>) `[`(<dimObj>,<ANY>,<ANY>,<missing>) `[`(<dimObj>,<missing>,<missing>,<missing>) `[`(<exprData>,<missing>,<ANY>,<missing>) `[`(<exprData>,<ANY>,<missing>,<missing>) `[`(<exprData>,<ANY>,<ANY>,<missing>) `[`(<exprData>,<missing>,<missing>,<missing>) `[`(<spatNetData>,<missing>,<missing>,<missing>) `[`(<nnData>,<missing>,<missing>,<missing>) `[`(<enrData>,<missing>,<missing>,<missing>) `[`(<enrData>,<ANY>,<missing>,<missing>) `[`(<enrData>,<missing>,<ANY>,<missing>) `[`(<enrData>,<missing>,<character>,<missing>) `[`(<spatGridData>,<missing>,<missing>,<missing>) `[`(<giottoPoints>,<missing>,<missing>,<missing>) `[`(<giottoPoints>,<character>,<missing>,<missing>) `[`(<giottoPoints>,<missing>,<gIndex>,<missing>) `[`(<giottoPolygon>,<missing>,<missing>,<missing>) `[`(<giottoPolygon>,<gIndex>,<missing>,<missing>) `[`(<giottoPolygon>,<character>,<missing>,<missing>) `[`(<giottoPolygon>,<missing>,<gIndex>,<missing>) `[`(<terraVectData>,<gIndex>,<gIndex>,<missing>) `[`(<giottoLargeImage>,<missing>,<missing>,<missing>) `[`(<giottoImage>,<missing>,<missing>,<missing>) `[`(<affine2d>,<missing>,<missing>,<missing>)
Subset part of an object with [
`[<-`(<coordDataDT>,<missing>,<missing>,<ANY>) `[<-`(<metaData>,<missing>,<missing>,<ANY>) `[<-`(<dimObj>,<missing>,<missing>,<ANY>) `[<-`(<exprData>,<missing>,<missing>,<ANY>) `[<-`(<spatNetData>,<missing>,<missing>,<ANY>) `[<-`(<nnData>,<missing>,<missing>,<ANY>) `[<-`(<enrData>,<missing>,<missing>,<ANY>) `[<-`(<spatGridData>,<missing>,<missing>,<ANY>) `[<-`(<giottoPoints>,<missing>,<missing>,<ANY>) `[<-`(<giottoPolygon>,<missing>,<missing>,<ANY>) `[<-`(<giottoLargeImage>,<missing>,<missing>,<ANY>) `[<-`(<giottoImage>,<missing>,<missing>,<ANY>) `[<-`(<affine2d>,<missing>,<missing>,<ANY>)
Replace part of an object with [<-
`[`(<giotto>,<gIndex>,<missing>,<missing>) `[`(<giotto>,<missing>,<gIndex>,<missing>) `[`(<giotto>,<gIndex>,<gIndex>,<missing>) `[`(<giotto>,<missing>,<missing>,<missing>) subset(<giotto>)
Subset a giotto object
`[[`(<giotto>,<missing>,<missing>) `[[`(<giotto>,<character>,<missing>) `[[`(<giotto>,<missing>,<character>) `[[`(<giotto>,<character>,<character>)
Subset giotto subobjects
`$`(<giotto>) `$`(<coordDataDT>) `$`(<spatEnrObj>) `$`(<dimObj>) `$`(<metaData>) `$`(<terraVectData>) `$`(<affine2d>)
Subset part of an object with $
`$<-`(<giotto>) `$<-`(<coordDataDT>) `$<-`(<spatEnrObj>) `$<-`(<dimObj>) `$<-`(<metaData>) `$<-`(<terraVectData>)
Replace part of an object with $<-
rbind2(<cellMetaObj>,<cellMetaObj>) rbind2(<featMetaObj>,<featMetaObj>) rbind2(<spatLocsObj>,<spatLocsObj>) rbind2(<giottoPolygon>,<giottoPolygon>)
Combine objects by rows (Giotto-related)
colnames(<giotto>) colnames(<exprObj>) colnames(<cellMetaObj>) colnames(<featMetaObj>) colnames(<spatEnrObj>) colnames(<spatLocsObj>) colnames(<dimObj>) rownames(<giotto>) rownames(<exprObj>) rownames(<dimObj>) rownames(<metaData>)
Row and column names
dimnames(<giotto>) dimnames(<exprObj>) dimnames(<dimObj>) dimnames(<spatLocsObj>) dimnames(<metaData>) dimnames(<enrData>)
Dimnames of an object
nrow(<giotto>) nrow(<giottoPoints>) nrow(<giottoPolygon>) nrow(<spatLocsObj>) nrow(<exprData>) nrow(<metaData>) nrow(<spatialNetworkObj>) nrow(<enrData>) nrow(<dimObj>) ncol(<giotto>) ncol(<exprData>) ncol(<metaData>) ncol(<enrData>) ncol(<dimObj>) dim(<giotto>) dim(<spatLocsObj>) dim(<exprData>) dim(<metaData>) dim(<enrData>) dim(<giottoLargeImage>) dim(<giottoPolygon>) dim(<giottoPoints>)
Dimensions of giotto objects
copy(<coordDataDT>)
Copy an entire object

Hierarchical

Hierarchical tagging generics for Giotto exported classes

Save/Load

Saving and loading of the Giotto Object

loadGiotto()
loadGiotto
saveGiotto()
saveGiotto
reconnectGiottoImage()
Reconnect images with dead pointers

As

As coercion functions

Python

Giotto python environment

Coordinate stitching

Coordinate stitching

stitchFieldCoordinates()
stitchFieldCoordinates
stitchTileCoordinates()
stitchTileCoordinates

Images

Image tools

stitchGiottoLargeImage()
Stitch multiple giottoLargeImage objects into a single giottoLargeImage object
convertGiottoLargeImageToMG()
convertGiottoLargeImageToMG
estimateImageBg()
estimateImageBg
distGiottoImage()
Plot distribution of image intensity values
density(<giottoLargeImage>)
Density plot
hist(<giottoLargeImage>)
Histogram
ometif_to_tif()
Convert ome.tif to tif
ometif_metadata()
Read metadata of an ometif
reconnect(<giottoAffineImage>) reconnect(<giottoLargeImage>) reconnect(<giottoImage>)
Reconnect a GiottoClass object
changeImageBg()
changeImageBg
writeGiottoLargeImage()
writeGiottoLargeImage
updateGiottoImage()
updateGiottoImage
updateGiottoImageMG()
updateGiottoImageMG
updateGiottoLargeImage()
updateGiottoLargeImage
add_img_array_alpha()
Add alpha channel to image array

History

Functions for logging Giotto Object history

objHistory()
Giotto object history
update_giotto_params()
Update giotto parameters
showProcessingSteps()
showProcessingSteps

Utilities

Utility functions that are used in other code

polygon_to_raster()
Convert polygon to raster
smoothGiottoPolygons()
smoothGiottoPolygons
doDeferred(<giottoAffineImage>)
Perform deferred/lazy operations

Deprecated

Deprecated and/or less supported older functions. Some of these functions are here for compatibility and internal purposes.

getSpatialGrid()
Get spatial grid
get_distance()
get_distance
get_multiomics()
Get multiomics integration results
createSpatialDefaultGrid()
createSpatialDefaultGrid
createSpatialGrid()
createSpatialGrid
setSpatialGrid()
Set spatial grid
set_multiomics()
Set multiomics integration results
triGrid() orthoGrid()
Spatial grids
cropGiottoLargeImage()
Crop a giotto largeImage object
plotGiottoImage()
Plot a giotto image object
showGiottoSpatGrids()
showGiottoSpatGrids
showGrids()
Show Spatial Grids
showNetworks()
Show networks
addGiottoPoints() addGiottoPoints3D()
Add subcellular giotto points object to giotto object
addGiottoPolygons()
Add giotto polygons to giotto object
annotateSpatialGrid()
annotateSpatialGrid
annotate_spatlocs_with_spatgrid_2D()
annotate_spatlocs_with_spatgrid_2D
annotate_spatlocs_with_spatgrid_3D()
annotate_spatlocs_with_spatgrid_3D