View source: R/plotting_functions.R
GetRelativeExpression | R Documentation |
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
GetRelativeExpression(
peaks.object,
peak.set = NULL,
gene.name = NULL,
feature.type = c("UTR3", "exon"),
p.count = 1
)
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 |
a matrix of relative expression
## 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"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.