NewPeakSCE: Create a new peak-counts single-cell experiment object from...

View source: R/data_util.R

NewPeakSCER Documentation

Create a new peak-counts single-cell experiment object from the peak counts

Description

Creates a new peak-counts single-cell experiment object from the peak counts and annotation table

Usage

NewPeakSCE(
  peak.data,
  annot.info,
  cell.idents = NULL,
  tsne.coords = NULL,
  umap.coords = NULL,
  min.cells = 10,
  min.peaks = 200,
  norm.scale.factor = 10000,
  filter.gene.mismatch = TRUE,
  verbose = TRUE
)

Arguments

peak.data

matrix of peak counts

annot.info

peak annotation information

cell.idents

named list of cell identities to be used for DU analysis

tsne.coords

data-frame of t-SNE coordinates. Rownames should correspond to cell names.

umap.coords

data-frame of UMAP coordinates. Rownames should correspond to cell names.

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 log normalisation function

filter.gene.mismatch

whether to filter out peaks with ambiguous gene mappings

verbose

whether to print output

Value

a new peak-level SCE 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 SCE object holding the peak data
peaks.sce <- NewPeakSCE(peak.data = peak.counts, 
                        annot.info = peak.annotations, 
                        cell.idents = tip.populations, 
                        tsne.coords = tip.tsne.coordinates,
                        min.cells = 0, min.peaks = 0)

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