Kneaddata installed with conda is not available

I’ve come across this error as well. It is due to a conflict between the biobakery workflows and the conda install. If you look at the file $MYENV/bin/trimmomatic you can see it is just a plain text wrapper for a java file. The first comment is “Wrapper script for Java Conda packages that ensures that the java runtime”

However, biobakery_workflows is trying to call this plain text file as the jar file, visible in the error message Err: CRITICAL ERROR: Error executing: java -Xmx500m -jar $MYENV/bin/trimmomatic SE -threads 1 ...

I found the jar file that the wrapper script is calling, and replaced the wrapper script with it. First I backed up the wrapper script so it can still be used with the command “trimmomatic_cmdline”

cp $MYENV/bin/trimmomatic $MYENV/bin/trimmomatic_cmdline
ln -s $MYENV/share/trimmomatic/trimmomatic.jar $MYENV/bin/trimmomatic
ln -s $MYENV/share/trimmomatic/trimmomatic.jar $MYENV/bin/trimmomatic.jar

Then, you can use the tools as normal, and use trimmomatic_cmdline if needed.
$MYENV should be replaced with the path to your conda environment.

1 Like