-
Notifications
You must be signed in to change notification settings - Fork 17
Installation running errors
If you face this when running nextflow, you need to have proper a java installed.
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: nextflow/cli/Launcher has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:621)
which is related to java version
$ java -version
openjdk version "1.8.0_372"
OpenJDK Runtime Environment (build 1.8.0_372-b07)
OpenJDK 64-Bit Server VM (build 25.372-b07, mixed mode)
Nextflow (and FastOMA) needs version 11.
You can install openjdk using conda (openjdk is the free version of java).
conda install conda-forge::openjdk
then you will have
$ java -version
openjdk version "11.0.13" 2021-10-19
OpenJDK Runtime Environment JBR-11.0.13.7-1751.21-jcef (build 11.0.13+7-b1751.21)
OpenJDK 64-Bit Server VM JBR-11.0.13.7-1751.21-jcef (build 11.0.13+7-b1751.21, mixed mode)
If it still shows you the other java previously had been installed on your system, you probably need to add the path
JAVA_HOME="/path/to/jdk-17"
NXF_JAVA_HOME="/path/to/jdk-17"
export PATH="/path/to/jdk-17/bin:$PATH"
or
JAVA_CMD="$(which java)"
Traceback (most recent call last):
File " software/miniconda/envs/f4/bin/fastoma-collect-subhogs", line 8, in <module>
sys.exit(fastoma_collect_subhogs())
File " software/miniconda/envs/f4/lib/python3.8/site-packages/FastOMA/collect_subhogs.py", line 140, in fastoma_collect_subhogs
write_hog_orthoxml(conf_collect_subhogs.pickle_folder, conf_collect_subhogs.out, conf_collect_subhogs.gene_id_pickle_file,
File " software/miniconda/envs/f4/lib/python3.8/site-packages/FastOMA/collect_subhogs.py", line 194, in write_hog_orthoxml
ET.indent(orthoxml_file, space=' ', level=0)
AttributeError: module 'xml.etree.ElementTree' has no attribute 'indent'
Probably you are using python 3.8. Try python 3.9!
Traceback (most recent call last):
File "/work/FAC/FBM/DBC/cdessim2/default/smajidi1/software/miniconda/envs/f39p/bin/omamer", line 8, in <module>
sys.exit(main())
File "/work/FAC/FBM/DBC/cdessim2/default/smajidi1/software/miniconda/envs/f39p/lib/python3.9/site-packages/omamer/main.py", line 33, in main
from tables import PerformanceWarning
File "/work/FAC/FBM/DBC/cdessim2/default/smajidi1/software/miniconda/envs/f39p/lib/python3.9/site-packages/tables/__init__.py", line 44, in <module>
from .utilsextension import get_hdf5_version as _get_hdf5_version
File "tables/utilsextension.pyx", line 1, in init tables.utilsextension
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
Install numpy version 1.23 using pip install numpy==1.23
To make sure it is solved you can run omamer -h
You could install like this
conda create -n fasto python=3.10
conda activate fasto
git clone https://github.com/DessimozLab/FastOMA.git
conda install bioconda::fasttree
conda install bioconda::mafft
conda install conda-forge::openjdk
pip install .[report,nextflow]
pip install numpy==1.23
We recently provided the conda installation
conda create -n fastoma
conda activate fastoma
conda install bioconda::fastoma
It can takes 10 minutes or more to finish. It works and generates the orthoXML and orthologous pairs. But one limitation is that pyham is not yet on Bioconda. So the report step won't work. A user can install pyham with pip install pyham.
$ nextflow run ../FastOMA.nf --input_folder in_folder/ --output_folder myresult/ --omamer_db in_folder/oma.db
N E X T F L O W ~ version 24.10.4
Launching `../FastOMA.nf` [goofy_blackwell] DSL2 - revision: 3b277ba06a
===========================================
FastOMA -- PIPELINE
===========================================
Project : /vast/FastOMA
Git info: null - null [null]
Cmd line: nextflow run ../FastOMA.nf --input_folder in_folder/ --output_folder myresult/ --omamer_db in_folder/omamer.db
Manifest's pipeline version: 0.4dev
Parameters:
input_folder in_folder/
proteome folder in_folder//proteome
species_tree in_folder//species_tree.nwk
splice_folder in_folder//splice
omamer_db in_folder/omamer.db
hogmap_in in_folder//hogmap_in
fasta_header_id_transformer noop
filter_method col-row-threshold
filter_gap_ratio_row 0.3
filter_gap_ratio_col 0.5
nr_repr_per_hog 5
min_sequence_length 40
debug_enabled false
report false
force_pairwise_ortholog_generation false
executor > local (13)
[53/30413a] process > check_input (1) [100%] 1 of 1 ✔
[49/eae87b] process > omamer_run (CHLTR.fa) [100%] 3 of 3 ✔
[4e/bbecb6] process > infer_roothogs (1) [100%] 1 of 1 ✔
[b3/be3175] process > batch_roothogs (1) [100%] 1 of 1 ✔
[- ] process > hog_big -
[5f/32e005] process > hog_rest (1) [100%] 1 of 1 ✔
[5f/322207] process > collect_subhogs (1) [100%] 1 of 1 ✔
[ae/e854f5] process > extract_pairwise_ortholog_relations (1) [100%] 1 of 1 ✔
[ac/c028ad] process > fastoma_report (1) [ 75%] 3 of 4, failed: 3, retries: 3
[5b/8f77e0] NOTE: Process `fastoma_report (1)` terminated with an error exit status (1) -- Execution is retried (1)
[d6/1396d8] NOTE: Process `fastoma_report (1)` terminated with an error exit status (1) -- Execution is retried (2)
[40/185392] NOTE: Process `fastoma_report (1)` terminated with an error exit status (1) -- Execution is retried (3)
ERROR ~ Error executing process > 'fastoma_report (1)'
Caused by:
Process `fastoma_report (1)` terminated with an error exit status (1)
Command executed:
if ! papermill --version ; then
>&2 echo "papermill dependency not found!"
>&2 echo "Ensure you have installed fastoma with the 'report' feature
(e.g. pip install fastoma[report])"
exit 1
fi
papermill fastoma_notebook_stat.ipynb report.ipynb -p output_folder "./" -p proteome_folder "proteome"
jupyter nbconvert --to html report.ipynb
...
ModuleNotFoundError Traceback (most recent call last)
Cell In[21], line 1
----> 1 import pyham
2 import logging
3 logging.basicConfig(level=logging.INFO, format="%(asctime)s %(name)-12s %(levelname)-8s %(message)s")
ModuleNotFoundError: No module named 'pyham'