friedlanderlab / mirtrace

miRTrace
7 stars 7 forks source link

Can't execute programme, error with Java #10

Open jonoave opened 1 year ago

jonoave commented 1 year ago

Hello,

I'm having some trouble trying to execute the wrapper.

I installed mirtrace with mamba (similar to conda) on the cluster, which went fine.

micromamba install -c bioconda mirtrace 

However when I try to run it, I get the following error:

(test_trim_smrnaseq) bash-4.4$ mirtrace
Exception in thread "main" java.lang.NumberFormatException: For input string: "20-internal"
        at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
        at java.base/java.lang.Integer.parseInt(Integer.java:665)
        at java.base/java.lang.Integer.parseInt(Integer.java:781)
        at se.scilifelab.mirtrace.MiRTrace.testJVMVersionOK(MiRTrace.java:119)
        at se.scilifelab.mirtrace.MiRTrace.main(MiRTrace.java:104)

# Java version
(test_trim_smrnaseq) bash-4.4$ java -version
openjdk version "20-internal" 2023-03-21
OpenJDK Runtime Environment (build 20-internal-adhoc..src)
OpenJDK 64-Bit Server VM (build 20-internal-adhoc..src, mixed mode, sharing)

Here's the infomation on the OS of the cluster:

(test_trim_smrnaseq) bash-4.4$ cat /etc/os-release
NAME="Red Hat Enterprise Linux"
VERSION="8.6 (Ootpa)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="8.6"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Red Hat Enterprise Linux 8.6 (Ootpa)"

I also tried to install it in my Mac with mamba. Installation went fine, but I still encounter the following error:

(test_mirtrace) junhoe@ddo_evol scrna-denbi % mirtrace                                                               
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
    at se.scilifelab.mirtrace.MiRTrace.testJVMVersionOK(MiRTrace.java:120)
    at se.scilifelab.mirtrace.MiRTrace.main(MiRTrace.java:104)

(test_mirtrace) junhoe@ddo_evol scrna-denbi % java -version
openjdk version "20" 2023-03-21
OpenJDK Runtime Environment Zulu20.28+85-CA (build 20+36)
OpenJDK 64-Bit Server VM Zulu20.28+85-CA (build 20+36, mixed mode, sharing)

This was on MacOS Monterey version 12.6.8

Any idea on the cause of this error or how to resolve it? Thanks!

kubu4 commented 1 year ago

Also encountering this same error as @jonoave on Ubuntu 18.04LTS (haven't tested other OS's):

(test_trim_smrnaseq) bash-4.4$ mirtrace
Exception in thread "main" java.lang.NumberFormatException: For input string: "20-internal"
        at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
        at java.base/java.lang.Integer.parseInt(Integer.java:665)
        at java.base/java.lang.Integer.parseInt(Integer.java:781)
        at se.scilifelab.mirtrace.MiRTrace.testJVMVersionOK(MiRTrace.java:119)
        at se.scilifelab.mirtrace.MiRTrace.main(MiRTrace.java:104)

# Java version
(test_trim_smrnaseq) bash-4.4$ java -version
openjdk version "20-internal" 2023-03-21
OpenJDK Runtime Environment (build 20-internal-adhoc..src)
OpenJDK 64-Bit Server VM (build 20-internal-adhoc..src, mixed mode, sharing)
kubu4 commented 1 year ago

Ah! Figured it out! The solution is to not activate the conda environment.

Use mirtrace by calling the program directly!

jonoave commented 1 year ago

Hi @kubu4 , could you give a bit more details or example on how you got it to work?

If i do not turn on the micromamba environment, it won't even find the executing program.

junhoe@ddo_evol Mancuso_2019 % mirtrace
zsh: command not found: mirtrace

# use which mirtrace, and find the executing program
junhoe@ddo_evol Mancuso_2019 % /Users/junhoe/micromamba/envs/test_mirtrace/bin/mirtrace 
env: python: No such file or directory

Thanks in advance.

kubu4 commented 1 year ago

I think the issue you're currently having (env: python: No such file or directory) is related to your system not being able to find Python.

Activate the base conda environment (conda activate) and then try to run mirtrace:

/Users/junhoe/micromamba/envs/test_mirtrace/bin/mirtrace

This post on StackOverflow provides some more insight on how to resolve the problem, if the base conda environment doesn't fix thing...