2
$\begingroup$

I am using Mauve to align two whole genomes. I use the following command to get the alignment in xmfa format:

/Applications/Mauve.app/Contents/MacOS/progressiveMauve ref1.fa ref2.fa --output alignment.xmfa

I then open the xmfa file in the Mauve GUI and export the SNPs. Is there a way of doing this using a command? I have tried to follow the procedure described here but the link to snapshot releases of Mauve does not work anymore.

I could not find anything in the Mauve command line help:

/Applications/Mauve.app/Contents/MacOS/progressiveMauve --help

nor on the Mauve website.

I tried the procedure described by Konrad Rudolph. I wrote:

MAUVE_DIR=/Applications/Mauve.app/Contents/Java

in the terminal. Is this correct? Don't I need an export and quotation marks to create a bash variable? I tried adding an export and using quotation marks for the file but the error below remained the same.

followed by:

export CLASSPATH="$(find "$MAUVE_DIR" -name \*.jar -print0 | tr '\0' :)$CLASSPATH"

followed by:

java org.gel.mauve.analysis.SnpExporter -f alignment.xmfa -o aln.snps

and it seems to work.

$\endgroup$
2
$\begingroup$

It works for me with the download from download page. The download archive contains Mauve.jar so the command line in the answer you link to should work.

However, you might need to include all the jar files (not just Mauve.jar) in the classpath for this to command work, though. For instance, the following works for me:

MAUVE_DIR=‹the-dir-containing-Mauve.jar›
export CLASSPATH="$(find "$MAUVE_DIR" -name \*.jar -print0 | tr '\0' :)$CLASSPATH"
java org.gel.mauve.analysis.SnpExporter -f aln.xmfa -o aln.snps

… there’s probably a smarter way to make this work but I don’t use Java enough to know how.

$\endgroup$
  • $\begingroup$ Should I download this file: darlinglab.org/mauve/snapshots/2015/2015-02-25/MacOS/… ? But this is to install mauve, right? Where can I find the Mauve.jar file? $\endgroup$ – charlesdarwin Feb 28 '18 at 16:35
  • 1
    $\begingroup$ @charlesdarwin macOS applications are regular directories. Open the DMG and go inside the Mauve.app dir. Inside that directory you’ll find /Contents/Java/Mauve.jar; to display the contents in Finder, use the instructions here: apple.stackexchange.com/a/95942/2392 — but in the terminal you can simply cd into the directory. $\endgroup$ – Konrad Rudolph Feb 28 '18 at 16:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.