Learn R Programming

scPipeline (version 0.2.0.0)

SeuratPreprocess: Preprocess count data and create a Seurat object

Description

This function preprocesses count data, optionally applying batch correction using batchelor::fastMNN, and creates a Seurat object.

Usage

SeuratPreprocess(
  counts_data,
  meta.data = NULL,
  batch_column = NULL,
  use_fastMNN = FALSE,
  ...
)

Value

A Seurat object.

Arguments

counts_data

A matrix or data frame of count data.

meta.data

A data frame containing metadata to include in the Seurat object. Default is NULL.

batch_column

A vector or factor specifying batch assignments for each cell. Default is NULL.

use_fastMNN

Logical. Whether to apply batch correction using fastMNN. Default is FALSE.

...

Additional arguments to be passed to Seurat::CreateSeuratObject.

Examples

Run this code
# \donttest{
library(Seurat)
# Read 10X counts data from matrix.mtx, barcodes.tsv and genes.tsv
counts <- Read10X(data.dir = "../inst/extdata", gene.column = 1)

# Create Seurat object without batch correction
seurat_obj <- SeuratPreprocess(counts)
# }

Run the code above in your browser using DataLab