trackViewer icon indicating copy to clipboard operation
trackViewer copied to clipboard

heightDist does not work

Open h20gg702 opened this issue 1 year ago • 4 comments

Hi, I faced a problem that heightDist does not work when I used the following script. Do you know the solution? Thank you. A <- new('track', dat=DMR_gr, type='gene', name='DMR_anno') B <- new('track', dat=features, dat2=pop, type='gene', name='B') C2 <- importScore(file.path(bw.files1[1]), format="BigWig", ranges=gr) C1 <- importScore(file.path(bw.files4[1]), format="BigWig", ranges=gr) C2$dat2 <- C1$dat optSty <- optimizeStyle(trackList(A,B,C, heightDist = c(0.1, 1, 0.25)), theme="col") trackList <- optSty$tracks viewerStyle <- optSty$style vp <- viewTracks(trackList(A,B, C), gr=gr, viewerStyle=viewerStyle, operator="+")

h20gg702 avatar Feb 10 '24 06:02 h20gg702

Hi, I faced a problem that heightDist does not work when I used the following script. Do you know the solution? Thank you. A <- new('track', dat=DMR_gr, type='gene', name='DMR_anno') B <- new('track', dat=features, dat2=pop, type='gene', name='B') C2 <- importScore(file.path(bw.files1[1]), format="BigWig", ranges=gr) C1 <- importScore(file.path(bw.files4[1]), format="BigWig", ranges=gr) C2$dat2 <- C1$dat optSty <- optimizeStyle(trackList(A,B,C, heightDist = c(0.1, 1, 0.25)), theme="col") trackList <- optSty$tracks viewerStyle <- optSty$style vp <- viewTracks(trackList(A,B, C), gr=gr, viewerStyle=viewerStyle, operator="+")

Hi, I solved by vp <- viewTracks(trackList(A,B, C,, heightDist = c(0.1, 1, 0.25))), gr=gr, viewerStyle=viewerStyle, operator="+"), but my figures lacks y-axis number...

h20gg702 avatar Feb 11 '24 04:02 h20gg702

Nice to know you figured out it by yourself. You may want to check the documentation here first. If you still have trouble in get the y-axis please let me know.

jianhong avatar Feb 12 '24 13:02 jianhong

Maybe I should add the documentation like this: setTrackYaxisParam(trackList[[2]], 'label', TRUE)

jianhong avatar Feb 12 '24 13:02 jianhong

Thanks. It works well!

h20gg702 avatar Feb 13 '24 23:02 h20gg702