patches to bioheatmap

88 views
Skip to first unread message

Matthew Pocock

unread,
Jan 27, 2011, 4:59:58 AM1/27/11
to systemsbiology...@googlegroups.com

Hi,


I was wondering what the process was for submitting patches back to the bioheatmap javascript code. I work as a free-lance developer, and have a potential client who is interested in adapting bioheatmap to display tooltips when the mouse hovers over a cell for long enough. This seems like generally useful functionality, and as your code is covered under lGPL, I would prefer to push any modifications made back to you.


Thanks,


Matthew

hrovira

unread,
Jan 27, 2011, 4:02:05 PM1/27/11
to systemsbiology...@googlegroups.com
Hi Matthew,

I have given you access to our SVN repository and would gladly accept your contribution.  You can check-in your code into the 1.0.1 branch here; please document your changes in the wiki.  You may also request a code review to make this change part of the trunk.

Let me know if you have any questions, and thanks again!

Hector Rovira
Software Architect
Institute for Systems Biology
Seattle WA

Fengyuan Hu

unread,
Jan 27, 2011, 4:07:08 PM1/27/11
to Matthew Pocock, systemsbiology...@googlegroups.com
Hi Matthew,

We currently integrate bioheatmap in our system, it is fantastic! it would be even better if you can implement the mouseover action.

Thanks!
Fengyuan
--
Fengyuan Hu
Bioinformatics software developer
modENCODE
Cambridge Systems Biology Centre & Department of Genetics
Tennis Court Road
Cambridge
CB2 1QR
UK

Matthew Pocock

unread,
Jan 27, 2011, 5:38:06 PM1/27/11
to Fengyuan Hu, systemsbiology...@googlegroups.com
Thank you for the svn access. I will let you know either way if I get the go-ahead to do this work.

Matthew

Matthew Pocock

unread,
Feb 1, 2011, 9:36:00 AM2/1/11
to Fengyuan Hu, systemsbiology...@googlegroups.com
Hi,

I've committed code to the 1.0.1 branch that on my machine (and I hope for everyone else) implements tooltips. I've documented what I did, as I did it, at:


Only a small amount of the js code has been touched. I had to re-write  _getMouseXY, as on all browsers I tried it on, it was giving insane numbers. Other than that, it's been a fairly orthogonal change.

There is an additional css file to hold the tooltip default styling - bioHeatMap.css. This should be included in any html that uses bioheatmap.js - perhaps someone can make this a bit more automated. If you want a different style, then use normal CSS tricks to over-ride it page-wide, or pass in a different css class name in the draw options to over-ride it for a single heat map. The css uses one of the html5 properties to add rounded corners to the tooltip. In my chrome, this looks as expected. In my firefox, I get the legacy square-cornered border. No harm done.

I've modified bioheatmap_examples.html so that a) the random heat map has tooltips for every cell, numbering the cell and giving the level and b) there's a tiny 4-cell heat map with two tooltipped cells (single and multi-line), one cell with no tooltip, and one cell with an empty tooltip. You can check if it's working for you by just putting your mouse over the cells and waiting a half second.

I'm not tied to any of the names used for configuration, styles and so on. If there are better or more consistent names, then I'll be happy to change them.

I'd really appreciate it if someone could check through what I've written. Javascript isn't my main language, and I've had to learn the google APIs as I went, so that code review you offered would be great.

Thanks,

Matthew

Hector Rovira

unread,
Feb 2, 2011, 5:19:23 PM2/2/11
to Matthew Pocock, Fengyuan Hu, systemsbiology...@googlegroups.com
Hi Matthew,

This is very cool!

I deployed it here so anyone can test it: 

There is a "Request Code Review" feature on the google code site, you can submit a request and others can comment on it.  I did take a quick look and everything looks pretty good.

Thank you for submitting and documenting this so promptly!

Hector

Matthew Pocock

unread,
Feb 3, 2011, 5:03:58 AM2/3/11
to Hector Rovira, Fengyuan Hu, systemsbiology...@googlegroups.com
I've requested the code review. Fingers crossed.
--
Matthew Pocock
(0191) 2566550

Matthew Pocock

unread,
Feb 18, 2011, 4:43:43 AM2/18/11
to Hector Rovira, Fengyuan Hu, systemsbiology...@googlegroups.com
Hi,

All the code for tooltips is in the repository. Unless there are any issues with it that you would like me to fix, I'll be giving back the keys to our repository.

Thanks for allowing me to contribute these changes.
Reply all
Reply to author
Forward
0 new messages