aidenlab / juicer

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

[Juicer 2.0] Exception in thread "main" java.lang.RuntimeException: Unknown command: statistics #255

Closed Zojka closed 2 years ago

Zojka commented 2 years ago

Hi, I'm using Juicer 2.0 on Ubuntu 18.04. I've used the same command to analyze identical datasets with Juicer 1.6 and Juicer 2.0 Juicer 1.6 finished without issues, but I got those results from Juicer 2.0:

The command (with paths reducted): /opt/juicer/scripts/juicer.sh -g hg38 -s none -p [path]/reference/GRCh38_EBV.chrom.sizes.tsv -z [path]/reference/GCA_000001405.15_GRCh38_no_alt_analysis_set.fna -D /opt/juicer/ -t 92 -d [sample]

[main] Real time: 6784.211 sec; CPU: 610804.131 sec
(-:  Align of [sample]/splits/sample_pooled.fastq.gz.sam done successfully
[bam_sort_core] merging from 460 files and 92 in-memory blocks...
(-: Finished sorting all sorted files into a single merge.
(-:  Mark duplicates done successfully
awk: fatal: can't open source file `/opt/juicer//scripts/stats_sub.awk' for reading (No such file or directory)
Picked up _JAVA_OPTIONS: -Xmx1024m -Xms1024m
Exception in thread "main" java.lang.RuntimeException: Unknown command: statistics
        at juicebox.tools.HiCTools.main(HiCTools.java:98)
Picked up _JAVA_OPTIONS: -Xmx1024m -Xms1024m
Exception in thread "main" java.lang.RuntimeException: Unknown command: statistics
        at juicebox.tools.HiCTools.main(HiCTools.java:98)
Picked up _JAVA_OPTIONS: -Xmx150000m -Xms150000m
Not including fragment map
Error while reading graphs file: java.io.FileNotFoundException: [sample]/aligned/inter_hists.m (No such file or directory)
Start preprocess
Writing header
Writing body
..............................................................................................................................................................................................................................................
.......................................................................................
Writing footer

Finished preprocess
Done creating .hic file. Normalization not calculated due to -n flag.
To run normalization, run: juicebox addNorm <hicfile>

real    36m57.120s
user    38m25.987s
sys     7m10.443s
Picked up _JAVA_OPTIONS: -Xmx150000m -Xms150000m

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_2000  
Calculating norms for zoom BP_1000  
Calculating norms for zoom BP_500   
Calculating norms for zoom BP_200   
Calculating norms for zoom BP_100java.lang.ArrayIndexOutOfBoundsException: Index 167 out of bounds for length 167
        at juicebox.tools.utils.original.NormalizationCalculations.computeVC(NormalizationCalculations.java:319)
        at juicebox.tools.utils.original.NormalizationVectorUpdater.updateHicFile(NormalizationVectorUpdater.java:161)
        at juicebox.tools.clt.old.AddNorm.run(AddNorm.java:84)
        at juicebox.tools.HiCTools.main(HiCTools.java:96)

I suspect that I might be missing some libraries. Could you help?

sa501428 commented 2 years ago

Which folder are you running from? (CPU/LSF/SLURM/etc)

Mrhuangc commented 2 years ago

I have the same problem as you and hope it can be solved!!!

Mrhuangc commented 2 years ago

I think I may have found a solution to this problem.Once I put the latest version of juicer_tools into the CPU/common folder, the problem was solved.Newer juicer_tools releases are posted under Github Releases in the Juicebox repo. https://github.com/aidenlab/Juicebox/releases You can click "v2.13.07" to download latest juicer_tools.

Zojka commented 2 years ago

@sa501428 I'm using the CPU version.

@Mrhuangc good idea! I was using the one from the wiki.

sa501428 commented 2 years ago

Juicer2 is still under development, so we do appreciate all the reports from you all. Note that the last stable release for 1.6 is available under Github Releases. I'll add a clearer explanation of this to the main README.

Regarding the bugs: 1 - yes, the Exception in thread "main" java.lang.RuntimeException: Unknown command: statistics at juicebox.tools.HiCTools.main(HiCTools.java:98) error comes from using an old Juicer Tools jar 2 - awk: fatal: can't open source file/opt/juicer//scripts/stats_sub.awk' for reading (No such file or directory)` suggests that the stats_sub.awk file is missing; I will fix this under the CPU repo.

sa501428 commented 2 years ago

Actually the stats_sub.awk file does seem to be in the CPU/commons folder; can you check that the repo was cloned correctly?

Zojka commented 2 years ago

Hi, the file is present. The issue is that Juicer is looking in /opt/juicer//scripts/ and not /opt/juicer//scripts/common I will download the new version and let you know.

sa501428 commented 2 years ago

Ah yes, you are correct. I just pushed a fix. Thanks!!

sa501428 commented 2 years ago

@Zojka are all the bugs in this issue resolved / can we close it?