-
Notifications
You must be signed in to change notification settings - Fork 70
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
Cannot save asymmetric matrices #467
Comments
Thanks for reporting it. I will have a look at it asap. |
Hello everyone, after some debugging, I'm quite sure I found the bug. It's not in HicExplorer, but in hicmatrix/lib/cool.py, line 399 to 406. The problem here is that saving asymmetric matrices via My suggestion to resolve this issue is changing the call to cooler.create_cooler(cool_uri=pFileName,
bins=bins_data_frame,
pixels=matrix_data_frame,
mode=self.appendData,
dtypes=dtype_pixel,
ordered=True,
metadata=self.hic_metadata,
temp_dir=local_temp_dir, #up to here, same code as before
triucheck=pSymmetric, #inserted
symmetric_upper=pSymmetric) #inserted Cooler would actually set I tested the suggested patch by adding the upper triangular matrix of an arbitrary cooler matrix to the lower triangular matrix of another one, saving the resulting matrix in cooler format and plotting it. Seems to work for cooler format, but haven't tried for h5 format. Kind regards, |
Saving asymmetric matrices with hicMatrix.save(...) does not work when pSymmetric is set to False. Instead, an exception is thrown.
For the following example, hicexplorer 3.3.1 and 1000kb HMEC matrix from Rao et al. were used, the latter downloaded from ftp://cooler.csail.mit.edu/coolers/hg19/Rao2014-HMEC-MboI-allreps-filtered.1000kb.cool
This makes cooler throw the following exception:
Storing as h5 matrix doesn't work either:
Remarks:
The matrix used here probably is symmetric. Storing doesn't work with other, really asymmetric matrices either. Cooler version was 0.8.5.
I've also tried using hicexplorer 2.2, but the same exception is thrown (Cooler version was 0.8.5, too).
The text was updated successfully, but these errors were encountered: