KO
|
EN
gitlite — search
Search
#typescript
#ai-agents
#ai
#dsh-plugin
#deepseek-harness
#open-source
#claude-code
#codex
#cli
#developer-tools
#react
#windows
grosling
★ 38
Open GitHub ↗
R interface to 'Gos'
Download README (.md)
Explore Similar Repositories
chromoscope
:
Interactive multiscale visualization for structural variation in human genomes
vitessce-python
:
Python API and Jupyter widget for Vitessce
higlass-python
:
Python bindings to and Jupyter Notebook+Lab integration for the HiGlass viewer
3d-genome-processing-tutorial
:
A 3D genome data processing tutorial for ISMB/ECCB 2017
clodius
:
Clodius is a tool for breaking up large data sets into smaller tiles that can subsequently be displayed using an appropriate viewer.
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
grosling
?
Download (.md)
<!-- README.md is generated from README.Rmd. Please edit that file --> **Here be dragons** 🐉 # g(r)osling <!-- badges: start --> <!-- badges: end --> The goal of **g(r)osling** is to help you build interactive genomics visualizations with [Gosling](https://github.com/gosling-lang/gosling.js). This package uses [reticulate](https://rstudio.github.io/reticulate/) to provide an interface to the [Gos](https://github.com/gosling-lang/gos) Python package. ## Example ``` r 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_point()$encode( x = gos$X("position:G"), y = gos$Y("peak:Q") ) track$view() ```  ## Installation You can install the development version of gosling like so: ``` r devtools::install_github("gosling-lang/grosling") ``` Because of Python, there may be some additional installation steps. 1.) Python must be installed on your system. We recommend `conda`. 2.) Create a conda environment called `"r-reticulate"`. It is [recommended](https://rstudio.github.io/reticulate/articles/python_packages.html) to use this environment name for all packages that use reticulate. 3.) Install Gos into your `"r-reticulate"` environment using `gosling::install_gosling()`. You may wish to add a line like this to the `.First()` function in your `.Rprofile`: ``` r reticulate::use_condaenv("r-reticulate") ``` The `use_condaenv()` function is called to provide a hint to reticulate on which Python environment to use. ## Local Data Gos [transparently serves](https://gosling-lang.github.io/gos/user_guide/local_data.html) local and in-memory datasets for the Gosling client via a background data server. This feature is enabled automatically whenever a local file path is detected (rather than a URL). Due to [a temporary limitation with `reticulate`](https://github.com/rstudio/reticulate/issues/515#issuecomment-1196609327), some additional setup is required to enable this feature in **grosling**. Hopefully this will be resolved in `reticulate` soon, but the current workaround is shown below. ``` r library(gosling) ### Setup reticulate to continually yield R <> Python. You only need to run this *once*. local({ reticulate::py_run_string("from time import sleep") py_yield_and_register_next_yield <- function() { reticulate::py_eval("sleep(0.001)") later::later(py_yield_and_register_next_yield, .001) invisible() } later::later(py_yield_and_register_next_yield) }) ### file <- "./ExcitatoryNeurons-insertions_bin100_RIPnorm.bw" # local file data <- gos$bigwig(file, column = "position", value = "peak") track <- gos$Track(data, height = 100, width = 750)$mark_bar()$encode( x = gos$X("position:G"), y = gos$Y("peak:Q"), color = gos$Color("peak:Q") ) track$view() ``` 