Transpose bins 1 and 2#105
Conversation
There was a problem hiding this comment.
Looks reasonable. If it's not too hard, this could be a good chance to introduce tests, but maybe if there were problems, they would be obvious enough?
There is a travis failure:
ERROR: Failure: ImportError (this version of pandas is incompatible with numpy < 1.13.3
your numpy version is 1.13.1.
Please upgrade numpy to >= 1.13.3 to use this pandas version)
numpy is unpinned, so I'm not sure why it's not getting the more recent version it wants.
|
|
||
| mats[filepath] = [f, info] | ||
|
|
||
| info['mirror_tiles'] = 'false' |
There was a problem hiding this comment.
This is the one line that is neither a coordinate swap nor a whitespace tweak... It is what you intend?
There was a problem hiding this comment.
Nope. I forced no mirroring for debugging purposes. Good catch!
There was a problem hiding this comment.
The problem now is that the client performs "mirroring" by copying lower triangle pixels to the upper triangle, so the result is a white heatmap with pixels painted only on the main diagonal.
Description
What was changed in this pull request?
Swap the way clodius populates coordinates for tiles, such that bin1 is rows and bin2 is cols.
Why is it necessary?
Bins 1 and 2 have been getting mapped to the horizontal (columns) and vertical (rows) axes in HiGlass, respectively, which is the opposite of the matrix convention (first axis vertical and second being horizontal). This had no impact at all on symmetric heatmaps but does affect new asymmetric ones. See higlass/higlass#704.
While we can introduce an option to transpose the axes on the front end, we should alter the default to be the least surprising choice given the orientation of HiGlass's axes (bin1 = matrix i = vertical from top-to-bottom; bin2 = matrix j = horizontal from left-to-right; origin in the top left corner).
This will probably also require swapping the direction tile "mirroring" works on the client.
Checklist