hdng / clonevol

Inferring and visualizing clonal evolution in multi-sample cancer sequencing
GNU General Public License v3.0
141 stars 45 forks source link

tree plot error2 #10

Closed xtmgah closed 7 years ago

xtmgah commented 7 years ago

Hello:

I am using the plot.tree.clone.as.branch function to generate the tree. But i found there is no tree generated if the branches like this:

tree_data %>% select(lab,parent,branches) lab parent branches 1 1 13 021 2 2 14 0221 3 3 14 0222 10 10 -1 Y 5 5 16 01221 6 6 16 01222 7 7 15 0121 8 8 11 0111 9 9 11 0112 11 11 12 011 12 12 17 01 13 13 17 02 14 14 13 022 15 15 12 012 16 16 15 0122 17 17 10 0

plot.tree.clone.as.branch(tree_data,angle = 30,node.size =0,branch.text.size = 0.5,text.angle = 0,node.text.size = 1,branch.width=0.5) Error in x0[i] <- x1[which(x$branches == parent)] : replacement has length zero

Could you let me know how to fix this? ??

Here is the data frame of tree_data. tree_data.RData.zip

hdng commented 7 years ago

Looks like your tree has many branches. I've recently updated the tree package to handle more branches. Could you update it and see if the problem still persists?

devtools::install_github('hdng/trees')

xtmgah commented 7 years ago

Thanks for your reply. I try both old one and new one in your GitHub. Both is not working. The same error. If I combine branch 'Y' and '0' to a new '0', it working.

On Aug 1, 2017 at 5:36 PM, <Ha X. Dang (mailto:notifications@github.com)> wrote:

Looks like your tree has many branches. I've recently updated the tree package to handle more branches. Could you update it and see if the problem still persists?

devtools::install_github('hdng/trees')

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub (https://github.com/hdng/clonevol/issues/10#issuecomment-319504213), or mute the thread (https://github.com/notifications/unsubscribe-auth/AECjdPo7KSaZQ-twP7U0zCtwevdLct9eks5sT5pTgaJpZM4OqUU8).

xtmgah commented 7 years ago

So, the original node 'Y' is the outroot and '0' is first node... i guess this is the reason the code failed?

On Aug 1, 2017 at 5:36 PM, <Ha X. Dang (mailto:notifications@github.com)> wrote:

Looks like your tree has many branches. I've recently updated the tree package to handle more branches. Could you update it and see if the problem still persists?

devtools::install_github('hdng/trees')

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub (https://github.com/hdng/clonevol/issues/10#issuecomment-319504213), or mute the thread (https://github.com/notifications/unsubscribe-auth/AECjdPo7KSaZQ-twP7U0zCtwevdLct9eks5sT5pTgaJpZM4OqUU8).

xtmgah commented 7 years ago

Could you help to fix this? Thanks.

xtmgah commented 7 years ago

I just try to put the "Y" in the first row and it totally working... So i think the program default need the "Y" trunk in the first row....