runMergeTumorIntoX | R Documentation |
Runs mergeTumorIntoX from an S4 object
A wrapper for applying mergeTumorIntoX to a NanostringGeomxSet object.
runMergeTumorIntoX(object, ...)
## S4 method for signature 'NanoStringGeoMxSet'
runMergeTumorIntoX(object, X, K = 10, pure_tumor_ids = NULL, norm_elt = NULL)
object |
An S4 object such as a GeoMxSet object |
... |
Arguments passed to mergeTumorIntoX |
X |
The training matrix |
K |
the number of clusters to fit |
pure_tumor_ids |
Vector identifying columns of norm that are pure tumor. Can be indices, logicals or column names. |
norm_elt |
norm data element in assayData |
updated X matrix with new columns, "tumor.1", "tumor.2", ...
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)
target_demoData <- normalize(target_demoData, "quant")
data(safeTME)
tumor.ids <- as.logical(sample(x = c("TRUE","FALSE"), size = 88, replace = TRUE))
safeTME.with.tumor <- runMergeTumorIntoX(object = target_demoData,
X = safeTME,
K = 3,
pure_tumor_ids = tumor.ids,
norm_elt = "exprs_norm")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.