ImportSeuratObject: Import data from a Seurat object

Description Usage Arguments Value Examples

View source: R/TemporaObjClass.R

Description

Imports gene expression matrix and other metadata from a seurat object

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
ImportSeuratObject(
  seuratobj,
  assayType = "",
  assaySlot = NA,
  clusters,
  timepoints,
  timepoint_order,
  cluster_labels = NULL,
  cell_markers = NULL,
  threshold = 0.9
)

Arguments

seuratobj

A Seurat or SingleCellExperiment object containing the normalized gene expression matrix and clustering result

assayType

A length-one character vector representing the assay object in which the expression data is stored in the input object. For Seurat v1 or v2 objects, set this to "". For Seurat v3 objects, this is often "RNA". For SingleCellExperiment objects, this is often "logcounts".

assaySlot

An optional length-one character vector representing the slot of the Seurat v3 Assay object to use. In Seurat v3, normalized data is stored in the "data" slot, and counts in the "counts" slot.

clusters

Name of the column in the meta.data dataframe containing the cluster identity of all cells in the dataset

timepoints

Name of the column in the meta.data dataframe containing the collection time of all cells in the dataset

timepoint_order

An ordered vector of timepoint names from early to late

cluster_labels

(Optional) A vector of cluster annotations (cell types, cell states, cell cycles, etc.), ordered alphanumerically by cluster names. If NULL and cell_markers is given, automatic cluster annotation using GSVA will be performed. If both are NULL, cluster numbers will be used to label the trajectory plot.

cell_markers

(Optional) A list of possible cell types found in the dataset and their marker genes to be used for automatic cell type identification. If NULL and no cluster_labels is given, cluster numbers will be used to label the trajectory plot.

threshold

(Optional) Threshold of GSVA score quantile. Cell types with GSVA scores in this quantile or higher compared to all other cell type scores for the same cluster would be included in cluster label. Numeric between 0-1, default to 0.9.

Value

A Tempora object containing the expression matrix and metadata

Examples

1
2
3
## Not run: tempora_data <- ImportSeuratObject(seurat_object, assayType="", clusters = "res.0.3", timepoints = "collection_time",
timepoint_order = c("0H", "24H", "48H", "72H"), cluster_labels = c("Stem cells", "Differentiated cells"))
## End(Not run)

BaderLab/Tempora documentation built on April 25, 2021, 2:10 p.m.