Open mccalluc opened 5 years ago
Copied from Slack:
pete [12:29 PM]
Check out clodius/tiles/mrmatrix.py also check out this file: https://github.com/higlass/clodius/blob/pkerpedjiev/tsv-to-mrmatrix/scripts/tsv-to-mrmatrix.py it’s brand new but I used it on a 87K x 87K matrix
pete [12:33 PM]
it loads a dense matrix as a tsv file into an hdf5 file and then creates a data pyramid
pete [1 month ago]
you should be able to test it out using higlass-python
import higlass import higlass.client as hgc import higlass.tilesets as hgti f = h5py.File('../blah.h5', 'r') ts1 = hgti.mmatrix('../blah.h5') tr1 = hgc.Track('heatmap', position='center', height=400, tileset=ts1) view1 = hgc.View([tr1]) (display, server, viewconf) = higlass.display([view1])
https://github.com/higlass/higlass-python
in particular take a look at the coarsen function which takes an hdf5 array and creates the downsampled layers the 120 lines of code should be pretty straightforward. Let me know if you have any issues.
coarsen
This is essentially what we do now with ImgHdf5Reader.to_zarr + tile_zarr_base.py
ImgHdf5Reader.to_zarr
tile_zarr_base.py
Copied from Slack:
pete [12:29 PM]
pete [12:33 PM]
pete [1 month ago]
pete [1 month ago]
pete [1 month ago]
pete [12:33 PM]