ay-lab / fithic

Fit-Hi-C is a tool for assigning statistical confidence estimates to chromosomal contact maps produced by genome-wide genome architecture assays such as Hi-C.
MIT License
77 stars 16 forks source link

FitHic crashes #43

Open joachimwolff opened 3 years ago

joachimwolff commented 3 years ago

Hi,

I try to detect loops with FitHic, I installed the tool via bioconda.

First, I converted a cooler file to hicpro and the required bed file, next, I used your script HiCPro2FitHiC (which is actually not part of the bioconda installation... maybe that should be included?) to transform the data to FitHic compatible input.

However, I run now FitHic with:

fithic -i hmec_100kb/fithic.interactionCounts.gz -f hmec_100kb/fithic.fragmentMappability.gz -o hmec_100kb/ -r 100000

but get a crash:

GIVEN FIT-HI-C ARGUMENTS
=========================
Reading fragments file from: hmec_100kb/fithic.fragmentMappability.gz
Reading interactions file from: hmec_100kb/fithic.interactionCounts.gz
Output path being used from hmec_100kb/
Fixed size option detected... Fast version of FitHiC will be used
Resolution is 100.0 kb
No bias file
The number of spline passes is 1
The number of bins is 100
The number of reads required to consider an interaction is 1
The name of the library for outputted files will be FitHiC
Upper Distance threshold is inf
Lower Distance threshold is 0
Only intra-chromosomal regions will be analyzed
Lower bound of bias values is 0.5
Upper bound of bias values is 2
All arguments processed. Running FitHiC now...
=========================

Reading the contact counts file to generate bins...
Interactions file read. Time took 244.58135843276978
Traceback (most recent call last):
  File "/home/wolffj/miniconda3/envs/fithic2/bin/fithic", line 10, in <module>
    sys.exit(main())
  File "/home/wolffj/miniconda3/envs/fithic2/lib/python3.6/site-packages/fithic/fithic.py", line 310, in main
    (binStats,noOfFrags, maxPossibleGenomicDist, possibleIntraInRangeCount, possibleInterAllCount, interChrProb, baselineIntraChrProb)= generate_FragPairs(binStats, fragsFile, resolution)
  File "/home/wolffj/miniconda3/envs/fithic2/lib/python3.6/site-packages/fithic/fithic.py", line 542, in generate_FragPairs
    maxFrags[ch]=max([int(i)-resolution/2 for i in allFragsDic[ch]])
ValueError: max() arg is an empty sequence

Do you have any idea what I need to do to get it running?

Thanks a lot,

Joachim

ay-lab commented 3 years ago

Please see issue #39