colocalized-methods {Cardinal} | R Documentation

## Colocalized features

### Description

Find colocalized features in an imaging dataset.

### Usage

    ## 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(), ...)

### Arguments

`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 `BiocParallelParam`. See documentation for `bplapply`.
`...` | ignored.

### Value

A data frame with the colocalized features.

### Author(s)

Kylie A. Bemis

### See Also

`topFeatures`

### Examples

    setCardinalBPPARAM(SerialParam())

    set.seed(1)
    data <- simulateImage(preset=2, npeaks=10, representation="centroid")

    # find features colocalized with first feature
    colocalized(data, ref=1)

[Package Cardinal version 2.8.0 Index]