genspatialdata: Generate simulated data

gendata_RNAExpR Documentation

Generate simulated data

Description

Generate simulated spatial transcriptomics data or scRNAseq data.

Usage

  gendata_RNAExp(height=30, width=30, platform="ST", p =100, q=10, K=7, 
                            G=4,sigma2=1, tau=8, seed=1, view=FALSE)

Arguments

height, width

Height and width of lattice grids for generating spatial coordinates. n=height * width cells for scRNAseq data

platform

set the platform for the simulated data, only support 'ST' and 'scRNAseq'.

p

number of genes to generate.

q

number of true latent features to generate gene expression

K

number of clusters (cell types).

seed

random seed for generate data

G

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.

sigma2

Variance of error term in probabilitic PCA model.

tau

a positive factor of mixture mean values.

view

Logical value indicating whether the draw should be printed. Do not display the optional borders.

Details

Nothing

Value

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.

Note

nothing

Author(s)

Wei Liu

References

None

See Also

None

Examples


## 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

## generate scRNAseq data
seu <- gendata_RNAExp(height=20, width=20, platform="scRNAseq", p=100, K=4)
seu

DR.SC documentation built on May 29, 2024, 2:12 a.m.