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

Create tiles from hdf5 image data #23

Open
mccalluc opened this issue Apr 12, 2019 · 1 comment
Open

Create tiles from hdf5 image data #23

mccalluc opened this issue Apr 12, 2019 · 1 comment

Comments

@mccalluc
Copy link
Collaborator

mccalluc commented Apr 12, 2019

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

pete [1 month ago]

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])

pete [1 month ago]

https://github.com/higlass/higlass-python

pete [12:33 PM]

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.

@manzt
Copy link
Member

manzt commented Feb 25, 2020

This is essentially what we do now with ImgHdf5Reader.to_zarr + tile_zarr_base.py

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

No branches or pull requests

2 participants