This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to convert MUMmer output to SAM, GFF, or any other common format

I am aligning contigs against a reference genome and would like import the output of Nucmer-MUMmer as a track in GBrowse. MUMmer uses its own idiosyncratic output formats (delta format), and to my surprise I was unable to find any working parser for Mummer in BioPerl or BioPython.

I found some old requests, like

but seemingly nothing of this code ever made it. Does anyone know more about it?

mummer format parser

1 answer

The Debian package for Mummer comes with the delta2maf program which does exactly what it claims to do. That program comes from the Mugsy suite if you are on a different system.

Dear koetzl, thank you for your answer. I have found delta2maf as ELF binary in mugsy on sourceforge, but I am not using Debian but CentOS, and the binary Seg faults. I guess I should re-compile it, do you know where the original sources are? I was also searching https://packages.debian.org and it looks like there is no source for delta2maf other than this patch: https://anonscm.debian.org/viewvc/debian-med/trunk/packages/mummer/trunk/debian/patches/addition_from_mugsy.patch?view=markup

Oh source is here: svn://svn.code.sf.net/p/mugsy/code/trunk to compile:

svn checkout svn://svn.code.sf.net/p/mugsy/code/trunk/MUMmer3.20/
cd MUMmer3.20/src/tigr
make delta2maf
g++  -O3 tigrinc.cc -c -o tigrinc.o
g++  -O3 translate.cc -c -o translate.o
g++  -O3 delta.cc -c -o delta.o
g++  -O3 delta2maf.cc tigrinc.o translate.o delta.o -o      /export/home/michaeld/compile/MUMmer3.20/src/tigr/delta2maf; chmod 755 /export/home/michaeld/compile/MUMmer3.20/src/tigr/delta2maf

./delta2maf
Segmentation fault (core dumped)
   :(

Yeah, the program segfaults when no args are provided. :/ You have to call it with the delta file as first argument. ./delta2maf foo.delta

Yep, it is working! I think the maf format is still a bit verbose (for 80k contigs vs. 30k scaffolds, yields a 1.4GB file) to import into GBrowse, because it contains all the aligned sequences, I think I can further convert it to GFF though, and therefore can accept this answer.

Log in to answer this question.