genspatialdata.Rd
Generate simulated spatial transcriptomics data or scRNAseq data.
gendata_RNAExp(height=30, width=30, platform="ST", p =100, q=10, K=7,
G=4,sigma2=1, tau=8, seed=1, view=FALSE)
Height and width of lattice grids for generating spatial coordinates. n=height * width cells for scRNAseq data
set the platform for the simulated data, only support 'ST' and 'scRNAseq'.
number of genes to generate.
number of true latent features to generate gene expression
number of clusters (cell types).
random seed for generate data
the number of neighbors. The latter must be one of G = 4 or G = 8, which respectively correspond to a first order and a second order dependency structure. By default, G = 4.
Variance of error term in probabilitic PCA model.
a positive factor of mixture mean values.
Logical value indicating whether the draw should be printed. Do not display the optional borders.
Nothing
return a "Seurat" object. If platform="ST"
, then the metadata of this Seurat object will include two columns with names "row" and "col" which are the spatial coordinates; If platform="scRNAseq"
, then the metadata of this Seurat object will not have them.
None
nothing
None
## we generate the spatial transcriptomics data with lattice neighborhood, i.e. ST platform.
seu <- gendata_RNAExp(height=20, width=20,p=200, K=4)
seu
#> An object of class Seurat
#> 200 features across 400 samples within 1 assay
#> Active assay: RNA (200 features, 0 variable features)
## generate scRNAseq data
seu <- gendata_RNAExp(height=20, width=20, platform="scRNAseq", p=100, K=4)
seu
#> An object of class Seurat
#> 100 features across 400 samples within 1 assay
#> Active assay: RNA (100 features, 0 variable features)