Skip to content

Coarse cool keeping bins() columns #392

Answered by nvictus
ddepierre asked this question in Q&A
Discussion options

You must be logged in to vote

I don't think cooler coarsen can do this for you.

Correct. We don't currently provide a way to coarsen bin columns, since there are many ways one could do it and in many cases it's not a good idea (e.g. like balancing weights).

For coverage it is straightforward to do manually and you can append the new column using the lower level h5py interface as @sergpolly suggested:

with clr.open("r+") as f:  # f is an h5py.Group
    f["bins/cov_cis_raw"] = data

or

with clr.open("r+") as f:
    f["bins"].create_dataset(name="cov_cis_raw", data=data, compression="gzip", compression_opts=6)

to also apply compression to the new column.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by nvictus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #338 on February 24, 2024 10:50.