<p>It works for me with the <a href="http://darlinglab.org/mauve/download.html" rel="nofollow noreferrer">download from download page</a>. The download archive contains <code>Mauve.jar</code> so the command line in the answer you link to should work.</p>

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

<pre class="lang-bash prettyprint-override"><code>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
</code></pre>

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

CC BY-SA 3.0
2018-02-28T16:35:38.540Z
Should I download this file: http://darlinglab.org/mauve/snapshots/2015/2015-02-25/MacOS/Mauve-snapshot_2015-02-25.dmg ? But this is to install mauve, right? Where can I find the Mauve.jar file?
Biomagician
CC BY-SA 3.0
2018-02-28T16:40:06.600Z
@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: https://apple.stackexchange.com/a/95942/2392 — but in the terminal you can simply `cd` into the directory.
Konrad Rudolph
CC BY-SA 3.0
2018-02-28T11:11:23.110Z
2018-02-28T11:11:23.110Z
Konrad Rudolph
<p>I am using <a href="http://darlinglab.org/mauve/" rel="nofollow noreferrer">Mauve</a> to align two whole genomes. I use the following command to get the alignment in xmfa format:</p>

<p><code>/Applications/Mauve.app/Contents/MacOS/progressiveMauve ref1.fa ref2.fa --output alignment.xmfa</code></p>

<p>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 <a href="https://sourceforge.net/p/mauve/mailman/message/31871278/" rel="nofollow noreferrer">here</a> but the <a href="http://gel.ahabs.wisc.edu/mauve/snapshots" rel="nofollow noreferrer">link</a> to snapshot releases of Mauve does not work anymore.</p>

<p>I could not find anything in the Mauve command line help:</p>

<p><code>/Applications/Mauve.app/Contents/MacOS/progressiveMauve --help</code></p>

<p>nor on the <a href="http://darlinglab.org/mauve/" rel="nofollow noreferrer">Mauve website</a>.</p>

<p>I tried the procedure described by Konrad Rudolph. I wrote:</p>

<p>MAUVE_DIR=/Applications/Mauve.app/Contents/Java</p>

<p>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.</p>

<p>followed by:</p>

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

<p>followed by:</p>

<p>java org.gel.mauve.analysis.SnpExporter -f alignment.xmfa -o aln.snps</p>

<p>and it seems to work.</p>

<phylogenetics><snp><variation><mauve>
Can I export the SNPs between whole genome alignments using the command line?
# Can I export the SNPs between whole genome alignments using the command line?

(Asked by: username_0 on 2018-02-28)

I am using [Mauve](http://darlinglab.org/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](https://sourceforge.net/p/mauve/mailman/message/31871278/) but the [link](http://gel.ahabs.wisc.edu/mauve/snapshots) 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](http://darlinglab.org/mauve/).

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.

**Tags:** phylogenetics, snp, variation, mauve

---

## 1 answers

### Answer by username_1 on 2018-02-28. Score: 2 | Accepted answer

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.

> **Comments:**
> **username_0**: Should I download this file: http://darlinglab.org/mauve/snapshots/2015/2015-02-25/MacOS/Mauve-snapshot_2015-02-25.dmg ? But this is to install mauve, right? Where can I find the Mauve.jar file?  
> **username_1**: @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: https://apple.stackexchange.com/a/95942/2392 — but in the terminal you can simply `cd` into the directory.  

---

