5

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 :)

gringer
  • 14,012
  • 5
  • 23
  • 79
  • 1
    What do you mean by “tree”? Trees don’t really make sense for pairwise alignments. – Konrad Rudolph Aug 03 '17 at 09:15
  • 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 Aug 03 '17 at 09:21
  • I mixed up terms here, I meant multiple sequences alignment not pairwise. I have edited the question, sorry about that! – Sergio Arredondo Aug 03 '17 at 09:29
  • @b.nota Pairwise alignments could be used to compute distances, and a tree could be made from the distance matrix. – bli Aug 04 '17 at 09:41
  • @bli Yes, but does it make sense? – benn Aug 04 '17 at 10:54
  • @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 Aug 04 '17 at 13:22
  • @bli, okay thanks for your thoughts. I do still agree, however, with Konrad that trees for pairwise alignments don't really make sense. – benn Aug 04 '17 at 13:27
  • @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 Aug 25 '20 at 22:10

1 Answers1

4

The ‹msa› package on Bioconductor does exactly that.

It doesn’t hand the results on a silver platter, though: you’ll need to read the vignette carefully to learn how to use it. But after that it’s pretty powerful.

Konrad Rudolph
  • 4,845
  • 14
  • 45
  • "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 Aug 25 '20 at 22:05