Skip to content

Commit

Permalink
Add padding between junction arcs to avoid overlapping - #11
Browse files Browse the repository at this point in the history
  • Loading branch information
emi80 committed Jul 16, 2020
1 parent 4bc5982 commit f195773
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sashimi-plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,8 @@ def colorize(d, p, color_factor):
# Find intron midpoint
xmid = round(mean(j[1:2]), 1)
ymid = max(j[3:4]) * 1.2
ypad = 0.2*(j[2]-j[1])/(max(d[,x])-min(d[,x]))
ymid = max(j[3:4]) * (1 + ypad)
# Thickness of the arch
lwd = scale_lwd(j[5]/j_tot_counts)
Expand All @@ -825,7 +826,7 @@ def colorize(d, p, color_factor):
# Choose position of the arch (top or bottom)
nss = i
if (nss%%%%2 == 0) { #bottom
ymid = -0.3 * maxheight
ymid = -(0.2 + ypad) * maxheight
# Draw the arcs
# Left
curve = xsplineGrob(x=c(0, 0, 1, 1), y=c(1, 0, 0, 0), shape=1, gp=curve_par)
Expand Down

0 comments on commit f195773

Please sign in to comment.