Question: Mauve Contig Mover Command Line Error
0
gravatar for jlc232
2.7 years ago by
jlc2320
University of British Columbia, Vancouver, Canada
jlc2320 wrote:

Hello, 

I'm encountering the following error when trying to run Mauve Contig Mover to reorder the contigs in a draft genome from the Command line. 

 

$ java -Xmx500m -cp /Applications/Mauve.app/Contents/Java/Mauve.jar org.gel.mauve.contigs.ContigOrderer -output mA17 -ref EGDe.gbk -draft mA17.fasta
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: org/biojava/bio/seq/OptimizableFilter
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
    at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
    at java.lang.Class.getMethod0(Class.java:3018)
    at java.lang.Class.getMethod(Class.java:1784)
    at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: org.biojava.bio.seq.OptimizableFilter
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 7 more

 

I'm running Mac OSX 10.9.5, with JDK v. 8, and Mauve-2.4.0, though I've tried other versions of Mauve and have gotten the same error. 

 

Any thoughts on this would be greatly appreciated!

mauve draft-genome • 1.5k views
ADD COMMENTlink modified 2.7 years ago by alexander.d.esin20 • written 2.7 years ago by jlc2320

Are you able to run Mauve with some small toy datasets, using the same command-line?

ADD REPLYlink written 2.7 years ago by h.mon15k
2
gravatar for alexander.d.esin
2.7 years ago by
United Kingdom
alexander.d.esin20 wrote:

I had an exactly identical problem trying to run the Contig Mover from the command line, and stumbled across your question. In case you still need it, or someone else stumbles across this - this is how I fixed it. My error message was identical to the one above. I am also running Mac OSX 10.9.5 with JDK 8, and the latest snapshot of Mauve.

UPDATE

The older method is still workable, but I went back to it and simply solved it by running the command line as such:

java -Xmx4096m -cp "/Applications/Mauve.app/Contents/Java/*" org.gel.mauve.contigs.ContigOrderer (etc)

This way the java classpath (-cp) will pick up all the Jars in the Mauve.app directory, including the essential biojava .jars.

OLD

I downloaded the following .jar binaries from http://biojava.org/wiki/BioJava:Download_1.7.1:

biojava.jar

bytecode.jar

commons-cli.jar

I placed these in my $JAVA_HOME/jre/lib/ext directory

$JAVA_HOME can be found by running from terminal shell:

/usr/libexec/java_home

In my case tthe full path was: /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/ext

After transferring the .jar files my Contig Mover ran without problems with the same arguments and setup as your initial command line!

Hope this works for you.

-S

 

ADD COMMENTlink modified 2.7 years ago • written 2.7 years ago by alexander.d.esin20

I was trying your updated terminal command but got this error: ref file: org.gel.mauve.contigs.ContigMauveAlignFrame[panel0,0,0,400x383,invalid] Directory already contains reorder

Any help with this?

ADD REPLYlink written 23 months ago by rrcutler100

You've probably figured this out or given up, but for anyone who happens upon this question: you just need to first delete the directory that Mauve created the first time you tried to run it (should be called alignment1).

ADD REPLYlink written 12 months ago by jessica0

This answer did it for me, except for one thing: The Contig Mover uses the progressiveMauve script and (unless I've missed something) assumes it will be on the system PATH. So first, I created a symbolic link to that in /usr/local/bin:

ln -s /Applications/Mauve.app/Contents/MacOS/progressiveMauve /usr/local/bin/
ADD REPLYlink modified 12 months ago • written 12 months ago by jessica0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 616 users visited in the last hour