cleanDataset | R Documentation |
Clean the SummarizedExperiment by making sure that names of various fields are available and unique.
Also transfer any information stored in rowRanges
into rowData
.
cleanDataset(se)
## S4 method for signature 'SummarizedExperiment'
cleanDataset(se)
## S4 method for signature 'SingleCellExperiment'
cleanDataset(se)
se |
A SummarizedExperiment object or one of its subclasses. |
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
.
Finally, positional information in rowRanges
is not accessible to iSEE
.
This function moves this information into rowData
, prefixing the column names with rowRanges_
.
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.
A cleaned version of se
.
Aaron Lun, Charlotte Soneson
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.