waldronlab / MultiAssayExperiment

Bioconductor package for management of multi-assay data
https://waldronlab.io/MultiAssayExperiment/
70 stars 32 forks source link

Row Name Requirements Unclear #227

Closed DarioS closed 6 years ago

DarioS commented 6 years ago

It seems that row names on experiments are required, although this is not currently enforced by the MultiAssayExperiment constructor.

library(MultiAssayExperiment)
mRNATable <- matrix(1:10, ncol = 2)
colnames(mRNATable) <- LETTERS[1:2]
proteinTable <- matrix(1:10, ncol = 2)
colnames(proteinTable) <- LETTERS[2:1]
anMSE <- MultiAssayExperiment(ExperimentList(list(mRNA = mRNATable,
                                             protein = proteinTable
                                            )))
wideFormat(anMSE)

The lack of row names creates the error Error: Duplicate identifiers for rows (1, 2, 3, 4, 5), (6, 7, 8, 9, 10), (16, 17, 18, 19, 20), (11, 12, 13, 14, 15). I think either the constructor should ban the use of matrices without row names or wideFormat should handle the situation better. Also, are row names with spaces allowed? wideFormat converts them to dots and setting check.names = FALSE has no effect on the resulting DataFrame. The documentation doesn't explain what ... may be used for although

... Additional arguments. See details.

suggests there is more information provided in the help page.