topFeatures-methods {Cardinal} | R Documentation |
Extract the top-ranked features from the results of imaging analysis, based on test statistics, p-values, or adjusted p-values. The result is sorted data frame that can be further manipulated for downstream postprocessing.
#### Methods for Cardinal >= 2.x classes #### ## S4 method for signature 'SpatialShrunkenCentroids2' 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, ...)
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 |
... |
For newer classes, additional arguments to be passed to |
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. |
A data frame with the top-ranked features.
Kylie A. Bemis
meansTest
,
segmentationTest
,
spatialShrunkenCentroids
register(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))