# What is the file .mums created by mummer?

I am doing genome sequence alignment using MUMmer, in particular I want to do a dotplot with mummerplot. So the passages that I did are:

1.create a file .mums with the following command line:

mummer -mum -b -c H_pylori26695_Eslice.fasta H_pyloriJ99_Eslice.fasta > mummer.mums


2.and then plot all the MUMs with MUMmerplot:

mummerplot -x "[0,275287]" -y "[0,265111]" -postscript -p mummer mummer.mums


The example is taken here. The plot works, but I would like to understand several things to have more consciousness of what I am doing: the file .mums has three columns with many rows. What do they represent ? I know that it is a little explained in the link given before:

This command will find all maximal unique matches (-mum) between the reference and query on both the forward and reverse strands (-b) and report all the match positions relative to the forward strand (-c). Output is to stdout, so we will redirect it into a file named mummer.mums. This file lists all of the MUMs of the default length or greater between the two input sequences.

So the file should report all the Maximal Unique Matches between the two sequences but I do not understand what are these three columns...

Moreover, can someone explain in simple words the reason of the term "unique" in "Maximal Unique Matches" ?

## Maximal Unique Matches

• A "match" is maximal if it cannot be extended in either direction and still be a match i.e, for two strings $$s,r$$, a match $$s_i,...,s_{i+k}$$, $$r_{j},...,r_{j+k}$$ is maximal if $$s_i,...,s_{i+k+1}$$, $$r_{j},...,r_{j+k+1}$$ is not a match and $$s_{i-1},...,s_{i+k}$$, $$r_{j-1},...,r_{j+k}$$ is also not a match.
• A "match" is unique if the matched substring is not present anywhere else in either genome. i.e, for two strings $$s,r$$, a match $$s_i,...,s_{i+k}$$, $$r_{j},...,r_{j+k}$$ is unique if the substring $$s_i,...,s_{i+k}$$ is present only once in each genome.

With those definitions in hand, we can easily define a Maximal Unique Match (MUM) as an exact match that is both maximal and unique. Note that MUMmer also provides support for Maximal Exact Matches (MEMs), which do not require uniqueness of matches.

## MUMmer output

As far as the output goes:

For example, the row:

1      1120       299


denotes a MUM of length 299 starting at the first base in the first input file and the 1120th base in the second input file. For matches on the reverse complement strand, you'll notice a second part of the output that contains the matches on the reverse complemented strand.

Here is a sample output I have on my device:

>  mummer -mum -b -c England1.fna Indiana-USA-1_Saudi_Arabia_2014.fna
> gi|633896549|gb|KJ813439.1|
1      1120       299
301      1420       174
476      1595        65
542      1661        81
624      1743        43
668      1787       264
933      2052      1042
1976      3095      1299
3276      4395       330
3607      4726        69
3677      4796       885
4563      5682       812
5376      6495       792
6169      7288       831
7001      8120       731
7733      8852      1963
9697     10816      1176
10874     11993       617
11492     12611        41
11534     12653       164
11708     12827      3007
14716     15835      1040
15757     16876       489
16247     17366       412
16660     17779       337
16998     18117       463
17462     18581       325
17788     18907       686
18475     19594       599
19075     20194       342
19418     20537       179
19598     20717       532
20131     21250       152
20284     21403       935
21220     22339       348
21569     22688       764
22334     23453       351
22686     23805        73
22760     23879        29
22790     23909       180
22971     24090       532
23504     24623       143
23648     24767       107
23756     24875       434
24191     25310        59
24251     25370        47
24299     25418       214
24515     25634       224
24740     25859      1386
26127     27246        39
26167     27286        63
26231     27350       114
26346     27465       102
26449     27568      1399
27849     28968       207
28057     29176       938
28996     30115       726
29743     30868       369
> gi|633896549|gb|KJ813439.1| Reverse


Now, if you compute the reverse complement of the input and rerun, you'll notice the matches appear in reverse in the second section denoted by > gi|633896549|gb|KJ813439.1| Reverse

• Thank you very much @Throckmorton . But I have still a doubt. How can mummerplot do the dotplot of the MUMs if in the .mums file contains only the "x starting value" and the "y ending value", let's say, (and the length) of the MUM ? Moreover, I do not understand why, using the options -b and -c (so running the first command line written in my question post), in my file there is also the list of the matches on the reverse complemented strand... Jun 30 '21 at 10:33
• For each row $x,y,z$ in the mummer output, there will be a line between points $(x, y)$ and $(x+z, y+z)$ in the plot representing the MUM. Jun 30 '21 at 14:57
• @Manuela There are matches on the reverse complement strand because you used the -b flag. If you run mummer -h you will see what the different flags do. For example, -b compute forward and reverse complement matches  Jun 30 '21 at 14:58
• ok @Throckmorton for the first comment (I actually read your answer wrong, sorry). For the second I still can not understand because also you runned the same command with -b and -c and you do not have the list under "reverse"... isn'it it? And also in the manual (as I mentioned) there is: This command will find all maximal unique matches (-mum) between the reference and query on both the forward and reverse strands (-b) and report all the match positions relative to the forward strand (-c). Jun 30 '21 at 17:05
• The reason I have no matches for the reverse complement is because the two sequences I ran MUMmer on are for the same strand and don't contain any inversions. If I invert the second half of the query sequence, those matches will then appear under the "Reverse" strand. Jul 1 '21 at 0:34

found this in the manual, so I guess the first two columns are the reference and query positions and the third is the length. I am not 100% sure either, so let me know if you find out more.

http://mummer.sourceforge.net/manual/#mummerplot

Just a simple three column list, noting the position and length of every maximal exact match. Note that for reverse complement matches (produced with the -r option), the query start positions will reference the reverse complement of the query input sequence.

• Thank you @HermannGregorDallinger ! Yes then I found an explanation like the yours always in the manual but in a different part of it that is: Jun 29 '21 at 8:13
• For each match, the three columns list the position in the reference sequence, the position in the query sequence, and the length of the match respectively. Reverse complemented query positions are reported relative to the reverse of the query sequence unless the -c option was used. As was stated above the -L option adds the sequence lengths to the header line and the -s option adds the match strings to the output, if these options were used the format would be as follows: etc... Jun 29 '21 at 8:20
• But I still wonder if these query and reference positions are the "starting" positions from the left or from the right... they should represent like a point (x,y) in a Cartesian plane but I do not understand very well which point. Jun 29 '21 at 8:21
• Looks like this is undocumented, but a sensible default would be to get the end position by adding start and length, so they would be as you said from the "left" and the "right" position would be start + length. For most applications and for producing a "rough" dotplot, I guess it will not matter. You could try using blast to get more exact and detailed output if it is necessary. Jun 29 '21 at 11:55