farrellja / URD

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

Error in Define the tip cells #36

Closed Yichel518 closed 5 years ago

Yichel518 commented 5 years ago

Hi, @farrellja When I run the step of defining the tip cells: tips <- setdiff(unique(object@group.ids[,clustering]), NA) The error is following: Error in [.data.frame(object@group.ids, , clustering) : object 'clustering' not found and my object@group.ids is: image

YiqunW commented 5 years ago

As the error suggests, you need to define clustering as the name of the column in object@group.ids that stores the clustering result you want to use. For example, clustering <- 'Louvain-15'.

Yichel518 commented 5 years ago

@YiqunW Hello, I set "clustering" as Louvain-30, but the result of tips is image And then I get info my cluster.arguments file is image image so I amended my command as clustering <- 'Infomap-30', but the result was the same as above.

Yichel518 commented 5 years ago

And I can not clearly understand the next step: this.tip <- tips[tip.to.walk] # tip.to.walk was passed by the cluster job array. What is the "tip.to.walk"? Did I miss the previous steps? Many thanks

YiqunW commented 5 years ago

Please follow steps in URD-03-ClusteringAndDeterminingTips to transfer clustering assignment for 6-somite data to the main object (see sections "Generate final clusterings" and "Transfer clusterings to main object"). Since the tips represent the most developed cell states in our tree, they should be found at the oldest developmental stage in the data, which is 6-somite. Once you transfer the 6-somite clustering results to the main object, you should choose one of them to set your tips (tips <- setdiff(unique(object@group.ids[,6somiteClustering]), NA)). tip.to.walk should correspond to one of the 6-somite clusters you use as your tips. It specifies from which tip the random walks are going to be simulated. We ran this chunk of code as a job array submitted to a research computing cluster so that we can run random walks from each tip in parallel to save time. So in our case tip.to.walk was passed by the cluster job array, but you can certainly define it in the code.

Yichel518 commented 5 years ago

@YiqunW ,Thanks for your kind help. and now I run

Do the random walks

these.walks <- simulateRandomWalk(start.cells=tip.cells, transition.matrix=biased.tm, end.cells=root.cells, n=walks.to.do, end.visits=1, verbose.freq=round(walks.to.do/20), max.steps=5000). but I do not know whats is the "n=walks.to.do"? At first, I guessed the number of cells, but after running for a long time, there was no result, just like a dead program.