freestatman / ideogRam

R htmlwidget package for ideogram.js
https://freestatman.github.io/ideogRam/
16 stars 4 forks source link

happy to help #1

Open timelyportfolio opened 6 years ago

timelyportfolio commented 6 years ago

I have been tracking ideogram for a while now but lacked the domain expertise to know how to make it useful. Please let me know if I can help on the JavaScript/widget side, and I'll happily contribute. Thanks for putting this together.

eweitz commented 6 years ago

@timelyportfolio, I am preparing a release with "framework examples" to demonstrate how to integrate Ideogram with popular platforms. My work so far has focused on JavaScript frameworks like Angular, React, and Vue.

I'm considering making a "shiny" example in eweitz/ideogram that consists of a README linking to this repo. So if you are facile with R and JavaScript, any near-term contributions of yours integrating Ideogram in R would be well-timed.

timelyportfolio commented 6 years ago

@eweitz, I have done a lot with R and JavaScript (jsinr and buildingwidgets). I have also worked extensively in Shiny and Vue and have played in React, so I hope I can help. Maybe, my bl.ocks can help us with some ideas. I just know nothing about chromosomes.

eweitz commented 6 years ago

@timelyportfolio, my top wish for Ideogram and R is to have an R library that wraps the Ideogram API. Giving R users a seamless way to use Ideogram would be awesome. Freeman's repo here is a good start. If you're wondering how to help with Ideogram and R, I'd start with his TODO list.

If you feel more like using Ideogram with Vue or another JS framework, that would be helpful too! You could try re-implementing a few examples from http://eweitz.github.io/ideogram/ in your bl.ocks. My current framework examples merely reproduce http://eweitz.github.io/ideogram/human, and probably not in an idiomatic manner.

freestatman commented 6 years ago

Hi @eweitz and @timelyportfolio ,

Sorry for my delayed progress on this repo, I own a lot for implementing ideogram.js features into this htmlwidget R package, I will plan more time for this side project... @eweitz what's the timeline of your presentation?

Thanks to @timelyportfolio (one of the top R/htmlwidget experts I have been following) for contributing to this effort! This ideogRam package is just barely getting started, so all major changes are very welcome and even feel free to takeover the development. I have both genetic and R/shiny knowledge, and much less in JS. But I'm willing to continue contributing to this work if it helps.

I will revisit this side project this weekend:

eweitz commented 6 years ago

@eweitz what's the timeline of your presentation?

@wangtulao, I don't have any presentations scheduled, but I will likely merge my work on JavaScript framework examples into the eweitz/ideogram master branch this weekend. I don't see the upcoming Ideogram release as dependent on work in R.

So continued development of this repo and any contributions from @timelyportfolio would be wonderful, and no deadlines loom!

Marlin-Na commented 6 years ago

Hi, @eweitz @wangtulao and @timelyportfolio ,

Thanks for the work on ideogram.js and this R interface. I am just looking into this package and I am very interested in this, too. If possible, I hope to contribute to it as well. And here are some of my primitive thoughts on the R interface:

First, I think it is valuable to integrate the R wrapper with existing bioconductor packages which provide data structure representing genomic ranges and sources for many annotation data. I also think that most of the users who might be interested in this package would use the bioconductor infrastructure.

One minor question is that, the api reference of ideogram.js says:

dataDir

String. Optional. Default: "../data/bands/native/".
Absolute or relative URL of the directory containing data needed to draw banded chromosomes. 
Example in GeneExpressionAging/ideogram.

It seems that ideogram.js use either builtin data or use a path to the needed data to draw the bands, is it possible have an interface to supply the data with a JSON object? The advantage would be that we can use the data source from R (e.g. the cytoband data retrieved via the AnnotationHub package) without saving the data into disk.

Second, when using the package in shiny, I think it would be extremely valuable to have the ability to return the brushed range (or clicked chromosome, clicked band, etc.) with callback function to R side, for interacting with other htmlwidgets components. I am not sure how to do it, but there are existing example in the DT package, see https://yihui.shinyapps.io/DT-info/ .

For example, with the R-JS interactivity, we can show the genomic features use TnT on the selected chromosome or brushed range in a shiny app. Then the ideogram will serve as an overview of chromosomes and the TnT genome browser will allow exploration of genome in the selected range.

Finally, how do you think about shaping this package as a project idea of GSoC 2018? In that case, we might find a student contributing to this R interface during the summer of 2018. For example, I worked on the TnT package which wraps the TnT javascript library during GSoC 2017.

eweitz commented 6 years ago

Hello @Marlin-Na!

It seems that ideogram.js use either builtin data or use a path to the needed data to draw the bands, is it possible have an interface to supply the data with a JSON object? The advantage would be that we can use the data source from R (e.g. the cytoband data retrieved via the AnnotationHub package) without saving the data into disk.

That's possible, but would incur significant engineering cost without clear benefit.

By supplying an absolute URL to the dataDir option, you can request native Ideogram cytoband data from a fast, reliable, and free external host. Simply set dataDir to e.g. https://unpkg.com/ideogram@0.13.0/dist/data/bands/native/, and you can fetch any Ideogram cytoband data without saving to disk.

A ton of engineering has gone into Ideogram's backend cytoband data pipeline. It pulls in all available cytoband data from NCBI, Ensembl, UCSC and other parties and normalizes their different formats and interfaces into one. I'm unaware of a more comprehensive source of cytoband data.

I think it would be extremely valuable to have the ability to return the brushed range (or clicked chromosome, clicked band, etc.) with callback function to R side, for interacting with other htmlwidgets components.

Agreed. View source in Ideogram's brush example to see how to use onBrushMove to get brush range. Similar event handlers for chromosome clicks would be easy for me to implement in the Ideogram API.

Finally, how do you think about shaping this package as a project idea of GSoC 2018? In that case, we might find a student contributing to this R interface during the summer of 2018.

I like the idea!

freestatman commented 6 years ago

Thanks for the interests to all! If you have the time, could you take a look at issue #2 and #3, @timelyportfolio and @Marlin-Na ?

Thanks,

Marlin-Na commented 6 years ago

Thanks for your clear answer! @eweitz The data in ideogram.js is indeed comprehensive, thanks for the work! It makes sense to utilize that data in the R wrapper.

For GSoC, I will draft a project idea at https://github.com/rstats-gsoc/gsoc2018/wiki/table-of-proposed-coding-projects later, maybe next week. Besides @eweitz , are @timelyportfolio @wangtulao interested to serve as potential mentors?

Marlin-Na commented 6 years ago

Hi @eweitz and @wangtulao ,

I have proposed a project idea for GSoC 2018 at https://github.com/rstats-gsoc/gsoc2018/wiki/Interactive-Ideogram-Visualization, would you check it, and if any, provide some suggestions?

Also if you are willing to mentor, could you add your contact info (email) to the mentor section?

Thanks!

eweitz commented 6 years ago

@Marlin-Na, thanks for writing that proposal! I added my email address and made some minor edits.

freestatman commented 6 years ago

@Marlin-Na Thanks for the nice work and proposal! Sorry I just saw them. Looking forward to replicate more Eric's cool ideogram examples in this R package. Thanks.