IntegrateSRTData {ProFAST}R Documentation

Integrate multiple SRT data into a Seurat object

Description

Integrate multiple SRT data based on the PRECASTObj object by FAST and other model fitting.

Usage

IntegrateSRTData(
  PRECASTObj,
  seulist_HK,
  Method = c("iSC-MEB", "HarmonyLouvain"),
  seuList_raw = NULL,
  covariates_use = NULL,
  Tm = NULL,
  subsample_rate = 1,
  verbose = TRUE
)

Arguments

PRECASTObj

a PRECASTObj object created by CreatePRECASTObject.

seulist_HK

a list with Seurat object as component including only the housekeeping genes.

Method

a string, specify the method to be used and two methods are supprted: iSC-MEB and HarmonyLouvain. The default is iSC-MEB.

seuList_raw

an optional list with Seurat object, the raw data.

covariates_use

a string vector, the colnames in PRECASTObj@seulist[[1]]@meta.data, representing other biological covariates to considered when removing batch effects. This is achieved by adding additional covariates for biological conditions in the regression, such as case or control. Default as 'NULL', denoting no other covariates to be considered.

Tm

an optional numeric vector with the length equal to PRECASTObj@seulist, the time point information if the data include the temporal information. Default as NULL that means there is no temporal information.

subsample_rate

a real ranging in (0,1], specify the rate of spot drawing for speeding up the computation when the number of spots is very large. Default is 1, meaing using all spots.

verbose

an optional logical value, default as TRUE.

Details

If seuList_raw is not equal NULL or PRECASTObj@seuList is not NULL, this function will remove the unwanted variations for all genes in seuList_raw object. Otherwise, only the the unwanted variation of genes in PRECASTObj@seulist will be removed. The former requires a big memory to be run, while the latter not. To speed up the computation when the number of spots is very large, we also provide a subsampling schema controlled by the arugment subsample_rate. When the total number of spots is larger than 80,000, this function will automatically draws 50,000 spots to calculate the paramters in the spatial linear model for removing unwanted variations.

Value

Return a Seurat object by integrating all SRT data batches into a SRT data, where the column "batch" in the meta.data represents the batch ID, and the column "cluster" represents the clusters. The embeddings are put in seu@reductions slot and Idents(seu) is set to cluster label. Note that only the normalized expression is valid in the data slot while count is invalid.


[Package ProFAST version 1.4 Index]