waldronlab / MultiAssayExperiment

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

improve error message when assigning data.frame to colData #330

Closed drighelli closed 6 months ago

drighelli commented 6 months ago

`I tried to assign adata.frameto thecolDataof aMultiAssayExperiment, giving me anunused argument` error.

It might be nice to catch and improve the error message because it seems related to the unexpected data.frame class, using DataFrame nicely worked.

I don't have a reproducible example, but I can provide an example of the output.

> class(cd)
[1] "data.frame"
> colData(mae) <- cd
Error in .local(x, ..., value) : unused argument (value)
> colData(mae) <- DataFrame(cd)
> 

I hope this could be useful.

Dario

LiNk-NY commented 6 months ago

Hi Dario! @drighelli Thank you for reporting this. It is actually a bug in the colData<- call. I fixed it in both release (1.30.2) and devel (1.31.2). It should now work with data.frame objects. Best regards, Marcel