Function Documentation#

Giotto Environment#

Install and work with Giotto Python Environment

Function

Description

installGiottoEnvironment

installGiottoEnvironment

removeGiottoEnvironment

removeGiottoEnvironment

checkGiottoEnvironment

checkGiottoEnvironment

Giotto Instructions#

Create or change Giotto instructions

Function

Description

createGiottoInstructions

createGiottoInstructions

readGiottoInstructions

readGiottoInstrunctions

changeGiottoInstructions

changeGiottoInstructions

changeGiottoInstructions

changeGiottoInstructions

replaceGiottoInstructions

replaceGiottoInstructions

Import Raw Data#

Functions to help to import raw spatial datat

Function

Description

getSpatialDataset

getSpatialDataset

readExprMatrix

readExprMatrix

get10Xmatrix

get10Xmatrix

get10Xmatrix_h5

get10Xmatrix_h5

stitchFieldCoordinates

stitchFieldCoordinates

stitchTileCoordinates

stitchTileCoordinates

readPolygonFilesVizgen

readPolygonFilesVizgen

readPolygonFilesVizgenHDF5

readPolygonFilesVizgenHDF5

Images#

Functions to work with images for a Giotto object.

Function

Description

estimateImageBg

estimateImageBg

changeImageBg

changeImageBg

createGiottoImage

createGiottoImage

addGiottoImage

addGiottoImage

addGiottoImageToSpatPlot

addGiottoImageToSpatPlot

showGiottoImageNames

showGiottoImageNames

updateGiottoImage

updateGiottoImage

get_GiottoImage

get_GiottoImage

plotGiottoImage

plotGiottoImage

set_giottoImage

set_giottoImage

addGiottoLargeImage

addGiottoLargeImage

createGiottoLargeImage

createGiottoLargeImage

createGiottoLargeImageList

createGiottoLargeImageList

cropGiottoLargeImage

cropGiottoLargeImage

updateGiottoLargeImage

updateGiottoLargeImage

writeGiottoLargeImage

writeGiottoLargeImage

stitchGiottoLargeImage

stitchGiottoLargeImage

convertGiottoLargeImageToMG

convertGiottoLargeImageToMG

addGiottoImageMG

addGiottoImageMG

updateGiottoImageMG

updateGiottoImageMG

distGiottoImage

distGiottoImage

reconnectGiottoImage

reconnectGiottoImage

registerImagesFIJI

registerImagesFIJI

registerGiottoObjectList

registerGiottoObjectList

Giotto Object#

Functions to help to import raw spatial data.

Function

Description

createGiottoObject

createGiottoObject

createGiottoVisiumObject

createGiottoVisiumObject

createGiottoObjectSubcellular

createGiottoObjectSubcellular

createGiottoCosMxObject

createGiottoCosMxObject

Giotto Helper Functions#

Common functions to help working with Giotto objects

Function

Description

pDataDT

pDataDT

fDataDT

fDataDT

showProcessingSteps

showProcessingSteps

calculateMetaTable

calculateMetaTable

calculateMetaTableCells

calculateMetaTableCells

combineMetadata

combineMetadata

createMetafeats

createMetafeats

findNetworkNeighbors

findNetworkNeighbors

objHistory

objHistory

fiji

fiji

Giotto Getters & Setters#

Low level functions to get, set and show Giotto slots

Function

Description

get_expression_values

get_expression_values

set_expression_values

set_expression_values

get_spatial_locations

get_spatial_locations

set_spatial_locations

set_spatial_locations

get_dimReduction

get_dimReduction

set_dimReduction

set_dimReduction

get_NearestNetwork

get_NearestNetwork

set_NearestNetwork

set_NearestNetwork

get_spatialNetwork

get_spatialNetwork

set_spatialNetwork

set_spatialNetwork

get_spatialGrid

get_spatialGrid

set_spatialGrid

set_spatialGrid

get_polygon_info

get_polygon_info

set_polygon_info

set_polygon_info

get_feature_info

get_feature_info

set_feature_info

set_feature_info

get_spatial_enrichment

get_spatial_enrichment

set_spatial_enrichment

set_spatial_enrichment

Giotto Show Slots#

Show what is available in different information slots

Function

Description

showGiottoExpression

showGiottoExpression

showGiottoSpatLocs

showGiottoSpatLocs

showGiottoDimRed

showGiottoDimRed

showGiottoSpatNetworks

showGiottoSpatNetworks

showGiottoSpatGrids

showGiottoSpatGrids

showGiottoSpatialInfo

showGiottoSpatialInfo

showGiottoFeatInfo

showGiottoFeatInfo

showGiottoSpatEnrichments

showGiottoSpatEnrichments

showGiottoNearestNetworks

showGiottoNearestNetworks

showGrids

showGrids

showNetworks

showNetworks

Modify Giotto Object#

Modifications to the Giotto objects

Function

Description

filterGiotto

filterGiotto

filterCombinations

filterCombinations

filterDistributions

filterDistributions

subsetGiotto

subsetGiotto

subsetGiottoLocs

subsetGiottoLocs

subsetGiottoLocsMulti

subsetGiottoLocsMulti

joinGiottoObjects

joinGiottoObjects

normalizeGiotto

normalizeGiotto

adjustGiottoMatrix

adjustGiottoMatrix

annotateGiotto

annotateGiotto

removeCellAnnotation

removeCellAnnotation

removeFeatAnnotation

removeFeatAnnotation

addCellMetadata

addCellMetadata

addFeatMetadata

addFeatMetadata

addFeatStatistics

addFeatStatistics

addCellStatistics

addCellStatistics

addStatistics

addStatistics

addFeatsPerc

addFeatsPerc

addCellIntMetadata

addCellIntMetadata

processGiotto

processGiotto

Dimension Reduction#

Functions to reduce dimensions.

Function

Description

calculateHVF

calculateHVF

signPCA

signPCA

screePlot

screePlot

jackstrawPlot

jackstrawPlot

runPCA

runPCA

runUMAP

runUMAP

runtSNE

runtSNE

runGiottoHarmony

runGiottoHarmony

runWNN

runWNN

Clustering#

Functions to cluster cells.

Function

Description

createNearestNetwork

Create NN Network

addNetworkLayout

addNetworkLayout

clusterCells

clusterCells

doLeidenCluster

doLeidenCluster

doLouvainCluster

doLouvainCluster

doKmeans

doKmeans

doHclust

doHclust

doRandomWalkCluster

doRandomWalkCluster

doSNNCluster

doSNNCluster

subClusterCells

subClusterCells

doLeidenSubCluster

doLeidenSubCluster

doLouvainSubCluster

doLouvainSubCluster

getClusterSimilarity

getClusterSimilarity

mergeClusters

mergeClusters

getDendrogramSplits

getDendrogramSplits

Marker Genes#

Functions to detect cell type / cluster specific marker genes.

Function

Description

findMarkers

findMarkers

findMarkers_one_vs_all

findMarkers_one_vs_all

findGiniMarkers

findGiniMarkers

findGiniMarkers_one_vs_all

findGiniMarkers_one_vs_all

findScranMarkers

findScranMarkers

findScranMarkers_one_vs_all

findScranMarkers_one_vs_all

findMastMarkers

findMastMarkers

findMastMarkers_one_vs_all

findMastMarkers_one_vs_all

Auxiliary Visualizations#

Functions for different visualization options to explore gene, cell or cluster characteristics.

Function

Description

showClusterHeatmap

showClusterHeatmap

showClusterDendrogram

showClusterDendrogram

plotHeatmap

plotHeatmap

plotMetaDataHeatmap

plotMetaDataHeatmap

plotMetaDataCellsHeatmap

plotMetaDataCellsHeatmap

violinPlot

violinPlot

Spatial#

Spatial Enrichment#

Algorithms to compute spatial enrichment of gene signatures or scRNA-seq matrix

Function

Description

makeSignMatrixPAGE

makeSignMatrixPAGE

makeSignMatrixRank

makeSignMatrixRank

runSpatialEnrich

runSpatialEnrich

runPAGEEnrich

runPAGEEnrich

runRankEnrich

runRankEnrich

runHyperGeometricEnrich

runHyperGeometricEnrich

Spatial Deconvolution#

Algorithms to perform spatial deconvolution based on gene signatures or single-cell RNAseq information

Function

Description

makeSignMatrixDWLSfromMatrix

makeSignMatrixDWLSfromMatrix

makeSignMatrixDWLS

makeSignMatrixDWLS

runSpatialDeconv

runSpatialDeconv

runDWLSDeconv

runDWLSDeconv

spatDeconvPlot

spatDeconvPlot

Spatial Network or Grid#

Function to (help) create a spatial network or grid.

Function

Description

spatNetwDistributionsDistance

spatNetwDistributionsDistance

spatNetwDistributionsKneighbors

spatNetwDistributionsKneighbors

spatNetwDistributions

spatNetwDistributions

createSpatialDelaunayNetwork

createSpatialDelaunayNetwork

plotStatDelaunayNetwork

plotStatDelaunayNetwork

createSpatialKNNnetwork

createSpatialKNNnetwork

createSpatialFeaturesKNNnetwork

createSpatialFeaturesKNNnetwork

createSpatialNetwork

createSpatialNetwork

annotateSpatialNetwork

annotateSpatialNetwork

annotateSpatialGrid

annotateSpatialGrid

createSpatialGrid

createSpatialGrid

createSpatialDefaultGrid

createSpatialDefaultGrid

Spatial Expression Patterns#

Methods to detect spatially coherent expression patterns.

Function

Description

binSpectSingleMatrix

binSpectSingleMatrix

binSpectMultiMatrix

binSpectMultiMatrix

binSpectSingle

binSpectSingle

binSpectMulti

binSpectMulti

binSpect

binSpect

spatialDE

spatialDE

spatialAEH

spatialAEH

trendSceek

trendSceek

spark

spark

Simulate Spatial Expression Patterns#

Function to simulate a user-defined pattern using the full complexity of the different gene distributions.

Function

Description

simulateOneGenePatternGiottoObject

simulateOneGenePatternGiottoObject

runPatternSimulation

runPatternSimulation

Spatial Co-Expression Modules#

Method to detect spatially co-expressed feature modules.

Function

Description

clusterSpatialCorFeats

clusterSpatialCorFeats

detectSpatialCorFeats

detectSpatialCorFeats

detectSpatialCorFeatsMatrix

detectSpatialCorFeatsMatrix

detectSpatialPatterns

detectSpatialPatterns

heatmSpatialCorFeats

heatmSpatialCorFeats

showSpatialCorFeats

showSpatialCorFeats

rankSpatialCorGroups

rankSpatialCorGroups

Spatial Data Handling#

Functions to condense spatial data.

Function

Description

combineSpatialCellFeatureInfo

combineSpatialCellFeatureInfo

combineSpatialCellMetadataInfo

combineSpatialCellMetadataInfo

Hidden Markov Random Field (HMRF)#

Functions to identify spatial domains with HMRF.

Function

Description

doHMRF

doHMRF

loadHMRF

loadHMRF

viewHMRFresults

viewHMRFresults

writeHMRFresults

writeHMRFresults

addHMRF

addHMRF

viewHMRFresults2D

viewHMRFresults2D

viewHMRFresults3D

viewHMRFresults3D

2D Visualization#

General Plotting#

Functions to assist in plotting.

Function

Description

getDistinctColors

getDistinctColors

showSaveParameters

showSaveParameters

2D Visualization In Expression Space#

Visualization of expression space (e.g. UMAP) in 2D.

Function

Description

dimPlot

dimPlot

dimPlot2D

dimPlot2D

plotUMAP

plotUMAP

plotUMAP_2D

plotUMAP_2D

plotTSNE

plotTSNE

plotTSNE_2D

plotTSNE_2D

plotPCA

plotPCA

plotPCA_2D

plotPCA_2D

dimFeatPlot2D

dimFeatPlot2D

dimCellPlot2D

dimCellPlot2D

2D Visualization in Spatial Space#

Visualization of expression space (e.g. UMAP) in 2D.

Function

Description

spatPlot2D

spatPlot2D

spatCellPlot2D

spatCellPlot2D

spatFeatPlot2D

spatFeatPlot2D

2D Visualization In Both Spatial And Expression Space#

Visualization in both 2D spatial and expression space.

Function

Description

spatDimPlot2D

spatDimPlot2D

spatDimCellPlot2D

spatDimCellPlot2D

spatDimFeatPlot2D

spatDimFeatPlot2D

3D Visualization#

3D Visualization Dimension Reduction#

Visualization of expression space (e.g. UMAP) in 3D

Function

Description

dimPlot3D

dimPlot3D

dimPlot3D

dimPlot3D

plotTSNE_3D

plotTSNE_3D

plotPCA_3D

plotPCA_3D

3D Visualization In Spatial Space#

Visualization in 3D spatial space.

Function

Description

spatPlot3D

spatPlot3D

3D visualization in Spatial and Expression Space#

Visualization in 3D spatial space.

Function

Description

spatDimPlot3D

spatDimPlot3D

In Silico Cross Sections#

Functions to create an in silico 2D cross sections from 3D data.

Function

Description

createCrossSection

createCrossSection

crossSectionGenePlot

crossSectionGenePlot

crossSectionPlot

crossSectionPlot

crossSectionGenePlot3D

crossSectionGenePlot3D

crossSectionPlot3D

crossSectionPlot3D

insertCrossSectionGenePlot3D

insertCrossSectionSpatPlot3D

insertCrossSectionGenePlot3D

insertCrossSectionGenePlot3D

Cell Neighborhood#

Cell Neighborhood: Cell-Type/Cell-Type Enrichment#

Functions to calculate and visualize cell-type/cell-type spatial enrichment or depletion.

Function

Description

cellProximityEnrichment

cellProximityEnrichment

cellProximityBarplot

cellProximityBarplot

cellProximityHeatmap

cellProximityHeatmap

cellProximityNetwork

cellProximityNetwork

cellProximitySpatPlot

cellProximitySpatPlot

cellProximitySpatPlot3D

cellProximitySpatPlot3D

specificCellCellcommunicationScores

specificCellCellcommunicationScores

Cell Neighborhood: Spatial Interaction Changed Features (ICF)#

Identify and visualize features (genes) that change in a source cell type due to interaction with another neighboring cell type.

Function

Description

findInteractionChangedFeats

findInteractionChangedFeats

findICF

findICF

filterInteractionChangedFeats

filterInteractionChangedFeats

filterICF

filterICF

plotInteractionChangedFeats

plotInteractionChangedFeats

plotICF

plotICF

plotCellProximityFeats

plotCellProximityFeats

plotCPF

plotCPF

combineInteractionChangedFeats

combineInteractionChangedFeats

combineICF

combineICF

plotCombineInteractionChangedFeats

plotCombineInteractionChangedFeats

plotCombineICF

plotCombineICF

Cell Neighborhood: Ligand-Receptor Cell Communication#

Functions to calculate and visualize cell-type/cell-type spatial enrichment or depletion.

Function

Description

combCCcom

combCCcom

exprCellCellcom

exprCellCellcom

spatCellCellcom

spatCellCellcom

plotCCcomDotplot

plotCCcomDotplot

plotRankSpatvsExpr

plotRankSpatvsExpr

plotRecovery

plotRecovery

plotCCcomHeatmap

plotCCcomHeatmap

plotCombineCellCellCommunication

plotCombineCellCellCommunication

plotCombineCCcom

plotCombineCCcom

Subcellular#

Functions to manipulate and visualize subcellular data.

Function

Description

addCellsFromPolygon

addCellsFromPolygon

addGiottoPoints

addGiottoPoints

addGiottoPoints3D

addGiottoPoints3D

addGiottoPolygons

addGiottoPolygons

addSpatialCentroidLocations

addSpatialCentroidLocations

addSpatialCentroidLocationsLayer

addSpatialCentroidLocationsLayer

calculateOverlapParallel

calculateOverlapParallel

calculateOverlapPolygonImages

calculateOverlapPolygonImages

calculateOverlapRaster

calculateOverlapRaster

calculateOverlapSerial

calculateOverlapSerial

combineCellData

combineCellData

combineFeatureData

combineFeatureData

combineFeatureOverlapData

combineFeatureOverlapData

createGiottoPoints

createGiottoPoints

createGiottoPolygonsFromDfr

createGiottoPolygonsFromDfr

createGiottoPolygonsFromMask

createGiottoPolygonsFromMask

overlapToMatrix

overlapToMatrix

overlapImagesToMatrix

overlapImagesToMatrix

overlapToMatrixMultiPoly

overlapToMatrixMultiPoly

smoothGiottoPolygons

smoothGiottoPolygons

spatInSituPlotDensity

spatInSituPlotDensity

spatInSituPlotHex

spatInSituPlotHex

spatInSituPlotPoints

spatInSituPlotPoints

Segmentation#

Function to segment cells in-tissue.

Function

Description

doCellSegmentation

doCellSegmentation

Doublet Detection#

Function to detect doublets in raw expression data.

Function

Description

doScrubletDetect

doScrubletDetect

Interactive Visualizations#

Functions that generate interactive plots.

Function

Description

cellProximitySpatPlot2D

cellProximitySpatPlot2D

cellProximityVisPlot

cellProximityVisPlot

comparePolygonExpression

comparePolygonExpression

getCellsFromPolygon

getCellsFromPolygon

plotInteractivePolygons

plotInteractivePolygons

Interoperability#

Convert other type of objects into a Giotto object and vice versa.

Function

Description

seuratToGiotto

seuratToGiotto

giottoToSeurat

giottoToSeurat

giottoToSpatialExperiment

giottoToSpatialExperiment