Title: | A Wrapper for 'Seurat' and Related R Packages for End-to-End Single Cell Analysis |
---|---|
Description: | Reports markers list, differentially expressed genes, associated pathways, cell-type annotations, does batch correction and other related single cell analyses all wrapped within 'Seurat'. |
Authors: | Viswanadham Sridhara [aut, cre]
|
Maintainer: | Viswanadham Sridhara <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.2.0.0 |
Built: | 2025-03-08 06:50:17 UTC |
Source: | https://github.com/cran/scPipeline |
This function annotates the cells in a Seurat object using the SingleR package with reference data obtained from the Celldex package.
AnnotateCellsWithSingleR(seurat_object, reference_data = NULL, assay = "RNA")
AnnotateCellsWithSingleR(seurat_object, reference_data = NULL, assay = "RNA")
seurat_object |
A Seurat object to be annotated. |
reference_data |
A reference dataset to use for annotation (e.g., HumanPrimaryCellAtlasData from Celldex). If NULL, HumanPrimaryCellAtlasData is used by default. |
assay |
The assay in the Seurat object to use for annotation. Default is "RNA". |
The Seurat object with cell annotations added to the metadata.
This function takes a Seurat object with gene identifiers as row names (e.g., RefSeq, Ensembl, Entrez) and converts those identifiers to gene symbols (or Ensembl Gene IDs) using the biomaRt package. The function can handle various types of gene identifiers and returns a Seurat object with updated row names.
ConvertGeneIdentifiers( seurat_object, id_type = "refseq", to_id_type = "symbol" )
ConvertGeneIdentifiers( seurat_object, id_type = "refseq", to_id_type = "symbol" )
seurat_object |
A Seurat object. The row names of the Seurat object's data or assay slot should represent gene identifiers (e.g., RefSeq, Ensembl, or Entrez IDs). |
id_type |
A string specifying the type of the input gene identifiers. Options are: "refseq", "ensembl", "entrez". Default is "refseq". |
to_id_type |
A string specifying the type of output gene identifiers. Options are: "symbol", "ensembl". Default is "symbol". |
A Seurat object with updated gene names (row names) based on the specified conversion.
# Read 10X counts data from matrix.mtx, barcodes.tsv and genes.tsv library(Seurat) counts <- Read10X(data.dir = "../inst/extdata", gene.column = 1) # Create Seurat object without batch correction seurat_obj <- SeuratPreprocess(counts) seurat_obj <- SeuratLowDim(seurat_obj) # Convert RefSeq IDs to gene symbols seurat_obj_converted <- ConvertGeneIdentifiers( seurat_obj, id_type = "refseq", to_id_type = "symbol" )
# Read 10X counts data from matrix.mtx, barcodes.tsv and genes.tsv library(Seurat) counts <- Read10X(data.dir = "../inst/extdata", gene.column = 1) # Create Seurat object without batch correction seurat_obj <- SeuratPreprocess(counts) seurat_obj <- SeuratLowDim(seurat_obj) # Convert RefSeq IDs to gene symbols seurat_obj_converted <- ConvertGeneIdentifiers( seurat_obj, id_type = "refseq", to_id_type = "symbol" )
This function performs pathway analysis using ReactomeGSA on a Seurat object with cluster information.
ReactomeData(lowdim_seurat_object)
ReactomeData(lowdim_seurat_object)
lowdim_seurat_object |
Seurat object that has clusters information |
A list containing:
- GSVA result (gsva_result
)
- Pathway expression data (pathway_expression
)
- Max difference between pathway expression values (max_difference
)
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) seurat_obj <- SeuratLowDim(seurat_obj) # Reactome Analysis seurat_reactome <- ReactomeData(seurat_obj)
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) seurat_obj <- SeuratLowDim(seurat_obj) # Reactome Analysis seurat_reactome <- ReactomeData(seurat_obj)
This function converts the transformed data to low-dimensional data for downstream analysis.
SeuratLowDim(scaled_seurat_object, ...)
SeuratLowDim(scaled_seurat_object, ...)
scaled_seurat_object |
A scaled Seurat object. |
... |
Additional arguments to be passed for downstream analyses. |
A Seurat object.
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) seurat_obj <- SeuratLowDim(seurat_obj)
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) seurat_obj <- SeuratLowDim(seurat_obj)
This function calculates differentially expressed genes using Seurat::FindAllMarkers.
SeuratMarkers(lowdim_seurat_object)
SeuratMarkers(lowdim_seurat_object)
lowdim_seurat_object |
Seurat object with cluster information |
A list containing two marker lists:
- Full markers list
- Thresholded markers list with min.pct = 0.1
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) seurat_obj <- SeuratLowDim(seurat_obj) # Create Markers list seurat_markers <- SeuratMarkers(seurat_obj)
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) seurat_obj <- SeuratLowDim(seurat_obj) # Create Markers list seurat_markers <- SeuratMarkers(seurat_obj)
This function preprocesses count data, optionally applying batch correction using batchelor::fastMNN, and creates a Seurat object.
SeuratPreprocess( counts_data, meta.data = NULL, batch_column = NULL, use_fastMNN = FALSE, ... )
SeuratPreprocess( counts_data, meta.data = NULL, batch_column = NULL, use_fastMNN = FALSE, ... )
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. |
A Seurat object.
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)
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)
This function assigns cluster-level annotations in a Seurat object based on the majority annotation of cells within each cluster.
TransferAnnotations(seurat_object, annotation_col, cluster_col, output_col)
TransferAnnotations(seurat_object, annotation_col, cluster_col, output_col)
seurat_object |
Seurat object containing cluster and annotation information. |
annotation_col |
The name of the metadata column with annotations (character string). |
cluster_col |
The name of the metadata column with cluster information (character string). |
output_col |
The name of the output column to store cluster annotations (character string). |
The Seurat object with an additional column in its metadata, specified by output_col
.