<p>The <a href="https://bioconductor.org/packages/release/bioc/html/msa.html" rel="nofollow noreferrer">‹msa› package on Bioconductor</a> does exactly that.</p>

<p>It doesn’t hand the results on a silver platter, though: you’ll need to <a href="https://bioconductor.org/packages/devel/bioc/vignettes/msa/inst/doc/msa.pdf" rel="nofollow noreferrer">read the vignette</a> carefully to learn how to use it. But after that it’s pretty powerful.</p>

CC BY-SA 4.0
2020-08-25T22:05:33.843Z
"It doesn’t hand the results on a silver platter", that is very true, but some boiler plate code would go a long way since many request the same functionality from a same set of functions
Vass
CC BY-SA 3.0
2017-08-03T09:31:47.057Z
2017-08-03T09:31:47.057Z
Konrad Rudolph
<p>I want to incorporate Multiple sequence alignment into our Shiny app, i.e. allow the possibility of selecting different nucleotide sequences, and do a multiple sequence alignment in real-time. The user would define as input different nt. sequences and then a tree will pop up in the app. Do you think this is feasible?</p>

<p>Any recommendations and feedback are really appreciated :)</p>

CC BY-SA 3.0
2017-08-03T09:15:15.303Z
What do you mean by “tree”? Trees don’t really make sense for pairwise alignments.
Konrad Rudolph
CC BY-SA 3.0
2017-08-03T09:21:16.060Z
I agree with Konrad Rudolph, trees don't make sense with pairwise alignments. There is a pairwiseAlignment function in the Biostring package though, the writePairwiseAlignments funtion can show the alignment.
benn
CC BY-SA 3.0
2017-08-03T09:29:16.290Z
I mixed up terms here, I meant multiple sequences alignment not pairwise. I have edited the question, sorry about that!
Sergio Arredondo
CC BY-SA 3.0
2017-08-04T09:41:45.023Z
@b.nota Pairwise alignments could be used to compute distances, and a tree could be made from the distance matrix.
bli
CC BY-SA 3.0
2017-08-04T10:54:50.190Z
@bli Yes, but does it make sense?
benn
CC BY-SA 3.0
2017-08-04T13:22:57.937Z
@b.nota I think that in theory, a multiple alignment is more apt to capture relevant homologies. So if the tree is meant to represent the phylogeny of the sequences, multiple alignment is theoretically better. That said, there might be practical reasons for which one would have to work with pairwise distances instead.
bli
CC BY-SA 3.0
2017-08-04T13:27:45.370Z
@bli, okay thanks for your thoughts. I do still agree, however, with Konrad that trees for pairwise alignments don't really make sense.
benn
CC BY-SA 4.0
2020-08-25T22:10:41.220Z
@SergioArredondo, as the question is closed I cannot provide an answer, but a relevant newer question provides a MWE that shows an outline for the situations where the nucleotides are stored in an msf format, but that can be changed accordingly as other formats can be specified `https://bioinformatics.stackexchange.com/a/14160/9311` (and real time is tricky given some of the datasets can be large)
Vass
<r><phylogenetics>
Multiple sequence alignment with R
# Multiple sequence alignment with R

(Asked by: username_0 on 2017-08-03)

I want to incorporate Multiple sequence alignment into our Shiny app, i.e. allow the possibility of selecting different nucleotide sequences, and do a multiple sequence alignment in real-time. The user would define as input different nt. sequences and then a tree will pop up in the app. Do you think this is feasible?

Any recommendations and feedback are really appreciated :)

**Tags:** r, phylogenetics
> **Comments:**
> **username_1**: What do you mean by “tree”? Trees don’t really make sense for pairwise alignments.  
> **username_2**: I agree with Konrad Rudolph, trees don't make sense with pairwise alignments. There is a pairwiseAlignment function in the Biostring package though, the writePairwiseAlignments funtion can show the alignment.  
> **username_0**: I mixed up terms here, I meant multiple sequences alignment not pairwise. I have edited the question, sorry about that!  
> **username_3**: @b.nota Pairwise alignments could be used to compute distances, and a tree could be made from the distance matrix.  
> **username_2**: @bli Yes, but does it make sense?  
> **username_3**: @b.nota I think that in theory, a multiple alignment is more apt to capture relevant homologies. So if the tree is meant to represent the phylogeny of the sequences, multiple alignment is theoretically better. That said, there might be practical reasons for which one would have to work with pairwise distances instead.  
> **username_2**: @bli, okay thanks for your thoughts. I do still agree, however, with Konrad that trees for pairwise alignments don't really make sense.  
> **username_4**: @SergioArredondo, as the question is closed I cannot provide an answer, but a relevant newer question provides a MWE that shows an outline for the situations where the nucleotides are stored in an msf format, but that can be changed accordingly as other formats can be specified `https://bioinformatics.stackexchange.com/a/14160/9311` (and real time is tricky given some of the datasets can be large)  

---

## 1 answers

### Answer by username_1 on 2017-08-03. Score: 4

The [‹msa› package on Bioconductor](https://bioconductor.org/packages/release/bioc/html/msa.html) does exactly that.

It doesn’t hand the results on a silver platter, though: you’ll need to [read the vignette](https://bioconductor.org/packages/devel/bioc/vignettes/msa/inst/doc/msa.pdf) carefully to learn how to use it. But after that it’s pretty powerful.

> **Comments:**
> **username_4**: "It doesn’t hand the results on a silver platter", that is very true, but some boiler plate code would go a long way since many request the same functionality from a same set of functions  

---

