cleanDataset {iSEE} | R Documentation

## Clean the dataset

### Description

Clean the SummarizedExperiment by making sure that names of various fields are available and unique.

### Usage

    cleanDataset(se)

    ## S4 method for signature 'SummarizedExperiment'
    cleanDataset(se)

    ## S4 method for signature 'SingleCellExperiment'
    cleanDataset(se)

### Arguments

`se` | A SummarizedExperiment object or one of its subclasses.

### Details

Various Panels assume that the row and column names of the input SummarizedExperiment are available and unique. This function enforces that, adding consecutive integer names if not available and calling `make.unique` if they are duplicated.

Various Panels further assume that the `assay`, `rowData`, `colData` names are unique; if this is not the case, `selectInput` behaves in unexpected (and incorrect) ways. This function enforces that as well by running them through `make.unique`.

For SingleCellExperiment object, we enforce uniqueness in the `reducedDims`.

All changes result in warnings as a “sensible” object is not expected to require any work.

### Value

A cleaned version of `se`.

### Author(s)

Aaron Lun

### Examples

    # Creating a very naughty SE.
    se <- SummarizedExperiment(list(cbind(1:10, 2:11), cbind(2:11, 3:12)),
       colData=DataFrame(A=1:2, A=3:4, check.names=FALSE),
       rowData=DataFrame(B=1:10, B=1:10, check.names=FALSE))
    se

    cleanDataset(se)

[Package iSEE version 2.4.0 Index]