Closed DelongZHOU closed 2 weeks ago
Hi,
Just wondering, is this issue related to #182 ? Are you able to provide a simple example where. you can reproduce this behavior?
Hi Sam,
I'm not sure whether it's related to #182 . For what it's worth, deleting the Tom file using
unlink("TOM", recursive = TRUE)
doesn't fix the problem.
I'll check with my PI about sharing the data. Do you have a email that I can send to?
Thanks! Delong
I played with my codes some more and realized that in my shuffle cell function only the "local" copy of the seurat object is changed while the create Tom function is using the "global" copy. I changed a few lines and now the correct object is used and producing different scores for different seed. Thank you!
Hello Sam,
As part of my differential connectivity experiment I'm shuffling cell condition label and remaking the TOM for the FDR. Despite I'm setting random seed for each iteration, shuffling cell condition, removing saved TOM files and clearing memory, more often than not the TOM files are not updated. Here's the part of my code that got involved:
Sometimes both call of shuffled cells return the same as unshuffled table, sometimes the seed 1 is successful but seed 2 returns the same as seed 1 despite the table of condition/true condition indicates the cell distribution has changed.
I know that Seurat's subset function reset the seed, but I set the seed and immediately shuffle labels before calling the subset and confirm the shuffling by the condition/true condition table.
It's also inconsistant when the TOM gets updated. Sometimes I manage to get it update manually running the create_TOM_cond function (other times that fails too, I don't understand why), but not in the map function; sometimes the map works but won't work inside the score function, Some times the score function works when ran interactively, but not as part of Rscript <>.r
I'm totally at loss what might be the cause. Would you have an idea? Thanks!
Best, Delong