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

error: File doesn't have the given chr_chr map. #132

Open
charlottewright opened this issue Jan 23, 2024 · 0 comments
Open

error: File doesn't have the given chr_chr map. #132

charlottewright opened this issue Jan 23, 2024 · 0 comments

Comments

@charlottewright
Copy link

Hello,

When I run straw('KR', hic_file, 'LR994552.1', 'LR994551.1','BP', res)) on a .hic file generated by yahs, the command runs fine.

However, when I try it on a .hic file which was converted from a cool file I am getting an error:

row, col, data = map(np.array, straw('KR', hic_file, 'LR994552.1', 'LR994551.1','BP', res))
File doesn't have the given chr_chr map.  

I don't think that chromosome names are the issue because when I try using the wrong chromosome names, I get a different error:

row, col, data = map(np.array, straw('KR', hic_file, '1.1', '1.1','BP', res))
One of the chromosomes wasn't found in the file. Check that the chromosome name matches the genome.

I've also tried replacing all chromosome names in both the matrix and chr_sizes file before generating the .hic file e.g. 'chr1', 'chr2' and '1','2' and then using these in the straw command. I've also tried sorting the chr_sizes file (in both directions) before generating the .hic file.

The hic file which is giving this error was generated from a cool file which was transformed like so:
hicTransform --matrix run1.40000.cool --outFileName run1.40000.pearson_correlation.cool --method pearson

..and then turned into a .hic file like so:

python3 cool2hic.py -i run1.40000.pearson_correlation.cool -r 40000 # generates 'matrix.txt'
 java -jar -Xmx100G ~/software/juicer_tools/juicer_tools_1.22.01.jar pre -r 40000 -d matrix.txt run1.40000.pearson_correlation.hic chrSizes.tsv 

This method comes from https://www.biostars.org/p/360254/. The hic file loads fine in juicebox so it isn't corrupted.

I'm using hic-straw==1.3.1 installed like so python3 -m pip install hic-straw.

Any help in getting straw to read this hic file or alternative ways to obtain a hic file would be greatly appreciated.

Many thanks,

Charlotte

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

1 participant