rankFeatures,MultiAssayExperiment-method {PDATK} | R Documentation

## Rank the Features in a `MultiAssayExperiment` Object

### Description

Rank the Features in a `MultiAssayExperiment` Object

### Usage

    ## S4 method for signature 'MultiAssayExperiment'
    rankFeatures(
      object,
      FUN = "mad",
      RANK_FUN = "dense_rank",
      ...,
      descending = TRUE,
      weights
    )

### Arguments

`object` | A `MultiAssayExperiment` to rank the features in.
`FUN` | A vectorized feature scoring function, such as `var` or `mad`. Defaults to `mad` from the `BiocGenerics` package.
`RANK_FUN` | A ranking function, such as `rank` or `dense_rank`. Defaults to `dense_rank` from `dplyr`.
`...` | Fall through arguments to `FUN`, such as `na.rm=TRUE`.
`descending` | Should your rank function be called with `-` before the values from `FUN`. Defaults to `TRUE`, which should be used if high values returned from `FUN` are good.
`weights` | A named `numeric` weighting vector with a weight for each experiment in the `MultiAssayExperiment` object. Names must match the `names(experiments(object))`. Passed to `matrixStats::weightedMedian` when aggregating feature scores per assay. Defaults to the sample size of an assay relative to the largest sample size when this paramter is missing.

### Value

The `MultiAssayExperiment` with the item `featureRanks` in the object metadata, which stores a `DataFrame` containing ranks accross all assays for each unique feature and the additional columns `feature_score` and `feature_rank`, as calculated with `FUN` and `RANK_FUN`, respectively. Information about which functions were used for each column can be found in the object `mcols` in the `calculated_with` column.

### See Also

`BiocGenerics::mad`, `dplyr::dense_rank`, `matrixStats::weightedMedian`

[Package PDATK version 1.0.2 Index]