chrisamiller / fishplot

Create timecourse "fish plots" that show changes in the clonal architecture of tumors
Other
164 stars 46 forks source link

Parental ordering matters #5

Closed chrisamiller closed 5 years ago

chrisamiller commented 7 years ago

Not completely sure why yet, but the following data induces an error in the layout engine:

library(fishplot)
timepoints=c(0,50,532,632);
parents=c(0, 5, 2, 1, 1);
frac.table = matrix(
     c(84, 0.5, 0.25, 35, 36,
       5, 0.5, 0.25, 0.15, 1,
       5, 0.5, 0.25, 0.15, 1,
       85, 80, 40, 0.15, 83), 
     ncol = length(timepoints)
)
fish = createFishObject(frac.table,parents,timepoints=timepoints)
fish = layoutClones(fish)
fishPlot(fish,shape="spline",title.btm="Sample1")

But the following reordering of the clones works fine:

timepoints=c(0,50,532,632);
parents=c(0, 1, 1, 2, 4);
frac.table = matrix(
      5,  1,  0.15, 0.5, 0.25,
      5,  1,  0.15, 0.5, 0.25,
    ncol = length(timepoints)
)
fish = createFishObject(frac.table,parents,timepoints=timepoints)
fish = layoutClones(fish)
fishPlot(fish,shape="spline",title.btm="Sample1")
kulvait commented 7 years ago

I think my rejected pull request solve this.

chrisamiller commented 5 years ago

Resolved via @kulvait's PR!