-
Notifications
You must be signed in to change notification settings - Fork 18
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
cbind() hangs if assays don't match #44
Comments
Sounds like a se_obj_1 <- as(sce_obj_1, "SummarizedExperiment")
se_obj_2 <- as(sce_obj_2, "SummarizedExperiment")
# Temporary hack for Bioconductor/SummarizedExperiment#29
rownames(se_obj_1) <- rownames(sce_obj_1)
rownames(se_obj_2) <- rownames(sce_obj_2)
# Does this still hang?
cbind(se_obj_1, se_obj_2) I don't have any familiarity with whatever the IRKernel is, so it would nice to see what happens on a standard R installation. Some information of the dimensions of your two objects would also be useful. |
I've tried on a vanilla R session the following and it throws an error as expected.
So, I agree with @LTLA that it would be nice to see if you get the same behavior on a standard R installation and/or if my example above hangs on your R. |
Thank you both so much for your help! @LTLA When I try your solution in my working environment, it does not change anything. It still hangs. @drisso When I try your code in my working environment, it throws an error as expected. Same if I try your code in a standard R installation. When I try my code in a standard R installation, it throws the correct error, and Then hangs until I pass a CTRL-C kill signal. @LTLA 's fix does not change this on my objects in a standard R install. I'm just noticing that the rownames don't line up between my two objects. However, I tried fixing this and it doesn't fix my hung process problem, even with @LTLA 's test. Another wrinkle is that I don't attach any packages, I only load them into namespaces because I don't like not knowing which method comes from which package or which methods have been overloaded. However, I tried this fresh in a new environment where I loaded packages with Here is the
This makes me think that it's a bug being caused by a combination of
because the |
That's barely even 10000 cells, which is certainly not what I'd consider to be "large". I will note, though, that historically the traceback for the error has been generated by deparsing these large objects. As in, if you printed the traceback, you'd get a faceful of:
For large objects, this takes a long time, simply because you need to pack the entire object into a string and print it to the console. As of R 4.0.0, this should no longer be the case:
|
Oh that's an interesting idea. When it gets released, I'll try replicating this issue and see what happens. Thanks very much for the help! |
When I try to use
SingleCellExperiment::cbind(sce_obj_1, sce_obj_2)
, the method hangs indefinitely if the assays don't match. In my case, I was trying to merge two sets of cells. Each object had a single assay. I made a mistake and left thecounts
assay in the first object and thelogcounts
assay in the second object. Both objects only had 1 assay, and all the metadata dataframes were compatible. The method ran for several hours before I cancelled it. When I realized my mistake, and reformatted so that both had thecounts
assay, then it ran in seconds. I also tried just renaming the incorrect assay, and that also fixed the problem. It would be nice if theSingleCellExperiment::cbind
method caught this error and quit with a warning, instead of hanging indefinitely. When you're working with large objects, sometimes it is believable that it might take a few minutes to merge, and it was unclear whether or not the method was hung. Thank you!Here is my
sessionInfo()
. I'm running on the IRKernel in Jupyter Lab,The text was updated successfully, but these errors were encountered: