Can I export the SNPs between whole genome alignments using the command line? 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.
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.