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

Unable to access juicer_tools.jar #2

Open
aakashsur opened this issue Jan 15, 2021 · 8 comments
Open

Unable to access juicer_tools.jar #2

aakashsur opened this issue Jan 15, 2021 · 8 comments

Comments

@aakashsur
Copy link

I get this error -

Error: Unable to access jarfile /opt/scripts/common/juicer_tools.jar

When trying to run the docker image through singularity, here's the full error -

[main] Version: 0.7.17-r1188
[main] CMD: bwa mem -SP5M -t 40 /juicedir/yeast_100x.contigs.fasta /data/splits/yeast_R1.fastq.gz /data/splits/yeast_R2.fastq.gz
[main] Real time: 11.350 sec; CPU: 141.117 sec
(-:  Align of /data/splits/yeast.fastq.gz.sam done successfully
(-: Finished sorting all sorted files into a single merge.
Picked up _JAVA_OPTIONS: -Xmx16384m
Error: Unable to access jarfile /opt/scripts/common/juicer_tools.jar
Picked up _JAVA_OPTIONS: -Xmx16384m
Error: Unable to access jarfile /opt/scripts/common/juicer_tools.jar
***! Can't find inter.hic in /data/aligned/inter_30.hic
***! Error! Either inter.hic or inter_30.hic were not created
Either inter.hic or inter_30.hic were not created.  Check /data/aligned for results
@charlotte-west
Copy link

I'm also having a similar issue. When run using Singularity:

singularity shell docker://aidenlab/juicer:latest

I'm able to access juicer.sh, but I want to use arrowhead and hiccups from juicer tools which I believe is accessed through the /opt/scripts/common/juicer_tools.jar file which points to /opt/scripts/common/juicer_tools.1.7.6_jcuda.0.8.jar. However juicer_tools.1.7.6_jcuda.0.8.jar has read only rights (-rw------- 1 root root 31M Oct 27 2017 juicer_tools.1.7.6_jcuda.0.8.jar) :

Singularity> /opt/scripts/common/juicer_tools.1.7.6_jcuda.0.8.jar
bash: /opt/scripts/common/juicer_tools.1.7.6_jcuda.0.8.jar: Permission denied

@charlotte-west
Copy link

charlotte-west commented Apr 7, 2021

I've made a work-around that seems to be working for me. I believe it's to do with Singularity's permissions. In the docker image the juicer_tools.jar does not have general read/write/execute permissions. I built my own docker container, the Dockerfile is very simple:

FROM aidenlab/juicer:1.0.13

# Add executability to juicer tools file
RUN chmod 777 /opt/juicer-1.6.2/CPU/common/juicer_tools.1.7.6_jcuda.0.8.jar

# Remove entrypoint
ENTRYPOINT []

I add all permissions to the file that juicer_tools.jar points to. I removed the entrypoint for debugging purposes. I built the docker file:

docker build -f ./Dockerfile -t my/container:latest .

And run it up using singularity. Once the container is spun up:

Singularity> java -Xms512m -Xmx2048m -jar juicer_tools.1.7.6_jcuda.0.8.jar
Juicer Tools Version 1.7.6
Usage:
	dump <observed/oe> <NONE/VC/VC_SQRT/KR> <hicFile(s)> <chr1>[:x1:x2] <chr2>[:y1:y2] <BP/FRAG> <binsize> [outfile]
	dump <norm/expected> <NONE/VC/VC_SQRT/KR> <hicFile(s)> <chr> <BP/FRAG> <binsize> [outfile]
	dump <loops/domains> <hicFile URL> [outfile]
	pre [options] <infile> <outfile> <genomeID>
	addNorm <input_HiC_file>
	pearsons [-p] <NONE/VC/VC_SQRT/KR> <hicFile(s)> <chr> <BP/FRAG> <binsize> [outfile]
	eigenvector -p <NONE/VC/VC_SQRT/KR> <hicFile(s)> <chr> <BP/FRAG> <binsize> [outfile]
	apa <hicFile(s)> <PeaksFile> <SaveFolder>
	arrowhead <hicFile(s)> <output_file>
	hiccups <hicFile> <outputDirectory>
	hiccupsdiff <firstHicFile> <secondHicFile> <firstLoopList> <secondLoopList> <outputDirectory>
	validate <hicFile>
	-h, --help print help
	-v, --verbose verbose mode
	-V, --version print version
Type juicer_tools <commandName> for more detailed usage instructions

works as expected.

@nchernia
Copy link
Collaborator

nchernia commented Apr 7, 2021 via email

@trum994
Copy link

trum994 commented Aug 17, 2021

I'm also running into the exact same issue while running with Singularity:

[main] Real time: 609.011 sec; CPU: 1911.661 sec
(-: Align of /data/splits/HIC003_S2_L001_001.fastq.gz.sam done successfully
(-: Finished sorting all sorted files into a single merge.
Picked up _JAVA_OPTIONS: -Xmx16384m
> Error: Unable to access jarfile /opt/scripts/common/juicer_tools.jar
Picked up _JAVA_OPTIONS: -Xmx16384m
> Error: Unable to access jarfile /opt/scripts/common/juicer_tools.jar
***! Can't find inter.hic in /data/aligned/inter_30.hic
***! Error! Either inter.hic or inter_30.hic were not created
Either inter.hic or inter_30.hic were not created. Check /data/aligned for results

I'll have to try workaround from @charlotte-west

@apredeus
Copy link

Yep, same issue still.

@adthrasher
Copy link

+1 for this issue.

@icmeyer
Copy link

icmeyer commented Feb 11, 2025

This is still an issue. Went ahead with the same fix as @charlotte-west. I built the container locally using Docker and then pushed to docker hub. I ran into another issue with the scripts path (similar to aidenlab/juicer#352 (comment)). Was able to fix that using the -D flag. That lets me call the singularity image like so

#!/bin/bash
# Run juicer using the Docker container using singularity
singularity exec -B ./testdir/:/data \
                 -B ./testdir/:/juicerdir \
                 docker://icmeyer/juicer_tools /opt/scripts/juicer.sh \
                 -d /data \
                 -D  /opt/ \
                 ...

Works well for me, because sometimes I want to use juicer tools instead and they can be accessed in the same image.

@SomePersonSomeWhereInTheWorld
Copy link

SomePersonSomeWhereInTheWorld commented Feb 27, 2025

This is still an issue. Went ahead with the same fix as @charlotte-west. I built the container locally using Docker and then pushed to docker hub. I ran into another issue with the scripts path (similar to aidenlab/juicer#352 (comment)). Was able to fix that using the -D flag. That lets me call the singularity image like so

#!/bin/bash
# Run juicer using the Docker container using singularity
singularity exec -B ./testdir/:/data \
                 -B ./testdir/:/juicerdir \
                 docker://icmeyer/juicer_tools /opt/scripts/juicer.sh \
                 -d /data \
                 -D  /opt/ \
                 ...

Works well for me, because sometimes I want to use juicer tools instead and they can be accessed in the same image.

Thanks I got further with your container, albeit I get this error:


ARROWHEAD:

Picked up _JAVA_OPTIONS: -Xmx16384m
Reading file: /data/aligned/inter_30.hic
Warning: Hi-C map is too sparse to find many domains via Arrowhead.
Exiting. To disable sparsity check, use the --ignore_sparsity flag.

HiCCUPS:

GPUs are not installed so HiCCUPs cannot be run

(-: Postprocessing successfully completed, maps too sparse to annotate or GPUs unavailable (-:
/opt/scripts/common/check.sh: line 47: [: users: integer expression expected
(-: Pipeline successfully completed (-:
Run cleanup.sh to remove the splits directory
Check /data/aligned for results

Edit: it appears this is a bug in 1.x versions of Juicer for CPU. No fix mentioned anywhere.

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

8 participants