<p><a href="https://github.com/mummer4/mummer" rel="nofollow noreferrer">MUMmer4</a> is a versatile alignment tool for DNA and protein sequences. It supports one reference genome and up to 32 query genomes. MUMmer4 will align every contig in each genome to the reference genome.</p>

CC BY-SA 4.0
2022-06-29T14:45:11.853Z
do you concatenate all query genomes in one fasta file? If so, how does MUMmer identify which contig belongs to which genome? Based on a header identifier, for example?
BCArg
CC BY-SA 4.0
2022-06-30T07:21:27.080Z
@BCArg I did not concatenate all query genomes in one fasta file.
Forrest Vigor
CC BY-SA 4.0
2022-06-30T09:54:50.527Z
@ForrestVigor does it support anything like `nucmer -p <prefix> ref.fa qry1.fa qry2.fa ... qryn.fa` ? on the [help page](https://github.com/mummer4/mummer) *it reads <query> specifies the multi-FastA sequence file that contains the query sequences, to be aligned with the references*
BCArg
CC BY-SA 4.0
2022-06-30T13:16:19.193Z
@BCArg Yes. You can use `mummer ref.fa qry1.fa qry2.fa ...`
Forrest Vigor
CC BY-SA 4.0
2022-06-29T13:18:38.407Z
2022-06-29T13:25:03.590Z
2022-06-29T13:25:03.590Z
Forrest Vigor
<p>in the end, I just loaded the <code>.bam</code> files into <a href="https://www.sanger.ac.uk/tool/artemis/" rel="nofollow noreferrer">artemis</a> and, by inspecting the depth (heat-map), I could check which samples had the genes I was looking for:</p>
<p><a href="https://i.sstatic.net/U2PqZ.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/U2PqZ.png" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2022-11-17T09:49:53.257Z
2022-11-17T09:49:53.257Z
BCArg
<p>If you have a reference genome (or are willing to designate one of your de novo assemblies a reference), you may find <a href="http://quast.sourceforge.net/quast.html" rel="nofollow noreferrer">QUAST</a> helpful.</p>
<p>QUAST will perform an alignment of all genomes against the reference genome and use that as the basis for comparisons. I believe that <a href="https://github.com/ablab/quast/blob/master/quast_libs/minimap2/minimap2.1" rel="nofollow noreferrer">under the hood it is running minimap2</a> for this purpose.</p>
<p>It includes a large-scale alignment viewer (&quot;<a href="http://quast.sourceforge.net/quast.html" rel="nofollow noreferrer">Icarus</a>&quot;) to investigate possible differences within contigs, computes high-level statistics on genome completeness/etc, and has other handy features.</p>
<p>You can see the <a href="https://academic.oup.com/bioinformatics/article/34/13/i142/5045727?login=false" rel="nofollow noreferrer">most recent QUAST paper</a> or the <a href="http://quast.sourceforge.net/docs/manual.html" rel="nofollow noreferrer">manual</a> for more information.</p>

CC BY-SA 4.0
2022-07-04T06:49:28.103Z
thanks for the comment, though I am looking for a program to perform the multi-sequence alignment, not to visualise the alignment, for which purpose QUAST is indeed excellent
BCArg
CC BY-SA 4.0
2022-07-04T20:03:30.470Z
@BCArg QUAST will generate the alignment. Updating answer accordingly.
Maximilian Press
CC BY-SA 4.0
2022-07-05T11:30:45.407Z
@Maximillian Press you are right, and obviously it makes sense that Quast needs to perform the alignment to evaluate/ compare two assemblies. Will explore it further
BCArg
CC BY-SA 4.0
2022-07-03T05:28:07.153Z
2022-07-04T20:07:50.577Z
2022-07-04T20:07:50.577Z
Maximilian Press
<p>It won't work on more than 3 genomes at a time, but SynMap3D from the Comparative Genomics webserver (<a href="https://genomevolution.org/coge/" rel="nofollow noreferrer">https://genomevolution.org/coge/</a>) should do the trick. I'm mentioning it here because the advantage, for me (in contrast to, say, Mauve), was user-friendliness.</p>
<p>Small note: Be mindful of what you name your uploaded samples. You can set your sequence not to be publicly available, but if you give it a new name, as opposed to a species name already in the database, that will be visible.</p>

CC BY-SA 4.0
2022-06-29T14:35:22.733Z
thanks, though I am looking for a MS aligner that supports > 3 sequences
BCArg
CC BY-SA 4.0
2022-06-29T09:29:08.593Z
2022-06-29T09:29:08.593Z
Laura
<p>I want to perform a multi-sequence alignment on 12 samples that clustered based on cgMLST. Ultimate goal is to find out whether they differ by the presence of a few genes.</p>
<p>I have performed multi-sequence alignment in the past using MAFFT, the main difference being that, back then, I was aligning protein sequences, and now I want to align multiple <strong>denovo assembled genomes, with multiple contigs each</strong></p>
<p>I first had a look at <a href="https://mafft.cbrc.jp/alignment/software/" rel="noreferrer">MAFFT</a>, the program that I used in the past for protein multi-sequence alignment, though I noticed that it considers each contig in a denovo assembly as independent sequence, which is not what I want</p>
<p>Then I had a look at <a href="https://darlinglab.org/mauve/user-guide/aligning.html" rel="noreferrer">Mauve</a>, but was discouraged by installation trouble-shooting. Also I read on their webpage:</p>
<blockquote>
<p>When an individual file contains several sequence entries, they will
be concatenated and the whole concatenated sequence will be aligned to
the sequences in the other files. This behavior allows
multi-chromosomal genomes to be aligned by including all chromosomes
in a single sequence file. Similarly, incomplete genomes that consist
of several sequence contigs can be aligned, though beware that
incorrectly ordered contigs will appear as genome rearrangements in
the Mauve viewer.</p>
</blockquote>
<p>So I guess concatenating all contigs in a single fasta file is not an option, as artefacts (genome rearrangements) might appear</p>
<p>It turns out that MAFFT has also an experimental feature to multi-align <a href="https://mafft.cbrc.jp/alignment/server/index-rawreads.html" rel="noreferrer">fastq</a> reads, which sounds attractive to me. Therefore I would like to ask if anyone can recommend this new/ experimental feature. Also if this option is available on the command-line tool, as the mafft help is quite limited (it does not specify the format of input and output files):</p>
<pre><code>  MAFFT v7.505 (2022/Apr/10)
  https://mafft.cbrc.jp/alignment/software/
  MBE 30:772-780 (2013), NAR 30:3059-3066 (2002)
------------------------------------------------------------------------------
High speed:
  % mafft in &gt; out
  % mafft --retree 1 in &gt; out (fast)

High accuracy (for &lt;~200 sequences x &lt;~2,000 aa/nt):
  % mafft --maxiterate 1000 --localpair  in &gt; out (% linsi in &gt; out is also ok)
  % mafft --maxiterate 1000 --genafpair  in &gt; out (% einsi in &gt; out)
  % mafft --maxiterate 1000 --globalpair in &gt; out (% ginsi in &gt; out)

If unsure which option to use:
  % mafft --auto in &gt; out

--op # :         Gap opening penalty, default: 1.53
--ep # :         Offset (works like gap extension penalty), default: 0.0
--maxiterate # : Maximum number of iterative refinement, default: 0
--clustalout :   Output: clustal format, default: fasta
--reorder :      Outorder: aligned, default: input order
--quiet :        Do not report progress
--thread # :     Number of threads (if unsure, --thread -1)
--dash :         Add structural information (Rozewicki et al, submitted)
</code></pre>
<p>Any other recommendation on another strategy to align multiple denovo assembled genomes with multiple contigs each are welcome</p>

CC BY-SA 4.0
2022-06-29T13:37:19.880Z
Thanks its a very good question, for alignments MAFFT in very recent history was the optimal aligner on 2 criteria.
M__
CC BY-SA 4.0
2022-11-16T22:24:55.527Z
Were you able to resolve your issue? And which tool did you use? I have a similar problem, though the number of sequences I have to align are in the thousands.
pseudomonas
CC BY-SA 4.0
2022-11-17T09:39:42.497Z
@Raghuram in the end I just loaded the .bam files into [artemis](https://www.sanger.ac.uk/tool/artemis/) and inspected the regions of interest. Looking at the depth, I could inspect the presence/ absence of the genes I wanted to detect.
BCArg
<phylogenetics><fasta><sam><multiple-sequence-alignment>
multi-sequence alignment of samples with multiple contigs each
# multi-sequence alignment of samples with multiple contigs each

(Asked by: username_0 on 2022-06-29)

I want to perform a multi-sequence alignment on 12 samples that clustered based on cgMLST. Ultimate goal is to find out whether they differ by the presence of a few genes.
I have performed multi-sequence alignment in the past using MAFFT, the main difference being that, back then, I was aligning protein sequences, and now I want to align multiple denovo assembled genomes, with multiple contigs each
I first had a look at MAFFT, the program that I used in the past for protein multi-sequence alignment, though I noticed that it considers each contig in a denovo assembly as independent sequence, which is not what I want
Then I had a look at Mauve, but was discouraged by installation trouble-shooting. Also I read on their webpage:

When an individual file contains several sequence entries, they will
be concatenated and the whole concatenated sequence will be aligned to
the sequences in the other files. This behavior allows
multi-chromosomal genomes to be aligned by including all chromosomes
in a single sequence file. Similarly, incomplete genomes that consist
of several sequence contigs can be aligned, though beware that
incorrectly ordered contigs will appear as genome rearrangements in
the Mauve viewer.

So I guess concatenating all contigs in a single fasta file is not an option, as artefacts (genome rearrangements) might appear
It turns out that MAFFT has also an experimental feature to multi-align fastq reads, which sounds attractive to me. Therefore I would like to ask if anyone can recommend this new/ experimental feature. Also if this option is available on the command-line tool, as the mafft help is quite limited (it does not specify the format of input and output files):
  MAFFT v7.505 (2022/Apr/10)
  https://mafft.cbrc.jp/alignment/software/
  MBE 30:772-780 (2013), NAR 30:3059-3066 (2002)
------------------------------------------------------------------------------
High speed:
  % mafft in > out
  % mafft --retree 1 in > out (fast)

High accuracy (for <~200 sequences x <~2,000 aa/nt):
  % mafft --maxiterate 1000 --localpair  in > out (% linsi in > out is also ok)
  % mafft --maxiterate 1000 --genafpair  in > out (% einsi in > out)
  % mafft --maxiterate 1000 --globalpair in > out (% ginsi in > out)

If unsure which option to use:
  % mafft --auto in > out

--op # :         Gap opening penalty, default: 1.53
--ep # :         Offset (works like gap extension penalty), default: 0.0
--maxiterate # : Maximum number of iterative refinement, default: 0
--clustalout :   Output: clustal format, default: fasta
--reorder :      Outorder: aligned, default: input order
--quiet :        Do not report progress
--thread # :     Number of threads (if unsure, --thread -1)
--dash :         Add structural information (Rozewicki et al, submitted)

Any other recommendation on another strategy to align multiple denovo assembled genomes with multiple contigs each are welcome

**Tags:** phylogenetics, fasta, sam, multiple-sequence-alignment
> **Comments:**
> **username_1**: Thanks its a very good question, for alignments MAFFT in very recent history was the optimal aligner on 2 criteria.  
> **username_2**: Were you able to resolve your issue? And which tool did you use? I have a similar problem, though the number of sequences I have to align are in the thousands.  
> **username_0**: @Raghuram in the end I just loaded the .bam files into [artemis](https://www.sanger.ac.uk/tool/artemis/) and inspected the regions of interest. Looking at the depth, I could inspect the presence/ absence of the genes I wanted to detect.  

---

## 4 answers

### Answer by username_3 on 2022-06-29. Score: 2

[MUMmer4](https://github.com/mummer4/mummer) is a versatile alignment tool for DNA and protein sequences. It supports one reference genome and up to 32 query genomes. MUMmer4 will align every contig in each genome to the reference genome.

> **Comments:**
> **username_0**: do you concatenate all query genomes in one fasta file? If so, how does MUMmer identify which contig belongs to which genome? Based on a header identifier, for example?  
> **username_3**: @BCArg I did not concatenate all query genomes in one fasta file.  
> **username_0**: @ForrestVigor does it support anything like `nucmer -p <prefix> ref.fa qry1.fa qry2.fa ... qryn.fa` ? on the [help page](https://github.com/mummer4/mummer) *it reads <query> specifies the multi-FastA sequence file that contains the query sequences, to be aligned with the references*  
> **username_3**: @BCArg Yes. You can use `mummer ref.fa qry1.fa qry2.fa ...`  

---

### Answer by username_0 on 2022-11-17. Score: 2

in the end, I just loaded the `.bam` files into [artemis](https://www.sanger.ac.uk/tool/artemis/) and, by inspecting the depth (heat-map), I could check which samples had the genes I was looking for:

[![enter image description here](https://i.sstatic.net/U2PqZ.png)](https://i.sstatic.net/U2PqZ.png)


---

### Answer by username_4 on 2022-07-03. Score: 2

If you have a reference genome (or are willing to designate one of your de novo assemblies a reference), you may find [QUAST](http://quast.sourceforge.net/quast.html) helpful.

QUAST will perform an alignment of all genomes against the reference genome and use that as the basis for comparisons. I believe that [under the hood it is running minimap2](https://github.com/ablab/quast/blob/master/quast_libs/minimap2/minimap2.1) for this purpose.

It includes a large-scale alignment viewer ("[Icarus](http://quast.sourceforge.net/quast.html)") to investigate possible differences within contigs, computes high-level statistics on genome completeness/etc, and has other handy features.

You can see the [most recent QUAST paper](https://academic.oup.com/bioinformatics/article/34/13/i142/5045727?login=false) or the [manual](http://quast.sourceforge.net/docs/manual.html) for more information.

> **Comments:**
> **username_0**: thanks for the comment, though I am looking for a program to perform the multi-sequence alignment, not to visualise the alignment, for which purpose QUAST is indeed excellent  
> **username_4**: @BCArg QUAST will generate the alignment. Updating answer accordingly.  
> **username_0**: @Maximillian Press you are right, and obviously it makes sense that Quast needs to perform the alignment to evaluate/ compare two assemblies. Will explore it further  

---

### Answer by username_5 on 2022-06-29. Score: 1

It won't work on more than 3 genomes at a time, but SynMap3D from the Comparative Genomics webserver (<https://genomevolution.org/coge/>) should do the trick. I'm mentioning it here because the advantage, for me (in contrast to, say, Mauve), was user-friendliness.

Small note: Be mindful of what you name your uploaded samples. You can set your sequence not to be publicly available, but if you give it a new name, as opposed to a species name already in the database, that will be visible.

> **Comments:**
> **username_0**: thanks, though I am looking for a MS aligner that supports > 3 sequences  

---

