Bioconductor / SummarizedExperiment

A container (S4 class) for matrix-like assays
https://bioconductor.org/packages/SummarizedExperiment
33 stars 9 forks source link

Slightly relaxing the rowData checks for cbind #33

Open LTLA opened 4 years ago

LTLA commented 4 years ago

Inspired by https://support.bioconductor.org/p/126722/.

The problem is what to do when a rowData field is not identical across cbind'd elements. Currently cbind throws an error, which is understandable (and safest) but inconvenient.

A more convenient approach would be to simply drop non-identical fields with a warning. This would allow people to proceed with cbinded results - most of the time, they won't even care that the fields are lost, given that it wouldn't make sense for them to be there anyway.

cbind already accommodates situations where the elements have non-identical rowData with non-overlapping names, so it doesn't seem much of a stretch to just drop fields instead of erroring.