Question about convert.consensus.tree.clone.to.branch error
Hello
I am trying to use clonevol in my data, I have been succeed in the function infer.clonal.models , then I faced some errors when I used the function convert.consensus.tree.clone.to.branch , the following is the error messages.
Error in
$<-.data.frame(*tmp*, "samples.with.nonzero.cell.frac", value = character(0)) : replacement has 0 rows, data has 4
The following is my command (sorry for the bad layout )
library(clonevol) loci11<- read.table("02844190/02844190_c1_2.tsv",header = TRUE) loci13<-loci11[which(loci11$cluster!='NA'),] colnames(loci13)[3]<-"variant_allele_frequency" vaf.col.names<- "P" loci13["P"]<-loci13$variant_allele_frequency
y = infer.clonal.models(variants = loci13, cluster.col.name = 'cluster', vaf.col.names = vaf.col.names, # sample.groups = sample.groups, subclonal.test = 'bootstrap', subclonal.test.model = 'non-parametric', num.boots = 1000, founding.cluster = '1', cluster.center = 'mean', ignore.clusters = NULL, clone.colors = clone.colors, min.cluster.vaf = 0.01, sum.p = 0.05, alpha = 0.05)
y <- convert.consensus.tree.clone.to.branch(y, branch.scale = "sqrt")
plot.clonal.models(y, # box plot parameters # box.plot = TRUE, # fancy.boxplot = FALSE, # fancy.variant.boxplot.highlight = 'is.driver', # fancy.variant.boxplot.highlight.shape = 21, # fancy.variant.boxplot.highlight.fill.color = 'red', # fancy.variant.boxplot.highlight.color = 'black', # fancy.variant.boxplot.highlight.note.col.name = 'gene', # fancy.variant.boxplot.highlight.note.color = 'blue', # fancy.variant.boxplot.highlight.note.size = 2, # fancy.variant.boxplot.jitter.alpha = 1, # fancy.variant.boxplot.jitter.center.color = 'grey50', # fancy.variant.boxplot.base_size = 12, # fancy.variant.boxplot.plot.margin = 1, # fancy.variant.boxplot.vaf.suffix = '.VAF', # bell plot parameters clone.shape = 'bell', bell.event = TRUE, bell.event.label.color = 'blue', bell.event.label.angle = 60, clone.time.step.scale = 1, bell.curve.step = 2, # node-based consensus tree parameters merged.tree.plot = TRUE, tree.node.label.split.character = NULL, tree.node.shape = 'circle', tree.node.size = 30, tree.node.text.size = 0.5, merged.tree.node.size.scale = 1.25, merged.tree.node.text.size.scale = 2.5, merged.tree.cell.frac.ci = FALSE, # branch-based consensus tree parameters merged.tree.clone.as.branch = TRUE, mtcab.event.sep.char = ',', mtcab.branch.text.size = 1, mtcab.branch.width = 0.75, mtcab.node.size = 3, mtcab.node.label.size = 1, mtcab.node.text.size = 1.5, # cellular population parameters cell.plot = TRUE, num.cells = 100, cell.border.size = 0.25, cell.border.color = 'black', clone.grouping = 'horizontal', #meta-parameters scale.monoclonal.cell.frac = TRUE, show.score = FALSE, cell.frac.ci = TRUE, disable.cell.frac = FALSE, # output figure parameters out.dir = '02844190_1', out.format = 'pdf', overwrite.output = TRUE, width = 8, height = 4, # vector of width scales for each panel from left to right panel.widths = c(4,1,3,1))
My data: 02844190.zip
Can you help me to find out why it failed? Many thanks.
This is a known bug when only one sample is provided. I am working on a fix. In the meanwhile, you can try to add a fake sample identical to the one you have, eg.
loci13$P2 = loci13$P vaf.col.names = c('P', 'P2')
and rerun. The output consensus tree should be the same, except for node annotation that includes P and P2 instead of only P. Just ignore P2.
Thank you for your reply. I hope you can fix the bug smoothly. ^.^
hi, i have the same error when one sample is provided, i want to know if the bug has been fixed? thank you!
Hi, i just tried the ClonEvol tutorial with only P sample (instead of P and R samples) and get the same bug still. Is there any new version available? Thanks!
Hi, i just tried the ClonEvol tutorial with only P sample (instead of P and R samples) and get the same bug still. Is there any new version available? Thanks!
vaf.col.names<- c("P","R") You should copy the vaf of P to R