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

ValueError: The matrix should be symmetric on .matrix files made with HiC-Pro #98

Open
Balthasar-eu opened this issue Nov 23, 2020 · 9 comments

Comments

@Balthasar-eu
Copy link

When I try to manually do ice normalization on matrix files from HiC-Pro ice fails with the following error:

Traceback (most recent call last):
  File "/home/balthasar/.local/bin/ice", line 95, in <module>
    counts, bias = iced.normalization.ICE_normalization(
  File "/home/balthasar/.local/lib/python3.8/site-packages/iced/normalization/__init__.py", line 66, in ICE_normalization
    is_symetric_or_tri(X)
  File "/home/balthasar/.local/lib/python3.8/site-packages/iced/utils/validation.py", line 13, in is_symetric_or_tri
    raise ValueError("The matrix should be symmetric")
ValueError: The matrix should be symmetric

The matrix file in question was made by downloading an allValidPairs file from Github and then building the matrix file with the build_matrix script from HiC-Pro.

When issuing the ice command like this:

ice output.matrix

The above error appears after a while.

@zhanglp996
Copy link

I also meet the problem,could you tell me how to solve the problem?
Thank you very much!

@NelleV
Copy link
Contributor

NelleV commented Dec 16, 2021

Hello,
which version of ice and numpy are you using? This may be due to numerical instabilities in the checks.
Cheers,
N

@zhanglp996
Copy link

Hello, which version of ice and numpy are you using? This may be due to numerical instabilities in the checks. Cheers, N

The numpy version is 1.21.1 and HiC-Pro is 3.0.0

@NelleV
Copy link
Contributor

NelleV commented Dec 16, 2021 via email

@zhanglp996
Copy link

zhanglp996 commented Dec 16, 2021 via email

@zhanglp996
Copy link

It is succcessful when I run ice with the matrix from hic-pro,but it fail when run with the other matrix file(ValueError:The matrix should be symmetric).I have checked the two matrix file format but do not find difference.

@NelleV
Copy link
Contributor

NelleV commented Dec 16, 2021

I think you've attached the files to the email: unfortunately, github doesn't support this. Can you plus upload them directly through the interface?
Many thanks,
Nelle

@zhanglp996
Copy link

I think you've attached the files to the email: unfortunately, github doesn't support this. Can you plus upload them directly through the interface? Many thanks, Nelle

Hello!
I have solved the problem.Use the commond 'awk '$1>$2{print $0}' matrixfile ' and I find there are some lines that first number bigger than second .When I delete those line,the ice work well.
Thanks for your help!

@Balthasar-eu
Copy link
Author

Balthasar-eu commented Dec 18, 2021

I am in holiday right now and don't have access to the computer I processed the files originally. I can check if that solves the issues in January. Also I see that I confused the the origin of the files in the original post. I did not download them from github, but GEO.

Just to clarify though, I did not solve the problem. Our own hic files were processed from fastq and the ice normalization in the pipeline worked without error, so we used outside input files that did not need ice normalization to avoid the problem.

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

3 participants