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

Visualization of Splicing Events #6

Open
timbitz opened this issue Apr 3, 2016 · 2 comments
Open

Visualization of Splicing Events #6

timbitz opened this issue Apr 3, 2016 · 2 comments

Comments

@timbitz
Copy link
Owner

timbitz commented Apr 3, 2016

It would be nice to integrate a visualization tool like sashimi plots or write a fast version

@timbitz
Copy link
Owner Author

timbitz commented Jun 2, 2017

+1 for fast version in Julia!

Some backend like this using Gadfly might be possible>>

using Gadfly

function make_arc( xmin, xmax, ymin, ymax, upright::Bool=true )
    seq = 0:0.0001:pi
    xseq = seq ./ pi
    xseq = xseq .* (xmax - xmin)
    xseq = xseq .+ xmin
    seq = upright ? seq : seq .- pi
    yseq = sin(seq) .* (ymax - ymin)
    yseq = yseq .+ ymin
    xseq, yseq
end

make_box( xmin, xmax, ymin, ymax ) = [xmin, xmin, xmax, xmax], [ymin, ymax, ymax, ymin] 

xtop, ytop     = make_arc( 1.0, 4.0, 1.5, 2.5 )
xleft, yleft   = make_arc( 1.0, 2.0, 0.5, 1.0, false )
xright, yright = make_arc( 3.0, 4.0, 0.5, 1.0, false )

xex1, yex1 = make_box( 0.0, 1.0, 0.5, 1.5 )
xex2, yex2 = make_box( 2.0, 3.0, 0.5, 1.5 )
xex3, yex3 = make_box( 4.0, 5.0, 0.5, 1.5 )

polygon_theme = Theme(default_color=colorant"gray75", discrete_highlight_color=x->colorant"black")

plot(layer(x=xtop, y=ytop, Geom.path, Theme(default_color=colorant"black", line_width=1mm)), 
                   layer(x=xleft, y=yleft, Geom.path),
                   layer(x=xright, y=yright, Geom.path), 
                   layer(x=xex1, y=yex1, Geom.polygon(fill=true), polygon_theme),
                   layer(x=xex2, y=yex2, Geom.polygon(fill=true), polygon_theme),
                   layer(x=xex3, y=yex3, Geom.polygon(fill=true), polygon_theme),
                   Coord.cartesian( ymin=0.0, ymax=4.0, xmin=0.0, xmax=5.0), Theme(default_color=colorant"black"))

@harpur, I can add a new branch, or we can make a new repository?

@harpur
Copy link
Collaborator

harpur commented Jun 2, 2017 via email

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

No branches or pull requests

2 participants