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

Choosing matrix normalization method for .cool files #441

Open
rikrdo89 opened this issue Mar 19, 2023 · 2 comments
Open

Choosing matrix normalization method for .cool files #441

rikrdo89 opened this issue Mar 19, 2023 · 2 comments

Comments

@rikrdo89
Copy link

For cool files that have values for different types of matrix normalization (KR, VC, VC_SQRT, etc), is there a way to specify which normalization values to use? I tried /path/to/file.cool::/resolutions/5000::/bins/KR but that didn't workl...

resolutions
     ├── 5000
     │   ├── bins
     │   │   ├── KR (617665,) float64
     │   │   ├── VC (617665,) float64
     │   │   ├── VC_SQRT (617665,) float64
     │   │   ├── chrom (617665,) int32
     │   │   ├── end (617665,) int32
     │   │   ├── start (617665,) int32
     │   │   └── weight (617665,) float64
     │   ├── chroms
     │   │   ├── length (24,) int32
     │   │   └── name (24,) |S64
     │   ├── indexes
     │   │   ├── bin1_offset (617666,) int64
     │   │   └── chrom_offset (25,) int64
     │   └── pixels
     │       ├── bin1_id (495409844,) int64
     │       ├── bin2_id (495409844,) int64
     │       └── count (495409844,) int32

@lldelisle
Copy link
Collaborator

Hi,
This is a good idea of enhancement (but needs to modify the package we depends on: HiCMatrix). For the moment, we do not support it so you need to use hicConvertFormat to extract the values with the normalization you want. You need to pay attention to the argument --correction_division depending where your matrix comes from. If you need help with this, I can help you.

@rikrdo89
Copy link
Author

Thank you @lldelisle. I am back working with HiC matrices, and I would appreciate if you could share an example on how to extract the KR normalized values for plotting the matrix with pygenometracks.

I started with a .hic file from HiC-Pro; and then converted it to .cool using hicConvertFormat -m "$myHic" --resolutions 5000 --inputFormat hic --outputFormat cool -o "cool/${myHic/.hic/.cool}". When looking at the metadata using hiInfo, I see that the cool file contains KR ,VC, and VC_SQRT normalization values.

What would be the next step to properly get a cool file with the KR values?

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

No branches or pull requests

2 participants