GetRelativeExpression: Calculate relative expression between two or more peaks

View source: R/plotting_functions.R

GetRelativeExpressionR Documentation

Calculate relative expression between two or more peaks

Description

Calculate a relative expression between two or more peaks by dividing the expression of each peak by the mean of the peak expression for that gene - or set of provided peaks

Usage

GetRelativeExpression(
  peaks.object,
  peak.set = NULL,
  gene.name = NULL,
  feature.type = c("UTR3", "exon"),
  p.count = 1
)

Arguments

peaks.object

Seurat object

peak.set

set of peaks

gene.name

gene name for retrieving a set of peaks

feature.type

features to consider. 3'UTR and exon by default.

p.count

Pseudo count

Value

a matrix of relative expression

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)
                        
## Plot relative expression of example peaks on t-SNE coordinates
relative.exp <- GetRelativeExpression(peaks.object = peaks.seurat, 
                 peak.set = c("Cxcl12:6:117174603-117175050:1", "Cxcl12:6:117180974-117181367:1"))


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