gendata_RNAExp | R Documentation |
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 , 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. |
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.
nothing
Wei Liu
None
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
## generate scRNAseq data
seu <- gendata_RNAExp(height=20, width=20, platform="scRNAseq", p=100, K=4)
seu
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.