Skip to contents

Create a single interesting groups column (interestingGroups) used for coloring in plots. When multiple interesting groups are present, unite into a single column, delimited by a colon.

Usage

uniteInterestingGroups(object, ...)

# S4 method for DFrame
uniteInterestingGroups(object, interestingGroups)

Arguments

object

Object.

interestingGroups

character. Groups of interest to use for visualization. Corresponds to factors describing the columns of the object.

...

Additional arguments.

Value

Modified object. Now contains an interestingGroups column.

Note

Updated 2021-02-03.

Examples

data(RangedSummarizedExperiment, package = "AcidTest")
rse <- RangedSummarizedExperiment

## DFrame ====
object <- rse
x <- uniteInterestingGroups(
    object = sampleData(object),
    interestingGroups = interestingGroups(object)
)
print(x)
#> DataFrame with 12 rows and 3 columns
#>          condition sampleName interestingGroups
#>           <factor>   <factor>          <factor>
#> sample01         A   sample01                 A
#> sample02         A   sample02                 A
#> sample03         A   sample03                 A
#> sample04         A   sample04                 A
#> sample05         A   sample05                 A
#> ...            ...        ...               ...
#> sample08         B   sample08                 B
#> sample09         B   sample09                 B
#> sample10         B   sample10                 B
#> sample11         B   sample11                 B
#> sample12         B   sample12                 B