View source: R/runErrorModel.R
runErrorModel | R Documentation |
Based on raw counts, uses past data to estimate each raw count's log-scale SD from technical noise. Specifies different error models for different platforms.
runErrorModel(counts, platform = "general")
counts |
vector or matrix of raw counts |
platform |
String specifying which platform was used to create "rawCounts". Default to "dsp", for digital spatial profiler/ aka GeoMx. Other options include "ncounter", "rsem", "quantile", and "st" for spatial transcriptomics/visium. |
a matrix of log2-scale SDs
library(GeomxTools)
datadir <- system.file("extdata", "DSP_NGS_Example_Data", package = "GeomxTools")
demoData <- readRDS(file.path(datadir, "/demoData.rds"))
demoData <- shiftCountsOne(demoData)
target_demoData <- aggregateCounts(demoData)
sd_from_noise <- runErrorModel(counts = exprs(target_demoData), platform = "dsp")
wts <- 1 / sd_from_noise
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.