Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding clones IDs + child clone emerging outside parent clone #40

Open
LayalYasin opened this issue Dec 21, 2023 · 1 comment
Open

adding clones IDs + child clone emerging outside parent clone #40

LayalYasin opened this issue Dec 21, 2023 · 1 comment

Comments

@LayalYasin
Copy link

Good after noon !
I have three questions please

is it possible to edit some code/parameters to fix this issue when you have a child clone originating outside its parent clone, like this picture:
Screenshot 2023-12-20 at 14 26 00

Now in this second image you see for clones (two above and two below, and probably some hidden clones) starting to emerge at this timepoints, is it possible that we have all those emerging clones starting on the same vertical line ? if not, based on what is the starting point of those emerging clones chosen ?
Screenshot 2023-12-20 at 14 26 11

Finally, could we have IDs before the start of each clone ? to be able to differentiate them ?
Screenshot 2023-12-20 at 14 26 19

thanks a lot for your support !

@chrisamiller
Copy link
Owner

is it possible to edit some code/parameters to fix this issue when you have a child clone originating outside its parent clone, like this picture:

This sort of thing can often be fixed by adding additional "fake" timepoints to help shape the graph the way you'd like it to be.

Now in this second image you see for clones (two above and two below, and probably some hidden clones) starting to emerge at this timepoints, is it possible that we have all those emerging clones starting on the same vertical line ? if not, based on what is the starting point of those emerging clones chosen ?

How far back the point extends is based, in part, on the pad.left parameter given to the drawClust* commands (see draw.R). With bezier curves, there's always some "slop" from having to make the curves look smooth. If you draw polygons with no padding instead, it may ameliorate this issue, to some extent, especially if you play with the ramp.angle parameter.

Finally, could we have IDs before the start of each clone ? to be able to differentiate them ?

You can label the clones by providing the clone.annots parameter to the createFishObject function. Example that modifies the example code from the front page:

    library(fishplot)
    timepoints=c(0,30,75,150)      

    #provide a matrix with the fraction of each population
    #present at each timepoint
    frac.table = matrix(
      c(100, 45, 00, 00,
         02, 00, 00, 00,
         02, 00, 02, 01,
         98, 00, 95, 40),
      ncol=length(timepoints))

    #provide a vector listing each clone's parent
    #(0 indicates no parent)
    parents = c(0,1,1,3)

    #create a fish object 
    fish = createFishObject(frac.table,parents,timepoints=timepoints, clone.annots=c("A","B","C","D"), clone.annots.cex=0.8)

    #calculate the layout of the drawing
    fish = layoutClones(fish)

    #draw the plot, using the splining method (recommended)
    #and providing both timepoints to label and a plot title
    fishPlot(fish,shape="spline",title.btm="Sample1",
             cex.title=0.5, vlines=c(0,150), 
             vlab=c("day 0","day 150"))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants