HiNT
HiNT copied to clipboard
KeyError: 'chrom' using your docker for 'hint tl' with cooler input
Hi, I tried to use your docker on coolers files:
$ hint tl -m out/wtg2nolabelfc1_1000kb.cool,out/wtg2nolabelfc1_100kb.cool --chimeric out/wtg2nolabelfc1_chimeric.sorted.pairsam.gz --refdir data/hg19_SNPs --backdir backgroundMatrices/hg19 --ppath /miniconda3/bin/pairix -f cooler -g hg19 -n test -o out_tl_new
[15:48:22] Argument List:
[15:48:22] Hi-C contact matrix = out/wtg2nolabelfc1_1000kb.cool, out/wtg2nolabelfc1_100kb.cool
[15:48:22] Hi-C contact matrix format = cooler
[15:48:22] Hi-C chimeric read pairs = out/wtg2nolabelfc1_chimeric.sorted.pairsam.gz
[15:48:22] Genome = hg19
[15:48:22] Name = test
[15:48:22] Output directory = out_tl_new
[15:48:22] Prepare Matrices!
Traceback (most recent call last):
File "/miniconda3/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 2657, in get_loc
return self._engine.get_loc(key)
File "pandas/_libs/index.pyx", line 108, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 129, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index_class_helper.pxi", line 91, in pandas._libs.index.Int64Engine._check_type
KeyError: 'chrom'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/miniconda3/bin/hint", line 201, in <module>
main()
File "/miniconda3/bin/hint", line 197, in main
translrun(argparser)
File "/miniconda3/lib/python3.6/site-packages/HiNT/runhint.py", line 108, in translrun
matrix1MbInfo = coolToMatrix(matrixfile1Mb,1000,opts.outdir,opts.name)
File "/miniconda3/lib/python3.6/site-packages/HiNT/coolToMatrix.py", line 30, in coolToMatrix
binsInfo = getBins(coolfile)
File "/miniconda3/lib/python3.6/site-packages/HiNT/coolToMatrix.py", line 9, in getBins
idxarray = np.where(coolfile.bins()["chrom"][:] == chrom)
File "/miniconda3/lib/python3.6/site-packages/cooler/core.py", line 532, in __getitem__
return self._slice(self.fields, lo, hi)
File "/miniconda3/lib/python3.6/site-packages/cooler/api.py", line 246, in _slice
return bins(grp, lo, hi, fields, **kwargs)
File "/miniconda3/lib/python3.6/site-packages/cooler/api.py", line 448, in bins
is_integer_dtype(out['chrom'].dtype)
File "/miniconda3/lib/python3.6/site-packages/pandas/core/series.py", line 868, in __getitem__
result = self.index.get_value(self, key)
File "/miniconda3/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 4360, in get_value
iloc = self.get_loc(key)
File "/miniconda3/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 2659, in get_loc
return self._engine.get_loc(self._maybe_cast_indexer(key))
File "pandas/_libs/index.pyx", line 108, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 129, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index_class_helper.pxi", line 91, in pandas._libs.index.Int64Engine._check_type
KeyError: 'chrom'
This happens with existing coolers and with coolers generated by your 'hint pre' pipeline.