Hello,
In short, I believe the java version provided by the conda channel for kneadData is not correctly being called by the trimmomatic command. I posted under a GitHub issue that was opened already. My post is by arnold3. Here is the link to the GitHub discussion, and I copy pasted my post below the link in case that is most helpful. Thanks for any information you can provide.
Hi All, Trying to make a reproducible example here. I am having a similar problem.
I downloaded installed kneaddata via conda:
conda install -c bioconda kneaddata
and downloaded the tutorial files here
https://huttenhower.sph.harvard.edu/kneaddata/
Running this command, I get an error that trimmomatic is not able to be found
$ kneaddata --input input/singleEnd.fastq --reference-db input/demo_db --output kneaddataOutputSingleEnd
ERROR: Unable to find trimmomatic. Please provide the full path to trimmomatic with --trimmomatic.
As noted above, within conda, the trimmomatic is a link that points to the shared folder. Specifying the direct link to where the trimmomatic.jar is with the following command
kneaddata --input input/seq1.fastq --input input/seq2.fastq --reference-db input/demo_db --output kneaddataOutputPairedEnd --trimmomatic ../share/trimmomatic-0.39-2/
runs trimmomatdc but yields a different error:
Initial number of reads ( ~/input/seq1.fastq ): 42473 Initial number of reads ( ~/input/seq2.fastq ): 42473 Running Trimmomatic ...
CRITICAL ERROR: Error executing: java -Xmx500m -d64 -jar ~/share/trimmomatic-0.39-2/trimmomatic.jar PE -threads 1 -phred33 ~/input/seq1.fastq ~/input/seq2.fastq ~/kneaddataOutputPairedEnd/seq1_kneaddata.trimmed.1.fastq ~/kneaddataOutputPairedEnd/seq1_kneaddata.trimmed.single.1.fastq ~/kneaddataTutorial/kneaddataOutputPairedEnd/seq1_kneaddata.trimmed.2.fastq ~/kneaddataOutputPairedEnd/seq1_kneaddata.trimmed.single.2.fastq SLIDINGWINDOW:4:20 MINLEN:122
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.
When I copy and paste just the java code, the same message results:
java -Xmx500m -d64 -jar ~/share/trimmomatic-0.39-2/trimmomatic.jar PE -threads 1 -phred33 ~/input/seq1.fastq ~/input/seq2.fastq ~/kneaddataOutputPairedEnd/seq1_kneaddata.trimmed.1.fastq ~/kneaddataOutputPairedEnd/seq1_kneaddata.trimmed.single.1.fastq ~/kneaddataTutorial/kneaddataOutputPairedEnd/seq1_kneaddata.trimmed.2.fastq ~/kneaddataOutputPairedEnd/seq1_kneaddata.trimmed.single.2.fastq SLIDINGWINDOW:4:20 MINLEN:122
But if I remove the -d64
and rerun, the program completes
java -Xmx500m -jar ~/share/trimmomatic-0.39-2/trimmomatic.jar PE -threads 1 -phred33 ~/input/seq1.fastq ~/input/seq2.fastq ~/kneaddataOutputPairedEnd/seq1_kneaddata.trimmed.1.fastq ~/kneaddataOutputPairedEnd/seq1_kneaddata.trimmed.single.1.fastq ~/kneaddataTutorial/kneaddataOutputPairedEnd/seq1_kneaddata.trimmed.2.fastq ~/kneaddataOutputPairedEnd/seq1_kneaddata.trimmed.single.2.fastq SLIDINGWINDOW:4:20 MINLEN:122
TrimmomaticPE: Completed Successfully
However, this presents the problem that then the rest of the workflow for kneaddata is not run. I tried checking to see if perhaps I have the wrong version of java installed. The URL link is broken (#4 Java runtime environment link listed here: KneadData – The Huttenhower Lab) to kneaddata’s required java runtime environment.
java --version openjdk 10.0.2 2018-07-17 OpenJDK Runtime Environment Zulu10.3+5 (build 10.0.2+13) OpenJDK 64-Bit Server VM Zulu10.3+5 (build 10.0.2+13, mixed mode)
Any suggestions on how to move forward are greatly appreciated!