Closed daler closed 11 years ago
These are really great additions. I think the next phase it to be able to call the GUI from the CL and have it work for a single or multiple plots. Thoughts? Also, it would be great to have know the chrom/start/end while hovering over a cell (that is, without clicking). It's really neat to see have a working GUI example using MPL. Makes what was once nebulous much more concrete. Hopefully, I'll get some time over the next couple of days to play with this.
Yeah, I was thinking that there could be a lot of config options -- fig size, which files to use, colormaps, matrix dimensions, how many subplots and which subplots get which files, etc etc. Passing them in as CL args would get tedious, so maybe a YAML config file with user-defined styles would help. Then something like
scurgen gui --config myconfig.yaml a.bed b.bed
would plot a.bed and b.bed according to all sorts of info found in myconfig.yaml. Similar to the pybedtools plotting style mechanism. Of course we could supply a default one so CL usage would be even easier.
It's possible the hovering thing could be done with a FuncFormatter for tick labels, otherwise it might need to connect to the mouse_notify_event to get this to work. I can play around with it.
I see your point. My preference would be to have all of the options available on the command line, but also support YAML config files.
Changes to hilbert.py:
So now, the original data is always accessed via the .matrix attribute, and the currently-masked version via .masked. Initially, the currently-masked version is identical to the original matrix and only changes when mask_low_values() is called.
The bulk of the changes is the new matplotlib GUI (in plotting.py). Also included are a couple of tests: one for the xy2d/d2xy consistency and one for the matrix masking.