Skip to contents

We have created functions to convert the standard sCCIgen output files to widely used R objects.

First, run a simulation to obtain the count.tsv and meta.tsv files. You will need the path to these two files to run the next steps.

1 Convert sCCIgen to a Giotto object

g_object <- sCCIgen_to_Giotto("path/to/counts_file", "path/to/metadata_file")

g_object
An object of class giotto 
>Active spat_unit:  cell 
>Active feat_type:  rna 
dimensions    : 10, 10000 (features, cells)
[SUBCELLULAR INFO]
[AGGREGATE INFO]
expression -----------------------
  [cell][rna] raw
spatial locations ----------------
  [cell] raw


Use objHistory() to see steps and params used

2 Convert sCCIgen to a Seurat object

s_object <- sCCIgen_to_Seurat("path/to/counts_file", "path/to/metadata_file")

s_object
An object of class Seurat 
10 features across 10000 samples within 1 assay 
Active assay: Spatial (10 features, 0 variable features)
 1 layer present: counts
 1 image present: image

3 Convert sCCIgen to a SpatialExperiment object

se_object <- sCCIgen_to_SpatialExperiment("path/to/counts_file", "path/to/metadata_file")

se_object
class: SpatialExperiment 
dim: 10 10000 
metadata(0):
assays(1): counts
rownames(10): Gene1 Gene2 ... Gene9 Gene10
rowData names(0):
colnames(10000): Cell1 Cell2 ... Cell9999 Cell10000
colData names(3): annotation region sample_id
reducedDimNames(0):
mainExpName: NULL
altExpNames(0):
spatialCoords names(2) : x y
imgData names(0):