farrellja / URD

URD - Reconstruction of Branching Developmental Trajectories
GNU General Public License v3.0
118 stars 41 forks source link

buildTree Error #35

Closed 02infi closed 5 years ago

02infi commented 5 years ago

Hello @farrellja,

I am trying to run URD on single cell data which is around 50K cells. When I am running buildTree(), I am getting the embedding error :

[1] "Calculating divergence between 47 and 56 (Pseudotime 0.439 to 0.553)" Error in embed(1:n.pseudotime.groups, dimension = min(window.size, length(unique(visit.data$pseudotime.group)))) : wrong embedding dimension

Does this mean that all the cells in the cluster have unassigned pseudotime ?

farrellja commented 5 years ago

@02infi

Sorry for that other user who does not even bother to read documentation bothering you.

It's possible that what you described occurred. Unfortunately, it will be a bit difficult to check, as I suspect that segments 47 & 56 are created during the process of building the tree, and if it's not completing it will be tough to identify exactly which cells the are.

Can you provide a reproducible example that is your workspace right before running buildTree and then the command you issue to buildTree?

02infi commented 5 years ago

@farrellja

Well the segment 56 is created joining the segment 3 and 4. Now iteratively it trying to calculate the divergence between newly created segment and the already present tip (segment 47).

URD_object.built <- buildTree(object = URD_object, pseudotime = "pseudotime",tips.use = tips.to.use,save.breakpoint.plots = F, verbose = T,cells.per.pseudotime.bin = 80)

I follow the documentation step by step, excluding the some tips according to diffusion maps. I also face the same problem when I am trying to rerun URD on zebrafish data from your lab. It also gives me the same error.

Do you think the parameter tuning can overcome this error ?

Thanks!

farrellja commented 5 years ago

@02infi

It's especially surprising if you're having the same issue with our data — the software obviously has run OK on that data set in the past ;) It's possible that parameter tuning would avoid the error, but it seems like something else is happening — either one of your inputs has an issue, or there is a bug in our code that only occurs under certain conditions.

First, please try re-running with the most up-to-date version of URD (1.0.3.9003: devtools::install_github("farrellja/URD@debug").

If that doesn't work, then can you share your workspace from right before running the above command? You can use the R command save and then share the file with me via Dropbox, Google Drive, or some other such method. It will be hard for me to help you troubleshoot otherwise.

02infi commented 5 years ago

@farrellja

Thanks for the debug file. I will rerun it and get back to you. Yes, I will share the URD object too.

Regarding the zebrafish data from your lab, do you think If I rerun it with same exact parameters, I will expect the same global structure of development ?

Finally, thanks for building this package. I really enjoying it :)

xiatianjihao commented 4 years ago

@02infi , Could you have solve the problem? I have met the same issue with you.