The bioBakery help forum

Critical error starting trimmomatic (option d64 not recognized)

I’m getting an error from kneaddata (v0.7.10 from conda/biobakery) on the trimmomatic step, the relevant parts of the error message seem to be

CRITICAL ERROR: Error executing: java -Xmx500m -d64 -jar /home/vklepacc/.linuxbrew/bin/trimmomatic-0.33.jar #...
# ...
Error message returned from Trimmomatic :
Unrecognized option: -d64

One bit of weirdness is it’s looking for trimmomatic in linuxbrew folder. When I add trimmomatic with conda (it doesn’t seem to get installed with kneaddata), I get the same error.

$ ls /home/vklepacc/.linuxbrew/bin/trimmomatic-0.33.jar
/home/vklepacc/.linuxbrew/bin/trimmomatic-0.33.jar
$ whereis trimmomatic
trimmomatic: /home/vklepacc/miniconda3/envs/biobakery3/bin/trimmomatic

The former looks like it’s v0.33, while the later is v0.39

$ conda list
# ...
kneaddata                 0.7.10           py37h631d262_0    biobakery
# ...
trimmomatic               0.39                          1    bioconda
full error output
$ kneaddata --input rawfastq/C0932-8F-1A_S44_1.fastq.gz --input rawfastq/C0932-8F-1A_S44_2.fastq.gz --reference-db /nobackup1/vklepacc/databases/Homo_sapiens_bowtie --output output/kneaddata --output-prefix C0932-8F-1A_S44_kneaddata
Decompressing gzipped file ...

Decompressing gzipped file ...

Reformatting file sequence identifiers ...

Reformatting file sequence identifiers ...

Initial number of reads ( /nobackup1b/users/vklepacc/echo/batch014/output/kneaddata/reformatted_identifiersEJ8lab_decompressed_7Qet3C_C0932-8F-1A_S44_1 ): 3737441
Initial number of reads ( /nobackup1b/users/vklepacc/echo/batch014/output/kneaddata/reformatted_identifiersKQ84dB_decompressed_cRnYUK_C0932-8F-1A_S44_2 ): 3737441
Running Trimmomatic ... 
CRITICAL ERROR: Error executing: java -Xmx500m -d64 -jar /home/vklepacc/.linuxbrew/bin/trimmomatic-0.33.jar PE -threads 1 -phred33 /nobackup1b/users/vklepacc/echo/batch014/output/kneaddata/reformatted_identifiersEJ8lab_decompressed_7Qet3C_C0932-8F-1A_S44_1 /nobackup1b/users/vklepacc/echo/batch014/output/kneaddata/reformatted_identifiersKQ84dB_decompressed_cRnYUK_C0932-8F-1A_S44_2 /nobackup1b/users/vklepacc/echo/batch014/output/kneaddata/C0932-8F-1A_S44_kneaddata.trimmed.1.fastq /nobackup1b/users/vklepacc/echo/batch014/output/kneaddata/C0932-8F-1A_S44_kneaddata.trimmed.single.1.fastq /nobackup1b/users/vklepacc/echo/batch014/output/kneaddata/C0932-8F-1A_S44_kneaddata.trimmed.2.fastq /nobackup1b/users/vklepacc/echo/batch014/output/kneaddata/C0932-8F-1A_S44_kneaddata.trimmed.single.2.fastq ILLUMINACLIP:/home/vklepacc/.linuxbrew/lib/python2.7/site-packages/kneaddata/adapters/NexteraPE-PE.fa:2:30:10:8:TRUE SLIDINGWINDOW:4:20 MINLEN:75

Error message returned from Trimmomatic :
Unrecognized option: -d64
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

I moved the linuxbrew trimmomatic file, but I’m getting the same error pointing to the conda one:

RITICAL ERROR: Error executing: java -Xmx500m -d64 -jar /home/vklepacc/minicond/envs/biobakery3/bin/trimmomatic-0.33.jar 
#...
Error message returned from Trimmomatic :
Unrecognized option: -d64

Hi Kevin - Sorry for the slow response and thank you for the detailed post. I double checked the kneaddata history and we removed the “-d64” option in version v0.7.2. That option is no longer supported with newer versions of java which is where you are seeing the error. Also I think that you might be picking up an older linuxbrew version of kneaddata you have installed instead of the newer conda kneaddata you have installed. If you would remove the whole linuxbrew kneaddata install I think it should resolve the errors.

Thank you,
Lauren

Thanks! That solved this issue, but now having problems with trf :-/

I’ll poke around and open a new thread if I can’t solve. Thanks!

Hi,
I had somewhat similar error with kneaddata v0.8.0 and I ran into this error at the trimmomatic step;

Running Trimmomatic …
CRITICAL ERROR: Error executing: java -Xmx500m -jar /home/po44/miniconda3/bin/trimmomatic-0.33.jar SE -threads 1 -phred33 /home/po44/kneaddata_analysis/kneaddataOutputSingleEnd/reformatted_identifiersxugzmf64_singleEnd /home/po44/kneaddata_analysis/kneaddataOutputSingleEnd/singleEnd_kneaddata.trimmed.fastq ILLUMINACLIP:/home/po44/miniconda3/lib/python3.8/site-packages/kneaddata/adapters/NexteraPE-PE.fa:2:30:10 SLIDINGWINDOW:4:20 MINLEN:50

Please, how do I go about resolving it.

Hi, It looks like you do have the newer version that does not set the d64 option. However, I can’t tell what the error might be from trimmomatic. Would you post the output from trimmomatic when running that command and I can help debug what might be going on?

Thank you,
Lauren

Hi Thank you.
I was actually running this command;

kneaddata --input input/singleEnd.fastq --reference-db input/demo_db --output kneaddataOutputSingleEnd

The output are 3 files; 1. “reformatted_identifiersxugzmf64_singleEnd” which is a fastq file. 2. a log file. 3. an am empty file name “F”.

The content of the log file is:

10/02/2020 01:20:16 PM - kneaddata.knead_data - INFO: Running kneaddata v0.8.0
10/02/2020 01:20:16 PM - kneaddata.knead_data - INFO: Output files will be written to: /home/po44/kneaddata_analysis/kneaddataOutputSingleEnd
10/02/2020 01:20:16 PM - kneaddata.knead_data - DEBUG: Running with the following arguments:
verbose = False
input = /home/po44/kneaddata_analysis/input/singleEnd.fastq
output_dir = /home/po44/kneaddata_analysis/kneaddataOutputSingleEnd
reference_db = /home/po44/kneaddata_analysis/input/demo_db
bypass_trim = False
output_prefix = singleEnd_kneaddata
threads = 1
processes = 1
trimmomatic_quality_scores = -phred33
bmtagger = False
bypass_trf = False
fastqc_start = False
fastqc_end = False
store_temp_output = False
remove_intermediate_output = False
cat_final_output = False
log_level = DEBUG
log = /home/po44/kneaddata_analysis/kneaddataOutputSingleEnd/singleEnd_kneaddata.log
trimmomatic_path = /home/po44/miniconda3/bin/trimmomatic-0.33.jar
run_trim_repetitive = False
max_memory = 500m
trimmomatic_options = None
sequencer_source = NexteraPE
bowtie2_path = /home/po44/miniconda3/bin/bowtie2
bowtie2_options = --very-sensitive-local --phred33
decontaminate_pairs = unpaired
reorder = False
serial = False
bmtagger_path = None
trf_path = /home/po44/miniconda3/bin/trf
match = 2
mismatch = 7
delta = 7
pm = 80
pi = 10
minscore = 50
maxperiod = 500
fastqc_path = None
remove_temp_output = True
discordant = True

10/02/2020 01:20:16 PM - kneaddata.utilities - INFO: Reformatting file sequence identifiers …
10/02/2020 01:20:17 PM - kneaddata.utilities - INFO: READ COUNT: raw single : Initial number of reads ( /home/po44/kneaddata_analysis/kneaddataOutputSingleEnd/reformatted_identifiersxugzmf64_singleEnd ): 16902.0
10/02/2020 01:20:17 PM - kneaddata.utilities - DEBUG: Checking input file to Trimmomatic : /home/po44/kneaddata_analysis/kneaddataOutputSingleEnd/reformatted_identifiersxugzmf64_singleEnd
10/02/2020 01:20:17 PM - kneaddata.utilities - INFO: Running Trimmomatic …
10/02/2020 01:20:17 PM - kneaddata.utilities - INFO: Execute command: java -Xmx500m -jar /home/po44/miniconda3/bin/trimmomatic-0.33.jar SE -threads 1 -phred33 /home/po44/kneaddata_analysis/kneaddataOutputSingleEnd/reformatted_identifiersxugzmf64_singleEnd /home/po44/kneaddata_analysis/kneaddataOutputSingleEnd/singleEnd_kneaddata.trimmed.fastq ILLUMINACLIP:/home/po44/miniconda3/lib/python3.8/site-packages/kneaddata/adapters/NexteraPE-PE.fa:2:30:10 SLIDINGWINDOW:4:20 MINLEN:50
10/02/2020 01:20:17 PM - kneaddata.utilities - CRITICAL: Error executing: java -Xmx500m -jar /home/po44/miniconda3/bin/trimmomatic-0.33.jar SE -threads 1 -phred33 /home/po44/kneaddata_analysis/kneaddataOutputSingleEnd/reformatted_identifiersxugzmf64_singleEnd /home/po44/kneaddata_analysis/kneaddataOutputSingleEnd/singleEnd_kneaddata.trimmed.fastq ILLUMINACLIP:/home/po44/miniconda3/lib/python3.8/site-packages/kneaddata/adapters/NexteraPE-PE.fa:2:30:10 SLIDINGWINDOW:4:20 MINLEN:50

I hope this helps to debug the problem.

Thanks again!

Hi - Thank you for the detailed follow up and sorry if my prior post was confusing. Kneaddata runs trimmomatic as one if its first steps and it looks like the trimmomatic command is resulting in an error from your run but from the log I can’t tell what the issue is. Would you try running just the trimmomatic command directly to see if it provides more information about the error? The command from your log file is:

$ java -Xmx500m -jar /home/po44/miniconda3/bin/trimmomatic-0.33.jar SE -threads 1 -phred33 /home/po44/kneaddata_analysis/kneaddataOutputSingleEnd/reformatted_identifiersxugzmf64_singleEnd /home/po44/kneaddata_analysis/kneaddataOutputSingleEnd/singleEnd_kneaddata.trimmed.fastq ILLUMINACLIP:/home/po44/miniconda3/lib/python3.8/site-packages/kneaddata/adapters/NexteraPE-PE.fa:2:30:10 SLIDINGWINDOW:4:20 MINLEN:50

Thank you,
Lauren

Hi,
Thank you very much.
I figured what the problem was. It was actually my fault, I have not loaded java module into my environment. Essentially, I got the error because the command I ran does not see java installed in my environment. So, after I loaded java, the code worked.

Thanks again!