farrellja / URD

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

buildTree error: undefined columns selected #12

Open concatenize opened 6 years ago

concatenize commented 6 years ago

Hi Team URD! I was super impressed with your zebrafish paper, so I am trying out your package. I've hit a snag. It says:

> library(magrittr)
> library(URD)
> my_urd = readRDS("path/to/unzipped/attached/file.Robj")
> my_urd_tree = loadTipCells(my_urd, "tip.clusters")
> my_urd_tree %<>% buildTree( verbose = T, pseudotime = "pseudotime" )

Error in `[.data.frame`(object@diff.data, , paste0("visitfreq.raw.", segments)) : 
  undefined columns selected

I tried converting @group.ids$tip.clusters to numeric, but I get the same error.

My example data:

small_example.Robj.gz

I am using URD version 1.0.1 (installed from commit ed083d4) and R version 3.4.3 on Mac OS 10.11.6. Let me know if you can't reproduce the problem.

farrellja commented 6 years ago

Hi! Glad to hear that you liked the paper!

processRandomWalksFromTips stores information in @diff.data to represent how frequently each cell was visited in the random walks. This error indicates that some random walk information that the buildTree function is looking for has not been stored. It might be related to the fact that there are many levels of your clustering that weren't walked (i.e. clusters you decided not to use), but I'm not absolutely sure right now.

Try explicitly setting the tips that buildTree should use with the tips.use parameter and with save.all.breakpoint.info turned on: my_urd_tree <- buildTree(my_urd_tree, verbose = T, pseudotime = "pseudotime", tips.use = c("14","16","18","20","23","27","28","3","33","35","37","39","5","8"), save.all.breakpoint.info=T)

I'll look into this bug in more detail, because you shouldn't have to set those parameters, but that should allow you to move forward for now. Let me know if it works.

Best, Jeff

concatenize commented 6 years ago

That worked! Thanks!

Yichel518 commented 5 years ago

Hi @concatenize , I got the same snag with you, and I tried the solution above, but I get the same error. And before this step, I found that I didn't have tip.walk.files(# Get list of walk files tip.walk.files <- list.files(path = "~/Drop_Seq/walks/dm-8-tm-40-80/", pattern = ".rds", full.names = T)). At first, I thought it was the step I missed, but I checked the previous steps and found no such file. Do you think my error is related to the error? Regards, Yichel

concatenize commented 5 years ago

I'm sorry, I have no idea. I recommend you sort out the earliest error first; we may actually have had unrelated problems.

Yichel518 commented 5 years ago

Many thanks @concatenize , I am very sorry to have a very unrelated question, but the author has not responded to me for a long time. It is very urgent for me to solve this snag. Can you please tell me how your tip.walk.file generated? Maybe you are very busy, but please Sincerely, Yichel

concatenize commented 5 years ago

I'm sorry, I don't use URD anymore and I don't remember how it works. Did everything work with the tutorial before you switched to your own data? Can you post a small example on a separate issue documenting how the file fails to appear?

Yichel518 commented 5 years ago

Hello, thanks for you kind. In my opinion, there seems to be one less step in the process, saving. rds file, which causes me to not find walks files

decarlin commented 4 years ago

I am also having this problem, but not with consistency, sometimes this does not work, depending on how I define the tips

farrellja commented 4 years ago

@decarlin I'm not totally sure what's going on there. Can you share a reproducible example? It would be especially useful if you had a tip setting that did and did not work.