Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getMD from SingleCellExperiment object #17

Open
baj12 opened this issue Feb 11, 2021 · 1 comment
Open

getMD from SingleCellExperiment object #17

baj12 opened this issue Feb 11, 2021 · 1 comment

Comments

@baj12
Copy link

baj12 commented Feb 11, 2021

I am working with SingleCellExperiment objects.
It seems that SingleCellExperiment::colData returns a "DFrame" and that reshape2::dcast in CreateTemporaObject requires a data.frame.

suppressMessages(
  setMethod("getMD","SingleCellExperiment",
            function(x) SingleCellExperiment::colData(x))
)
@baj12
Copy link
Author

baj12 commented Apr 6, 2021

Otherwise, I get an error message:

dcast Error in FUN(X[[i]], ...) : envir must be either NULL, a list, or an environment.

Replacing the above code in dataAccess.R with

suppressMessages(
  setMethod("getMD","SingleCellExperiment",
            function(x) data.frame(SingleCellExperiment::colData(x)))
)

resolves this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant