colocalized-methods {Cardinal} | R Documentation |
Find colocalized features in an imaging dataset.
## S4 method for signature 'MSImagingExperiment,missing' colocalized(object, mz, ...) ## S4 method for signature 'SparseImagingExperiment,ANY' colocalized(object, ref, n = 10, sort.by = c("correlation", "M1", "M2"), threshold = median, BPPARAM = getCardinalBPPARAM(), ...) ## S4 method for signature 'SpatialDGMM,ANY' colocalized(object, ref, n = 10, sort.by = c("Mscore", "M1", "M2"), threshold = median, BPPARAM = getCardinalBPPARAM(), ...)
object |
An imaging experiment. |
mz |
An m/z value giving the image to use as a reference. |
ref |
Either a numeric vector or logical mask of a region-of-interest, or the feature to use as a reference. |
n |
The number of top-ranked colocalized features to return. |
sort.by |
The colocalization measure used to rank colocalized features. Possible options include Pearson's correlation ("correlation"), match score ("Mscore"), and Manders' colocalization coefficients ("M1" and "M2"). |
threshold |
A function that returns the cutoff to use for creating logical masks of numeric references. |
BPPARAM |
An optional instance of |
... |
ignored. |
A data frame with the colocalized features.
Kylie A. Bemis
setCardinalBPPARAM(SerialParam()) set.seed(1) data <- simulateImage(preset=2, npeaks=10, representation="centroid") # find features colocalized with first feature colocalized(data, ref=1)