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

Question: Can I display custom mouse-over gene descriptions? #62

Open
matrs opened this issue Apr 3, 2020 · 4 comments
Open

Question: Can I display custom mouse-over gene descriptions? #62

matrs opened this issue Apr 3, 2020 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@matrs
Copy link

matrs commented Apr 3, 2020

Hello,
lets say i have a set of genes from a non-model organism, but i do have gene annotations/descriptions. Can I use those? (without resorting to write javascript). I read the documentation and didn't find anything about it, so it seems i can't. I was thinking something like passing this annotation table/df to js and use that instead of retrieving data from the web could be a very useful option.

@cornhundred
Copy link
Contributor

Hi @matrs, thanks for the feature request. I think this feature overlaps with what we have planned here ismms-himc/clustergrammer-gl#25

I think the way we'll implement this for Clustergrammer2 is that we'll have a method for tooltip metadata (e.g. net.tooltip_metadata(axis='row', meta=df_meta)) where a user can input their own metadata (e.g. a Pandas DataFrame with columns like fullname and description). Then this information will be passed to the Clustergrammer-GL front-end and saved as part of the Widget JSON so that it will also work when embedded into a static HTML. Let us know what you think.

@cornhundred cornhundred self-assigned this Apr 3, 2020
@cornhundred cornhundred added the enhancement New feature or request label Apr 3, 2020
@matrs
Copy link
Author

matrs commented Apr 3, 2020

Well, it sounds great, specially the part about embedding it so it works with static html files.

@matrs
Copy link
Author

matrs commented Apr 7, 2020

Given that annotations potentially can have a lot of text, can be a secondary option to have that annotation as external file (maybe a compressed format) and link it from the html? can js read it from that file the way it "reads" it from the web or that would be too complicated in terms of its implementation? I'm thinking about responsiveness of the widget in cases where you embed a lot of text in the widget but i don't know if that plays a role in it.

@cornhundred
Copy link
Contributor

Hi @matrs, that makes sense to limit the amount of data embedded into the visualization JSON (we're going to be improving our JSON format soon which will make saving the data more efficient). The static HTML will not be able to load information from a file because of web security issues (I believe this falls under CORS requests).

The current mouseover information is being retrieved by the Harmonizome (http://amp.pharm.mssm.edu/Harmonizome/) API which allows CORS requests (e.g. front-end code can make a GET request).

One solution for this type of problem (e.g. hosting data that can be retrieved by front-end code) is to use GitHub to host the text and then load it from there using GET requests. We're doing something like this on this Observable notebook (https://observablehq.com/@ismms-himc/covid-19-sars-cov-2-preprints-from-medrxiv-and-biorxiv) and the repo we're making request from is here https://github.com/ismms-himc/covid-19_sinai_reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants