infer: Main function of iSpatial

View source: R/iSpatial.R

inferR Documentation

Main function of iSpatial

Description

This function integrates scRNA-seq and spatial transcriptome. With limited genes in merFISH/SeqFISH, iSpatial infer/enhance all genes from scRNA-seq. Finally, this function generates spatially expression of all genes.

Usage

infer(
  spRNA,
  scRNA,
  dims = 1:30,
  k.neighbor = 30,
  infered.assay = "enhanced",
  weighted.KNN = TRUE,
  RNA.weight = 0.5,
  n.core = 8,
  correct.spRNA = FALSE,
  correct.scRNA = FALSE,
  correct.weight.NN = 0.2,
  correct.neighbor = 5
)

Arguments

spRNA

seurat object of spatial transcriptome data. Should contain normalized data. Run Seurat::NormalizeData or others.

scRNA

seurat object of single cell RNA-seq data. Should contain normalized data. Run Seurat::NormalizeData or others.

dims

which dimensions to use when find the nearest neighbors

k.neighbor

number of neighbors to use when infer the expression

infered.assay

names of output assay in seurat object

weighted.KNN

we use a dynamics weight to assign scRNA values to spRNA. The dynamics weight based on the correlation between scRNA cell and spRNA cell.

RNA.weight

the weight of scRNA-seq expression when genes detected both in spRNA and scRNA. RNA.weight should be 0 to 1. The inferred expression = (1 - RNA.weight) * spRNA + RNA.weight * scRNA.

n.core

number of CPU cores used to parallel.

correct.spRNA

Whether to stabilize expression in spRNA.

correct.scRNA

Whether to stabilize expression in scRNA.

correct.weight.NN

weight of nearest neighbors to correct expr.

correct.neighbor

number of nearest neighbors used to correct expr.

Value

returns a seurat object with inferred expression in infered.assay.


Czh3/iSpatial documentation built on Sept. 15, 2022, 10:32 p.m.