-
Notifications
You must be signed in to change notification settings - Fork 28
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
improved handling of mergeData when different data types are present #295
Comments
We could probably have a more informative error, but purrr::map(x, function(se) {names(assays(se)) <- "data"; return(se)}) |>
purrr::reduce(rbind) (the first line being necessary because rbind quite reasonably errors instead of combining different assays with different names, so we have to trick it by giving assays the same name) Or if you want to merge data types of multiple datasets, use |
Ah yes, of course :) |
From the documentation, this is perfectly clear to me:
And the error message you've referenced spells it out again:
The documentation and behavior are as intended Rather than make changes, we will stay focused on releasing version 4.0.0. |
Describe the bug
The
mergeData
function returns an error for all data sets that I tried to combine (LeeKA_2022*, KaurK_2020*, BritoIL_2016*, AsnicarF_20*). Not sure if this is a bug or a feature but I tried to follow the manpage. If the behavior is intended, the manpage could be potentially clarified.To Reproduce
Let us load the library
library(curatedMetagenomicData)
Let us load a data set
x <- curatedMetagenomicData("LeeKA_2022*", dryrun = FALSE)
Now the first 5 elements in the list
x
are SE and the 6th element is a TreeSE object.Then try to merge the data:
(x |> mergeData())
This throws an error:
Same happens also when we do this only with SE objects (same type):
Then try to merge the data:
(x[1:2] |> mergeData())
This throws an error:
Expected behavior
I expected that the
mergeRows
would have merged the list elements. The code was copy-pasted from the package homepage.The text was updated successfully, but these errors were encountered: