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

calculate-cnv: Invalid interval bounds! #1

Closed
sidiropoulos opened this issue Jun 8, 2021 · 3 comments
Closed

calculate-cnv: Invalid interval bounds! #1

sidiropoulos opened this issue Jun 8, 2021 · 3 comments

Comments

@sidiropoulos
Copy link

Thank you for this very promising and much needed tool for cancer 3D genomics. I'm trying to run calculate-cnv
on a 10kb cool matrix I created with hic2cool and I get the following error.

calculate-cnv --hic inter_30.10kb.cool -g hg38 -e MboI --output inter_30.10kb.cnv

# ARGUMENT LIST:
# Cool URI = inter_30.10kb.raw.cool
# Reference Genome = hg38
# Enzyme = MboI
# Output Path = cnv_test
# Cache Folder = ./
# Log file name = cnv-calculation.log
root                      INFO    @ 06/07/21 15:32:56: Calculate the 1D coverage from Hi-C matrix ...
root                      INFO    @ 06/07/21 15:33:28: Load GC content ...
Traceback (most recent call last):
  File "/home/projects/cu_10027/apps/software/miniconda3/4.5.4/envs/neoloop/bin/calculate-cnv", line 128, in run
    table = runcnv.signal_from_bigwig(table, gc_fil, name='GC')
  File "/home/projects/cu_10027/apps/software/miniconda3/4.5.4/envs/neoloop/lib/python3.7/site-packages/neoloop/cnv/runcnv.py", line 50, in signal_from_bigwig
    v = bw.stats(row['chrom'], row['start'], row['end'], type='mean')[0]
RuntimeError: Invalid interval bounds!

Do you have any idea of what could be causing the error?

Thanks,
Nikos

@XiaoTaoWang
Copy link
Owner

Hi Nikos,

Thank you very much for this feedback! I think the reason might be that the chromosome names in your cool file do not have the prefix "chr", which was considered as "Invalid" when the program was trying to extract the GC/mappability content from the pre-calculated bigwig files.

I will make the program compatible with hic2cool in the next version for sure. But for now, could you run the script "https://raw.githubusercontent.com/XiaoTaoWang/NeoLoopFinder/master/scripts/add_prefix_to_cool.py" on your cool files before calculate-cnv (python add_prefix_to_cool.py inter_30.10kb.raw.cool), and let me know whether it works?

Thanks,
Xiaotao

@sidiropoulos
Copy link
Author

Hi Xiaotao,

Thank you for the very prompt reply. The fix you proposed worked and I could run calculate-cnv successfully!
Looking forward to using the full toolkit.

Thanks,
Nikos

@XiaoTaoWang
Copy link
Owner

Great, thanks!

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

2 participants