topFeatures-methods: Top-ranked features from imaging analysis results

Description Usage Arguments Value Author(s) See Also Examples

Description

Extract the top-ranked features from the results of imaging analysis, based on post-hoc correlation, test statistics, p-values, or adjusted p-values. The result is sorted data frame that can be further manipulated for downstream postprocessing.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#### Methods for Cardinal >= 2.x classes ####

## S4 method for signature 'SpatialShrunkenCentroids2'
topFeatures(object, ..., n = 10, model = modelData(object))

## S4 method for signature 'SpatialKMeans2'
topFeatures(object, ..., n = 10, model = modelData(object))

## S4 method for signature 'MeansTest'
topFeatures(object, ..., n = 10, p.adjust = "BH")

## S4 method for signature 'SegmentationTest'
topFeatures(object, ..., n = 10, model = modelData(object), p.adjust = "BH")

#### Methods for Cardinal 1.x classes ####

## S4 method for signature 'ResultSet'
topFeatures(object, n = 6,
    model = pData(modelData(object)),
    type = c('+', '-', 'b'),
    sort.by = fvarLabels(object),
    filter = list(),
    ...)

## S4 method for signature 'PCA'
topFeatures(object, n = 6,
    sort.by = "loadings",
    ...)

## S4 method for signature 'PLS'
topFeatures(object, n = 6,
    sort.by = c("coefficients", "loadings", "weights"),
    ...)

## S4 method for signature 'OPLS'
topFeatures(object, n = 6,
    sort.by = c("coefficients",
            "loadings", "Oloadings",
            "weights", "Oweights"),
    ...)

## S4 method for signature 'SpatialKMeans'
topFeatures(object, n = 6,
    sort.by = c("betweenss", "withinss"),
    ...)

## S4 method for signature 'SpatialShrunkenCentroids'
topFeatures(object, n = 6,
    sort.by = c("tstatistics", "p.values"),
    ...)

## S4 method for signature 'CrossValidated'
topFeatures(object, ...)

Arguments

object

The results of an imaging experiment analysis.

n

The number of top-ranked records to return.

model

If more than one model was fitted, results from which should be shown? Defaults to all models in the object This can name the models explicitly or specify a list of parameter values.

p.adjust

The p.adjust method used adjust p-values to account for multiple testing. Defaults to Benjamini \& Hochberg ("BH") to control the false discovery rate (FDR).

...

For newer classes, additional arguments to be passed to filter, to further filter the results.

type

How should the records be ranked? '+' shows greatest values first (decreasing order), '-' shows least values first (increasing order), and 'b' uses decreasing order based on absolute values.

sort.by

What variable should be used for sorting?

filter

A list of named variables with values to use to filter the results. For example, for testing or classification, this can be used to only show rankings for a particular condition.

Value

A data frame with the top-ranked features.

Author(s)

Kylie A. Bemis

See Also

meansTest, segmentationTest, spatialShrunkenCentroids

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
setCardinalBPPARAM(SerialParam())

set.seed(1)
x <- simulateImage(preset=2, npeaks=10, dim=c(10,10),
    snoise=1, sdpeaks=1, representation="centroid")

y <- makeFactor(circle=pData(x)$circle, square=pData(x)$square)

res <- spatialShrunkenCentroids(x, y, r=1, s=c(0,3,6))

topFeatures(res, model=list(s=6))

Cardinal documentation built on Nov. 8, 2020, 11:10 p.m.