aidenlab / juicer

A One-Click System for Analyzing Loop-Resolution Hi-C Experiments
http://aidenlab.org
MIT License
410 stars 181 forks source link

juicer_tools NullPointerException at zoom FRAG_20 #233

Closed esebesty closed 3 years ago

esebesty commented 3 years ago

I'm trying to convert HiC-Pro result matrices to Juicebox format, using the hicpro2juicebox.sh script, available here.

However, I'm getting a NullPointerException.

Error message ``` HiC-Pro format > 2.7.5 detected ... Generating Juicebox input files ... Running Juicebox ... WARN [2021-07-27T19:02:37,145] [Globals.java:138] [main] Development mode is enabled Using 1 CPU thread(s) Start preprocess Writing header Writing body ...................................................................................................................................................................................................................................................................................................................................... Writing footer nBytesV5: 1893810 masterIndexPosition: 706792378 Finished preprocess Calculating norms for zoom BP_2500000 Calculating norms for zoom BP_1000000 Calculating norms for zoom BP_500000 Calculating norms for zoom BP_250000 Calculating norms for zoom BP_100000 Calculating norms for zoom BP_50000 Calculating norms for zoom BP_25000 Calculating norms for zoom BP_10000 Calculating norms for zoom BP_5000 Calculating norms for zoom BP_1000 Calculating norms for zoom FRAG_500 Calculating norms for zoom FRAG_200 Calculating norms for zoom FRAG_100 Calculating norms for zoom FRAG_50 Calculating norms for zoom FRAG_20java.lang.NullPointerException at juicebox.data.iterator.ListOfListIterator.hasNext(ListOfListIterator.java:45) at juicebox.data.iterator.IteratorContainer.getNumberOfContactRecords(IteratorContainer.java:51) at juicebox.data.iterator.ListOfListIteratorContainer.getIsThereEnoughMemoryForNormCalculation(ListOfListIteratorContainer.java:52) at juicebox.tools.utils.norm.NormalizationCalculations.(NormalizationCalculations.java:59) at juicebox.tools.utils.norm.NormalizationVectorUpdater.updateHicFile(NormalizationVectorUpdater.java:178) at juicebox.tools.clt.old.AddNorm.launch(AddNorm.java:87) at juicebox.tools.clt.old.PreProcessing.run(PreProcessing.java:170) at juicebox.tools.HiCTools.main(HiCTools.java:94) done ! ```

and I end up with a partial .hic file. Opened an issue in the HiC-Pro repo, but this might be a more relevant place.

The exact command line I'm using:

~/work/repos/bcro/bit-bio/hicpro-install/HiC-Pro/bin/utils/hicpro2juicebox.sh -i dataset.allValidPairs -g ~/work/repos/bcro/bit-bio/hicpro-install/HiC-Pro/annotation/chrom_hg19.sizes -j ~/work/repos/bcro/bit-bio/juicebox/juicer_tools.2.10.01.jar -r ~/work/repos/bcro/bit-bio/hicpro-install/HiC-Pro/annotation/HindIII_resfrag_hg19.bed

Software versions

sa501428 commented 3 years ago

Can you try building without the restriction fragment file?

Also, the latest 2.x jar has some things that could break when used with other tools. If building without the fragment file doesn't work, you could try using the latest 1.x jar.

esebesty commented 3 years ago

Works without the restriction fragment file, thanks!