Answers.Body: <p>Beast (and probably Beast2) will do this for the terminal node in a phylogeny. You can't supply the tree, it will need to calculate the tree and again it's only for the terminal node. Thus if you want the ancestral sequences to ABC you must only supply ABC, if ABC form a monophyly against D then you'd get the sequence for ABCD ancestor. Where this option is in the point and click world of Beast, I don't remember, I don't particularly want to go and wade through the program unless I'm actively using it. I seem to remember that computationally this isn't trivial.</p>
  <p>Paml did this far better, but this is an old algorithm and again I cant remember the options required.</p>
  <p><a href="https://rdrr.io/cran/ape/man/ace.html" rel="nofollow noreferrer">ACE (Ancestral Character Estimation)</a> in R may be exactly what you are looking for however. This is what I'd recommend in this instance because its much easier to use than &quot;a hidden option in a package, so much so that the person answering can't remember where it is&quot;.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-12-20T18:45:18.700Z
Answers.Text: Thank you, helpful
Answers.UserDisplayName: Ben S.
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-12-19T02:02:43.133Z
Answers.LastActivityDate: 2024-12-19T02:02:43.133Z
Answers.UserDisplayName: M__
Body: <p>Most of the tree software I can find assumes that you want to <em>generate</em> a tree given some sequence or character data. I want to assume that I already <em>know</em> the true tree (using NCBI's taxonomy), and then given some aligned (and very short region) sequence data for modern species, reconstruct the ancestral sequence at each node using maximum parsimony, and display the whole thing (ideally with sequence changes highlighted).</p>
  <p>Toy example: I know a priori that that the species tree is (A, (B,C)) and that the state of A is CGCG, the state of B is CGCG, and the state of C is CGCC. Then I want to infer the state of the node representing the common ancestor of A, B, and C, which in this case would be by maximum parsimony CGCG. Then I want to display the whole tree with the inferred ancestral sequence shown.</p>
  <p>I just don't know where to start (slightly unfamiliar sub-field). Looking for suggestions for software, software packages, etc to go about doing this. Thanks for any advice!</p>
  
Tags: <phylogenetics><phylogeny>
Title: Reconstructing and displaying ancestral sequences given an existing phylogenetic tree
ThreadText: # Reconstructing and displaying ancestral sequences given an existing phylogenetic tree
  
  (Asked by: username_0 on 2024-12-19)
  
  Most of the tree software I can find assumes that you want to *generate* a tree given some sequence or character data. I want to assume that I already *know* the true tree (using NCBI's taxonomy), and then given some aligned (and very short region) sequence data for modern species, reconstruct the ancestral sequence at each node using maximum parsimony, and display the whole thing (ideally with sequence changes highlighted).
  
  Toy example: I know a priori that that the species tree is (A, (B,C)) and that the state of A is CGCG, the state of B is CGCG, and the state of C is CGCC. Then I want to infer the state of the node representing the common ancestor of A, B, and C, which in this case would be by maximum parsimony CGCG. Then I want to display the whole tree with the inferred ancestral sequence shown.
  
  I just don't know where to start (slightly unfamiliar sub-field). Looking for suggestions for software, software packages, etc to go about doing this. Thanks for any advice!
  
  **Tags:** phylogenetics, phylogeny
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-12-19. Score: 1
  
  Beast (and probably Beast2) will do this for the terminal node in a phylogeny. You can't supply the tree, it will need to calculate the tree and again it's only for the terminal node. Thus if you want the ancestral sequences to ABC you must only supply ABC, if ABC form a monophyly against D then you'd get the sequence for ABCD ancestor. Where this option is in the point and click world of Beast, I don't remember, I don't particularly want to go and wade through the program unless I'm actively using it. I seem to remember that computationally this isn't trivial.
  
  Paml did this far better, but this is an old algorithm and again I cant remember the options required.
  
  [ACE (Ancestral Character Estimation)](https://rdrr.io/cran/ape/man/ace.html) in R may be exactly what you are looking for however. This is what I'd recommend in this instance because its much easier to use than "a hidden option in a package, so much so that the person answering can't remember where it is".
  
  > **Comments:**
  > **username_0**: Thank you, helpful  
  
  ---
  
  