theislab / destiny

R package for single cell and other data analysis using diffusion maps
https://theislab.github.io/destiny/
GNU General Public License v3.0
77 stars 11 forks source link

Changed behavior in git vs v2.12 #24

Open flying-sheep opened 5 years ago

flying-sheep commented 5 years ago

@igordot wrote:

Actually, I have an update on this issue. I tested the new version on a few different data sets. Most of them come out essentially the same, but there is one data set that produced very different results.

This is the result with 2.12: image

And this is the with the GitHub version: image

The first one is roughly what one would expect and the second one is not. I tried subsampling the number of cells. I am showing 5000 cells above. Reducing it to 4500 yielded a plot that looks normal with both versions, so it seems like the input data is mostly okay.

Do you know what may be causing this?

flying-sheep commented 5 years ago

We have to figure out if this is a bug in my new logic from 1008274908db42e08e608236bab1df382795bf5e or an effect of the switch to RSpectra in b4e8dade4972ed5f3b815a58fd87c7244214cd09. There were no other relevant changes since then.

  1. Please check if it’s a logic bug by installing a version doesn’t have the logic change and test there, i.e. devtools::install_github('theislab/destiny', ref='fbf6f29b4f3eab54095b2c96da27173619babc52')
  2. Please check if it’s a random thing by trying several seeds before recreating the diffusion map: set.seed(1), set.seed(2), …

Due to the subsampling making a difference, I suspect that the data just gives unstable results, and using different seeds might make a difference.

igordot commented 5 years ago

I will give it a try. I can also share the input matrix if you'd like.

Regarding subsampling, I was using the same input matrix for both versions.