infer_rPCA: function of iSpatial integrated used rPCA

View source: R/iSpatial.R

infer_rPCAR Documentation

function of iSpatial integrated used rPCA

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_rPCA(
  spRNA,
  scRNA,
  dims = 1:30,
  k.neighbor = 30,
  infered.assay = "enhanced",
  weighted.KNN = TRUE,
  RNA.weight = 0.5,
  n.core = 10,
  correct.spRNA = FALSE,
  correct.scRNA = FALSE,
  correct.neighbor = 3
)

Arguments

spRNA

seurat object of spatial transcriptome data

scRNA

seurat object of single cell RNA-seq data

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