PeakSeuratFromTransfer: Create a peak count Seurat object using a gene-level object

View source: R/data_util.R

PeakSeuratFromTransferR Documentation

Create a peak count Seurat object using a gene-level object

Description

Creates a new peak Seurat object, importing information on clustering and dimensionality reduction, such as t-SNE and UMAP coordinates, from a Seurat object that has been processed at the gene level.

Usage

PeakSeuratFromTransfer(
  peak.data,
  genes.seurat,
  annot.info,
  project.name = "PolyA",
  min.cells = 10,
  min.peaks = 200,
  norm.scale.factor = 10000,
  filter.gene.mismatch = TRUE
)

Arguments

peak.data

matrix of peak counts

genes.seurat

a Seurat object

annot.info

peak annotation information

project.name

project name passed to the Seurat object creation

min.cells

minimum number of cells for retaining a peak

min.peaks

minimum number of peaks for retaining a cell

norm.scale.factor

scale factor for Seurat NormalizeData function

filter.gene.mismatch

whether to filter out peaks with ambiguous gene mappings

Value

a new peak-level Seurat object

Examples

     
## Load example data for two peaks from the Cxcl12 gene
extdata_path <- system.file("extdata",package = "Sierra")
load(paste0(extdata_path, "/Cxcl12_example.RData"))
load(paste0(extdata_path, "/TIP_cell_info.RData"))

## Create an seurat object holding the peak data
peaks.seurat <- NewPeakSeurat(peak.data = peak.counts, 
                        annot.info = peak.annotations, 
                        cell.idents = tip.populations, 
                        tsne.coords = tip.tsne.coordinates,
                        min.cells = 0, min.peaks = 0)
                        
##                         
peaks.seurat.transfer <- PeakSeuratFromTransfer(peak.data = peak.counts, 
                        genes.seurat = peaks.seurat, 
                        annot.info = peak.annotations)
     


VCCRI/Sierra documentation built on July 3, 2023, 6:39 a.m.