farrellja / URD

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

Not a complete segment tree plot #45

Closed MichaelPeibo closed 4 years ago

MichaelPeibo commented 4 years ago

Hi URD team,

I have two issues using URD to build tree.

  1. I got a not complete segment tree plot, as below:

image there is not a tree structure. The running code and log for bulidTree is :

urd.tree <- buildTree(urd.tree, pseudotime = "pseudotime", divergence.method = "preference",
save.all.breakpoint.info = T, tips.use = c('6','8','9','10','11','13','14','16','17'), cells.per.pseudotime.bin = 25,
bins.per.pseudotime.window = 8, p.thresh = 0.05, min.cells.per.segment = 10,
save.breakpoint.plots = NULL)
[1] "Calculating divergence between 6 and 8 (Pseudotime 0 to 0.462)"
[1] "Calculating divergence between 6 and 9 (Pseudotime 0 to 0.362)"
[1] "Calculating divergence between 6 and 10 (Pseudotime 0 to 0.462)"
[1] "Calculating divergence between 6 and 11 (Pseudotime 0 to 0.448)"
[1] "Calculating divergence between 6 and 13 (Pseudotime 0 to 0.462)"
[1] "Calculating divergence between 6 and 14 (Pseudotime 0 to 0.462)"
[1] "Calculating divergence between 6 and 16 (Pseudotime 0 to 0.305)"
[1] "Calculating divergence between 6 and 17 (Pseudotime 0 to 0.458)"
[1] "Calculating divergence between 8 and 9 (Pseudotime 0 to 0.362)"
[1] "Calculating divergence between 8 and 10 (Pseudotime 0 to 0.474)"
[1] "Calculating divergence between 8 and 11 (Pseudotime 0 to 0.448)"
[1] "Calculating divergence between 8 and 13 (Pseudotime 0 to 0.474)"
[1] "Calculating divergence between 8 and 14 (Pseudotime 0 to 0.474)"
[1] "Calculating divergence between 8 and 16 (Pseudotime 0 to 0.305)"
[1] "Calculating divergence between 8 and 17 (Pseudotime 0 to 0.458)"
[1] "Calculating divergence between 9 and 10 (Pseudotime 0 to 0.362)"
[1] "Calculating divergence between 9 and 11 (Pseudotime 0 to 0.362)"
[1] "Calculating divergence between 9 and 13 (Pseudotime 0 to 0.362)"
[1] "Calculating divergence between 9 and 14 (Pseudotime 0 to 0.362)"
[1] "Calculating divergence between 9 and 16 (Pseudotime 0 to 0.305)"
[1] "Calculating divergence between 9 and 17 (Pseudotime 0 to 0.362)"
[1] "Calculating divergence between 10 and 11 (Pseudotime 0 to 0.448)"
[1] "Calculating divergence between 10 and 13 (Pseudotime 0 to 0.553)"
[1] "Calculating divergence between 10 and 14 (Pseudotime 0 to 0.512)"
[1] "Calculating divergence between 10 and 16 (Pseudotime 0 to 0.305)"
[1] "Calculating divergence between 10 and 17 (Pseudotime 0 to 0.458)"
[1] "Calculating divergence between 11 and 13 (Pseudotime 0 to 0.448)"
[1] "Calculating divergence between 11 and 14 (Pseudotime 0 to 0.448)"
[1] "Calculating divergence between 11 and 16 (Pseudotime 0 to 0.305)"
[1] "Calculating divergence between 11 and 17 (Pseudotime 0 to 0.448)"
[1] "Calculating divergence between 13 and 14 (Pseudotime 0 to 0.512)"
[1] "Calculating divergence between 13 and 16 (Pseudotime 0 to 0.305)"
[1] "Calculating divergence between 13 and 17 (Pseudotime 0 to 0.458)"
[1] "Calculating divergence between 14 and 16 (Pseudotime 0 to 0.305)"
[1] "Calculating divergence between 14 and 17 (Pseudotime 0 to 0.458)"
[1] "Calculating divergence between 16 and 17 (Pseudotime 0 to 0.305)"
[1] "Joining segments 10 and 13 at pseudotime 0.363 to create segment 18"
[1] "Calculating divergence between 6 and 18 (Pseudotime 0 to 0.363)"
[1] "Calculating divergence between 8 and 18 (Pseudotime 0 to 0.363)"
[1] "Calculating divergence between 9 and 18 (Pseudotime 0 to 0.362)"
[1] "Calculating divergence between 11 and 18 (Pseudotime 0 to 0.363)"
[1] "Calculating divergence between 14 and 18 (Pseudotime 0 to 0.363)"
[1] "Calculating divergence between 16 and 18 (Pseudotime 0 to 0.305)"
[1] "Calculating divergence between 17 and 18 (Pseudotime 0 to 0.363)"
[1] "Joining segments 14 and 18 at pseudotime 0.234 to create segment 19"
[1] "Calculating divergence between 6 and 19 (Pseudotime 0 to 0.234)"
[1] "Calculating divergence between 8 and 19 (Pseudotime 0 to 0.234)"
[1] "Calculating divergence between 9 and 19 (Pseudotime 0 to 0.234)"
[1] "Calculating divergence between 11 and 19 (Pseudotime 0 to 0.234)"
[1] "Calculating divergence between 16 and 19 (Pseudotime 0 to 0.234)"
[1] "Calculating divergence between 17 and 19 (Pseudotime 0 to 0.234)"
[1] "Joining segments 8 and 11 at pseudotime 0.215 to create segment 20"
[1] "Calculating divergence between 6 and 20 (Pseudotime 0 to 0.215)"
[1] "Calculating divergence between 9 and 20 (Pseudotime 0 to 0.215)"
[1] "Calculating divergence between 16 and 20 (Pseudotime 0 to 0.215)"
[1] "Calculating divergence between 17 and 20 (Pseudotime 0 to 0.215)"
[1] "Calculating divergence between 19 and 20 (Pseudotime 0 to 0.215)"
[1] "Joining segments 9 and 17 at pseudotime 0.21 to create segment 21"
[1] "Calculating divergence between 6 and 21 (Pseudotime 0 to 0.21)"
[1] "Calculating divergence between 16 and 21 (Pseudotime 0 to 0.21)"
[1] "Calculating divergence between 19 and 21 (Pseudotime 0 to 0.21)"
[1] "Calculating divergence between 20 and 21 (Pseudotime 0 to 0.21)"
[1] "Joining segments 19 and 20 at pseudotime 0.203 to create segment 22"
[1] "Calculating divergence between 6 and 22 (Pseudotime 0 to 0.203)"
[1] "Calculating divergence between 16 and 22 (Pseudotime 0 to 0.203)"
[1] "Calculating divergence between 21 and 22 (Pseudotime 0 to 0.203)"
[1] "Joining segments 6 and 22 at pseudotime 0.189 to create segment 23"
[1] "Calculating divergence between 16 and 23 (Pseudotime 0 to 0.189)"
[1] "Calculating divergence between 21 and 23 (Pseudotime 0 to 0.189)"
[1] "Joining segments 21 and 23 at pseudotime 0.178 to create segment 24"
[1] "Calculating divergence between 16 and 24 (Pseudotime 0 to 0.178)"
[1] "Joining segments 16 and 24 at pseudotime 0.172 to create segment 25"
[1] "Assigning cells to segments."
[1] "Collapsing short segments."
[1] "Removing singleton segments."
[1] "Reassigning cells to segments."
[1] "Assigning cells to nodes."
[1] "Laying out tree."
[1] "Adding cells to tree."
Warning messages:
1: In assignCellsToSegments(object, pseudotime, verbose) :
  3636 cells were not visited by a branch that exists at their pseudotime and were not assigned.
2: In assignCellsToSegments(object, pseudotime, verbose) :
  3636 cells were not visited by a branch that exists at their pseudotime and were not assigned.

Also running log for plotTree(urd.tree, "segment") says some rows are removed, I do not know whether it will affect the tree plot.

Warning messages:
1: Removed 6312 rows containing missing values (geom_point).
2: Removed 64 rows containing missing values (geom_segment).

Another issue is I got relatively low pseudotime value(max is 0.6 around), is any concerns about this? image

Thanks in advance! Very powerful and handy package!

MichaelPeibo commented 4 years ago

An UPDATE of dim plot for tree segment : image

MichaelPeibo commented 4 years ago

An UPDATE: I have tried to assign a large, contiguous region of the data as tips , to reduce the cells unvisited, as you described in this issue. Now when I build tree, I got this:

urd.tree <- buildTree(urd.tree, pseudotime = "pseudotime", divergence.method = "ks",
+ save.all.breakpoint.info = T, tips.use = tips.to.build, cells.per.pseudotime.bin = 25,visit.threshold = 0.7,
+ bins.per.pseudotime.window = 10, p.thresh = 0.001, min.cells.per.segment = 10,
save.breakpoint.plots = NULL)
+ save.breakpoint.plots = NULL)
[1] "Calculating divergence between 0 and 1 (Pseudotime 0 to 0.467)"
[1] "Calculating divergence between 0 and 3 (Pseudotime 0 to 0.458)"
[1] "Calculating divergence between 0 and 7 (Pseudotime 0 to 0.467)"
Difference between 0 and 7 always TRUE -- setting breakpoint to beginning.
[1] "Calculating divergence between 0 and 8 (Pseudotime 0 to 0.44)"
[1] "Calculating divergence between 0 and 9 (Pseudotime 0 to 0.467)"
Difference between 0 and 9 always TRUE -- setting breakpoint to beginning.
[1] "Calculating divergence between 0 and 10 (Pseudotime 0 to 0.448)"
[1] "Calculating divergence between 0 and 11 (Pseudotime 0 to 0.467)"
[1] "Calculating divergence between 1 and 3 (Pseudotime 0 to 0.458)"
[1] "Calculating divergence between 1 and 7 (Pseudotime 0 to 0.474)"
Difference between 1 and 7 always TRUE -- setting breakpoint to beginning.
[1] "Calculating divergence between 1 and 8 (Pseudotime 0 to 0.44)"
[1] "Calculating divergence between 1 and 9 (Pseudotime 0 to 0.474)"
[1] "Calculating divergence between 1 and 10 (Pseudotime 0 to 0.448)"
[1] "Calculating divergence between 1 and 11 (Pseudotime 0 to 0.474)"
[1] "Calculating divergence between 3 and 7 (Pseudotime 0 to 0.458)"
Difference between 3 and 7 always TRUE -- setting breakpoint to beginning.
[1] "Calculating divergence between 3 and 8 (Pseudotime 0 to 0.44)"
[1] "Calculating divergence between 3 and 9 (Pseudotime 0 to 0.458)"
Difference between 3 and 9 always TRUE -- setting breakpoint to beginning.
[1] "Calculating divergence between 3 and 10 (Pseudotime 0 to 0.448)"
[1] "Calculating divergence between 3 and 11 (Pseudotime 0 to 0.458)"
[1] "Calculating divergence between 7 and 8 (Pseudotime 0 to 0.44)"
[1] "Calculating divergence between 7 and 9 (Pseudotime 0 to 0.553)"
[1] "Calculating divergence between 7 and 10 (Pseudotime 0 to 0.448)"
Difference between 7 and 10 always TRUE -- setting breakpoint to beginning.
[1] "Calculating divergence between 7 and 11 (Pseudotime 0 to 0.512)"
[1] "Calculating divergence between 8 and 9 (Pseudotime 0 to 0.44)"
[1] "Calculating divergence between 8 and 10 (Pseudotime 0 to 0.44)"
[1] "Calculating divergence between 8 and 11 (Pseudotime 0 to 0.44)"
[1] "Calculating divergence between 9 and 10 (Pseudotime 0 to 0.448)"
Difference between 9 and 10 always TRUE -- setting breakpoint to beginning.
[1] "Calculating divergence between 9 and 11 (Pseudotime 0 to 0.512)"
[1] "Calculating divergence between 10 and 11 (Pseudotime 0 to 0.448)"
[1] "Joining segments 7 and 9 at pseudotime 0.316 to create segment 12"
[1] "Calculating divergence between 0 and 12 (Pseudotime 0 to 0.316)"
Difference between 0 and 12 always TRUE -- setting breakpoint to beginning.
[1] "Calculating divergence between 1 and 12 (Pseudotime 0 to 0.316)"
[1] "Calculating divergence between 3 and 12 (Pseudotime 0 to 0.316)"
Difference between 3 and 12 always TRUE -- setting breakpoint to beginning.
[1] "Calculating divergence between 8 and 12 (Pseudotime 0 to 0.316)"
[1] "Calculating divergence between 10 and 12 (Pseudotime 0 to 0.316)"
Difference between 10 and 12 always TRUE -- setting breakpoint to beginning.
[1] "Calculating divergence between 11 and 12 (Pseudotime 0 to 0.316)"
[1] "Joining segments 1 and 10 at pseudotime 0.293 to create segment 13"
[1] "Calculating divergence between 0 and 13 (Pseudotime 0 to 0.293)"
[1] "Calculating divergence between 3 and 13 (Pseudotime 0 to 0.293)"
[1] "Calculating divergence between 8 and 13 (Pseudotime 0 to 0.293)"
Difference between 8 and 13 always TRUE -- setting breakpoint to beginning.
[1] "Calculating divergence between 11 and 13 (Pseudotime 0 to 0.293)"
[1] "Calculating divergence between 12 and 13 (Pseudotime 0 to 0.293)"
Difference between 12 and 13 always TRUE -- setting breakpoint to beginning.
[1] "Joining segments 0 and 13 at pseudotime 0.284 to create segment 14"
[1] "Calculating divergence between 3 and 14 (Pseudotime 0 to 0.284)"
[1] "Calculating divergence between 8 and 14 (Pseudotime 0 to 0.284)"
[1] "Calculating divergence between 11 and 14 (Pseudotime 0 to 0.284)"
[1] "Calculating divergence between 12 and 14 (Pseudotime 0 to 0.284)"
Difference between 12 and 14 always TRUE -- setting breakpoint to beginning.
[1] "Joining segments 8 and 12 at pseudotime 0.184 to create segment 15"
[1] "Calculating divergence between 3 and 15 (Pseudotime 0 to 0.184)"
[1] "Calculating divergence between 11 and 15 (Pseudotime 0 to 0.184)"
[1] "Calculating divergence between 14 and 15 (Pseudotime 0 to 0.184)"
Difference between 14 and 15 always TRUE -- setting breakpoint to beginning.
[1] "Joining segments 3 and 14 at pseudotime 0.154 to create segment 16"
[1] "Calculating divergence between 11 and 16 (Pseudotime 0 to 0.154)"
[1] "Calculating divergence between 15 and 16 (Pseudotime 0 to 0.154)"
Difference between 15 and 16 always TRUE -- setting breakpoint to beginning.
[1] "Joining segments 11 and 16 at pseudotime 0 to create segment 17"
[1] "Calculating divergence between 15 and 17 (Pseudotime 0 to 0)"
Difference between 15 and 17 always TRUE -- setting breakpoint to beginning.
[1] "Joining segments 15 and 17 at pseudotime 0 to create segment 18"
[1] "Assigning cells to segments."
[1] "Collapsing short segments."
[1] "Removing singleton segments."
[1] "Reassigning cells to segments."
[1] "Assigning cells to nodes."
[1] "Laying out tree."
[1] "Adding cells to tree."
Warning messages:
1: In pseudotimeBreakpointByStretch(div.pseudotime, segment.1, segment.2,  :
  No obvious breakpoint between 1 and 8 . Longest stretch of difference is upstream of longest stretch of non-different.

2: In pseudotimeBreakpointByStretch(div.pseudotime, segment.1, segment.2,  :
  No obvious breakpoint between 1 and 9 . Longest stretch of difference is upstream of longest stretch of non-different.

3: In pseudotimeBreakpointByStretch(div.pseudotime, segment.1, segment.2,  :
  No obvious breakpoint between 8 and 10 . Longest stretch of difference is upstream of longest stretch of non-different.

4: In pseudotimeBreakpointByStretch(div.pseudotime, segment.1, segment.2,  :
  No obvious breakpoint between 3 and 15 . Longest stretch of difference is upstream of longest stretch of non-different.

5: In pseudotimeBreakpointByStretch(div.pseudotime, segment.1, segment.2,  :
  No obvious breakpoint between 11 and 15 . Longest stretch of difference is upstream of longest stretch of non-different.

6: In assignCellsToSegments(object, pseudotime, verbose) :
  245 cells were not visited by a branch that exists at their pseudotime and were not assigned.
7: In assignCellsToSegments(object, pseudotime, verbose) :
  245 cells were not visited by a branch that exists at their pseudotime and were not assigned.

image

My guess, based on warnings, is that some population is too different compared with others, and they are not able to share a common parent.

If my guess is right, is there any way to manually assign them or refine some parameters to makes them a complete tree?

farrellja commented 4 years ago

Hi @MichaelPeibo,

(1) It's normal for there to be some cells that don't get assigned by URD, though I'm not sure how much of your data 3.6k cells represents.

(2) Ending up with a max pseudotime of 0.6 means that cells are getting assigned pretty variable pseudotimes in each independent run. (Each flood simulation for pseudotime will assign cells a pseudotime of 0 – 1, but then after many independent simulations, each cells' pseudotime values are averaged to produce a final pseudotime.) This likely indicates that there is high connectivity across most of your data, which means there are many paths to each of your later stage cells, so the pseudotime they receive varies from simulation to simulation. Overall, looking at your pseudotime plot, I don't think you're having a huge issue here, though, as you have a nice spread of pseudotimes, and at least for those cell populations that are sufficiently different that they form independent groups on the tSNE, there's a nice pseudotime progression within them.

(3) I'm not sure why you're getting these crazy tree structures. My guess is that something is going wrong during the "Removing short segments" or "Removing singletons" steps. This is potentially (likely?) a bug in the software. As a quick check, you might try re-running buildTree(..., min.cells.per.segment = 1) or buildTree(..., min.cells.per.segment = 0). Normally after building the tree structure, URD clears out segments that have very few cells and reassigns the tree structure, and it looks to me like an error occurred during that process. It would be helpful to me to debug if you can share your object just prior to running buildTree with me by using saveRDS and Dropbox/Google Drive to transfer to me, so I can troubleshoot what's happening during buildTree.

(4) The warnings about "no obvious breakpoint" aren't necessarily cause for alarm. URD compares each segment pairwise, and sometimes for some pairs of segments (actually ones sometimes that are super different and never are walked by the opposing walks), it just doesn't make sense to compare them. They just issue that warning, don't get joined, and it usually resolves itself as segments are joined together (i.e. then as you get higher in the tree, the comparisons start to make sense). With this second set of parameters that you've run, URD is finding that you essentially have three starting points — there will be a trifurcation at pseudotime 0. Not sure whether that makes any sense given your data: [1] "Calculating divergence between 15 and 16 (Pseudotime 0 to 0.154)" Difference between 15 and 16 always TRUE -- setting breakpoint to beginning. [1] "Joining segments 11 and 16 at pseudotime 0 to create segment 17" [1] "Calculating divergence between 15 and 17 (Pseudotime 0 to 0)" Difference between 15 and 17 always TRUE -- setting breakpoint to beginning. [1] "Joining segments 15 and 17 at pseudotime 0 to create segment 18"

(5) We have populations that are extremely different in the zebrafish data (i.e. the EVL and PGCs) so URD should be able to handle it and build a tree that just has a bifurcation at pseudotime 0 at the very top. Not sure why this is not what you are receiving; likely a bug, as I mentioned.

Hope that helps & send that object over so I can take a look.

Best, Jeff

MichaelPeibo commented 4 years ago

Hi Dr Farrell @farrellja ,

Thanks for detailed reply!

I have shared the reproducible files via dropbox [here], (https://www.dropbox.com/sh/886bl822xlkf3u0/AAAWsIbxKnRwhjMJfjh4oVT_a?dl=0) and alarm you by your email

A bit of change, but the issue remains to be similar.

BTW, re-runningbuildTree(..., min.cells.per.segment = 1) or buildTree(..., min.cells.per.segment = 0) does not change the structure.

MichaelPeibo commented 4 years ago

Hi Dr @farrellja,

Any finding? Is this a bug or something wrong with my processed data?

Thanks!

zhou-ran commented 4 years ago

Hi, As Jeff said,

(5) We have populations that are extremely different in the zebrafish data (i.e. the EVL and PGCs) so URD should be able to handle it and build a tree that just has a bifurcation at pseudotime 0 at the very top. Not sure why this is not what you are receiving; likely a bug, as I mentioned.

When we process the simulation walks by buildTree, URD would split cells into segments and perform the k-s or preference test to set the breakpoint. Your root cells were not extremely different, and URD would not set the breakpoint and make the tree what you expected. I think this was not the bug in URD, the URD may be more suitable for the datasets which cell populations at root were extremely different.

Best, Ran

MichaelPeibo commented 4 years ago

@luguodexxx Hi Ran, Thanks for reply! I am not geting what you mean. You suggest URD is not suitable for differentiation in vitro, like my dataset? However, I have used URD for a small set of my data, which can be a norm tree, like figure below: image

However, when I input more data try to make a more complex tree, I just got the issue above.

farrellja commented 4 years ago

Hi @MichaelPeibo It looks like this is going to be a more complex one to troubleshoot. When I run the example code and data you gave me, I get a complete tree.

image

It's not a very complex branching structure, so I don't know whether your data doesn't extend back to when these cell types share a common progenitor, or whether the parameters aren't optimal, but, it seems that there is not an issue with your data or with URD's code itself that prevent the tree from building. What URD version / OS / and packages (sessionInfo()) are you running? It seems to work fine in the current debug version (1.1.0.9003) for me. If you re-run the code you shared with me, do you still get the messed up tree?

MichaelPeibo commented 4 years ago

Hi @farrellja, Really appreciate your help. I am using 1.1.0 version and when I re-run the code, I reproduced my error. Is there any way to use current version? I tried devtools but it ended up with 1.1.0 version

install_github(repo="farrellja/URD")
Skipping install of 'URD' from a github remote, the SHA1 (cb6d83fa) has not changed since last install.
   Use `force = TRUE` to force installation
> install_github(repo="farrellja/URD",force=TRUE)
Downloading GitHub repo farrellja/URD@master
Skipping 1 packages not available: destiny
✔  checking for file ‘/tmp/RtmpCUgFyi/remotes14e9f390ba94d/farrellja-URD-cb6d83f/DESCRIPTION’ ...
─  preparing ‘URD’:
✔  checking DESCRIPTION meta-information
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘URD_1.1.0.tar.gz’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-10-1.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-11-1.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-12-1.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-13-1.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-13-2.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-13-3.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-14-1.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-15-1.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-15-2.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-15-3.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-17-1.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-17-2.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-17-3.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-17-4.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-17-5.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-18-1.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-18-2.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-2-1.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-2-2.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-2-3.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-2-4.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-20-1.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-21-1.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-22-1.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-3-1.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-4-1.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-4-2.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-4-3.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-6-1.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-7-1.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-9-1.png’
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘URD/Analyses/SupplementaryAnalysis/URD-11-BatchModuleRemovalAndClusteringAnalysisOfSmartseqDataset.Rmd’

* installing *source* package ‘URD’ ...
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (URD)
>
>
> packageVersion('URD')
[1] ‘1.1.0’

Here is my sessionInfo()

> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-conda_cos6-linux-gnu (64-bit)
Running under: Ubuntu 16.04.3 LTS

Matrix products: default
BLAS/LAPACK: /home/xupb/anaconda3/envs/seuratv3/lib/R/lib/libRblas.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=zh_CN.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=zh_CN.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=zh_CN.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=zh_CN.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] URD_1.1.0     Matrix_1.2-17 ggplot2_3.2.1

loaded via a namespace (and not attached):
  [1] Rtsne_0.15                  colorspace_1.4-1
  [3] RcppEigen_0.3.3.5.0         class_7.3-15
  [5] rio_0.5.16                  XVector_0.22.0
  [7] GenomicRanges_1.34.0        proxy_0.4-23
  [9] farver_1.1.0                graphlayouts_0.5.0
 [11] ggrepel_0.8.1               ranger_0.11.2
 [13] robustbase_0.93-5           polyclip_1.10-0
 [15] zeallot_0.1.0               ggforce_0.3.1
 [17] compiler_3.5.1              backports_1.1.4
 [19] assertthat_0.2.1            lazyeval_0.2.2
 [21] tweenr_1.0.1                tools_3.5.1
 [23] igraph_1.2.4.1              gtable_0.3.0
 [25] glue_1.3.1                  GenomeInfoDbData_1.2.0
 [27] RANN_2.6.1                  reshape2_1.4.3
 [29] dplyr_0.8.3                 ggthemes_4.2.0
 [31] gmodels_2.18.1              Rcpp_1.0.2
 [33] carData_3.0-2               Biobase_2.42.0
 [35] cellranger_1.1.0            vctrs_0.2.0
 [37] gdata_2.18.0                ggraph_2.0.0
 [39] lmtest_0.9-37               laeken_0.5.0
 [41] stringr_1.4.0               openxlsx_4.1.0.1
 [43] gtools_3.8.1                DEoptimR_1.0-8
 [45] zlibbioc_1.28.0             MASS_7.3-51.4
 [47] zoo_1.8-6                   scales_1.0.0
 [49] tidygraph_1.1.2             VIM_4.8.0
 [51] hms_0.5.1                   parallel_3.5.1
 [53] SummarizedExperiment_1.12.0 RColorBrewer_1.1-2
 [55] curl_4.0                    gridExtra_2.3
 [57] stringi_1.4.3               S4Vectors_0.20.1
 [59] e1071_1.7-2                 destiny_2.12.0
 [61] TTR_0.23-4                  caTools_1.17.1.2
 [63] BiocGenerics_0.28.0         boot_1.3-23
 [65] zip_2.0.4                   BiocParallel_1.16.6
 [67] GenomeInfoDb_1.18.2         rlang_0.4.0
 [69] pkgconfig_2.0.2             matrixStats_0.54.0
 [71] bitops_1.0-6                lattice_0.20-38
 [73] ROCR_1.0-7                  purrr_0.3.2
 [75] labeling_0.3                tidyselect_0.2.5
 [77] plyr_1.8.4                  magrittr_1.5
 [79] R6_2.4.0                    IRanges_2.16.0
 [81] gplots_3.0.1.1              DelayedArray_0.8.0
 [83] pillar_1.4.2                haven_2.1.0
 [85] foreign_0.8-72              withr_2.1.2
 [87] xts_0.11-2                  scatterplot3d_0.3-41
 [89] abind_1.4-5                 RCurl_1.95-4.12
 [91] sp_1.3-1                    nnet_7.3-12
 [93] tibble_2.1.3                crayon_1.3.4
 [95] car_3.0-3                   KernSmooth_2.23-15
 [97] viridis_0.5.1               grid_3.5.1
 [99] readxl_1.3.1                minpack.lm_1.2-1
[101] data.table_1.12.2           forcats_0.4.0
[103] vcd_1.4-4                   digest_0.6.20
[105] diptest_0.75-7              tidyr_0.8.3
[107] stats4_3.5.1                munsell_0.5.0
[109] viridisLite_0.3.0           smoother_1.1
farrellja commented 4 years ago

Hi @MichaelPeibo

For future info, you can install the debug branch with the following command, which sometimes contains fixes that I'm still in the process of validating: devtools::install_github("farrellja/URD@debug")

However, the issue here is resulting from the ggraph package. The tree layout functions depend on igraph (which we have practically the same version) and ggraph (you have 2.0.0, I have 1.0.2). I just tried installing 2.0.0 and it breaks the tree layout for me as well. Downgrading back to 1.0.2 fixed it.

So, to get around this for now:

  1. Download the archived version 1.0.2 of ggraph from the CRAN archive (https://cran.r-project.org/src/contrib/Archive/ggraph/)
  2. Install it: install.packages("~/Downloads/ggraph_1.0.2.tar.gz", repos=NULL, type="source")
  3. Restart R & try again & hopefully celebrate.

I'll have to look into what's changed in the package to see why it breaks like that.

MichaelPeibo commented 4 years ago

@farrellja , Wow! It works! Now I keep enjoying URD! Many thanks!