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

visualize output #6

Open
violacimatti opened this issue Mar 18, 2024 · 1 comment
Open

visualize output #6

violacimatti opened this issue Mar 18, 2024 · 1 comment

Comments

@violacimatti
Copy link

Hi, I'm currently using Gosling in R and the following is my actual code:
`library(gosling)

data <- gos$bigwig(
url = "https://s3.amazonaws.com/gosling-lang.org/data/ExcitatoryNeurons-insertions_bin100_RIPnorm.bw",
column = "position",
value = "peak"
)

track <- gos$Track(data, height = 100)$mark_area()$encode(
x = gos$X("position:G"),
y = gos$Y("peak:Q"),
color= gos$value('blue')
)

track$view()`

If I take the output of track$view() and copy and paste it in a html, then when I open the html I can see the visualization and everything works.
However, I wanted to ask if there was a way, like some commands, to directly save the html output in an html file instead of having to copy and paste. Thank you.

@lee-t
Copy link

lee-t commented Apr 9, 2024

I want to piggyback off this issue. My question was how difficult it would be to be able to wrap Gos(ling) visualization outputs in a htmlwidget such that these visualizations would be easy to display in a Rmarkdown/Quarto document. If html code is the native output then in theory we could just embed it in a self-contained html quarto doc, but that doesn't work my testing ; it would be far easier for the outputs to produce a htmlwidget.

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