Function to create a giotto object
createGiottoObject(
raw_exprs,
spatial_locs = NULL,
norm_expr = NULL,
norm_scaled_expr = NULL,
custom_expr = NULL,
cell_metadata = NULL,
gene_metadata = NULL,
spatial_network = NULL,
spatial_network_name = NULL,
spatial_grid = NULL,
spatial_grid_name = NULL,
spatial_enrichment = NULL,
spatial_enrichment_name = NULL,
dimension_reduction = NULL,
nn_network = NULL,
images = NULL,
offset_file = NULL,
instructions = NULL,
cores = NA
)
matrix with raw expression counts [required]
data.table or data.frame with coordinates for cell centroids
normalized expression values
scaled expression values
custom expression values
cell annotation metadata
gene annotation metadata
list of spatial network(s)
list of spatial network name(s)
list of spatial grid(s)
list of spatial grid name(s)
list of spatial enrichment score(s) for each spatial region
list of spatial enrichment name(s)
list of dimension reduction(s)
list of nearest neighbor network(s)
list of images
file used to stitch fields together (optional)
list of instructions or output result from createGiottoInstructions
how many cores or threads to use to read data if paths are provided
giotto object
See https://rubd.github.io/Giotto_site/articles/howto_giotto_class.html for more details
[Requirements] To create a giotto object you need to provide at least a matrix with genes as row names and cells as column names. This matrix can be provided as a base matrix, sparse Matrix, data.frame, data.table or as a path to any of those. To include spatial information about cells (or regions) you need to provide a matrix, data.table or data.frame (or path to them) with coordinates for all spatial dimensions. This can be 2D (x and y) or 3D (x, y, x). The row order for the cell coordinates should be the same as the column order for the provided expression data.
[Instructions] Additionally an instruction file, generated manually or with createGiottoInstructions
can be provided to instructions, if not a default instruction file will be created
for the Giotto object.
[Multiple fields] In case a dataset consists of multiple fields, like seqFISH+ for example,
an offset file can be provided to stitch the different fields together. stitchFieldCoordinates
can be used to generate such an offset file.
[Processed data] Processed count data, such as normalized data, can be provided using one of the different expression slots (norm_expr, norm_scaled_expr, custom_expr).
[Metadata] Cell and gene metadata can be provided using the cell and gene metadata slots.
This data can also be added afterwards using the addGeneMetadata
or addCellMetadata
functions.
[Other information] Additional information can be provided through the appropriate slots:
spatial networks
spatial girds
spatial enrichments
dimensions reduction
nearest neighbours networks
images