Please note: this is the second time I'm posting this question because the first one I received a wrong answer. I would like a new workable code that solves the problem. Please use the tree defined in the code and write a function that solves the problem. Please don't copy the old code on Bartleby and send it to me. It doesn't work or solve the problem. I will upvote if you write a new workable code that solves the problem. Please note: the goal is not to construct a tree but to calculate the posterior probabilities
Please note: this is the second time I'm posting this question because the first one I received a wrong answer. I would like a new workable code that solves the problem. Please use the tree defined in the code and write a function that solves the problem. Please don't copy the old code on Bartleby and send it to me. It doesn't work or solve the problem. I will upvote if you write a new workable code that solves the problem. Please note: the goal is not to construct a tree but to calculate the posterior probabilities
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Please note: this is the second time I'm posting this question because the first one I received a wrong answer. I would like a new workable code that solves the problem. Please use the tree defined in the code and write a function that solves the problem. Please don't copy the old code on Bartleby and send it to me. It doesn't work or solve the problem. I will upvote if you write a new workable code that solves the problem.
Please note: the goal is not to construct a tree but to calculate the posterior probabilities
![Use the tree, observed states at the leaves, branch lengths and the JC69, calculate the posterior probability of [A,G,C,T] at node 15.
A
с
G
C
1
3
5
7
9
с
2
(12)
(11)
C
4
(10)
(13)
(14)
с
6
15
A
8](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F183197c4-4ed3-4535-8fe2-afbff38e7abd%2F02dc950b-3a7d-45de-b7ac-23682d8f8111%2Fcfmx64f_processed.png&w=3840&q=75)
Transcribed Image Text:Use the tree, observed states at the leaves, branch lengths and the JC69, calculate the posterior probability of [A,G,C,T] at node 15.
A
с
G
C
1
3
5
7
9
с
2
(12)
(11)
C
4
(10)
(13)
(14)
с
6
15
A
8
![# Use this character state vector indicating
# the nucleotide at leaf nodes 1-8
sitel=["A","c","c","c","G","C","C","A"]
# Use this tree structure
tree4 {
"branch": 1.1}],
15: ['N', { "node": 14, "branch": 0.02}, {"node" : 8,
14: ['N', { "node": 13, "branch": 0.11}, {"node": 7, "branch": 1.2}],
13: ['N',{"node": 12, "branch": 0.12}, {"node": 6, "branch": 0.8}],
12: ['N',{"node": 11, "branch": 0.64}, {"node": 9, "branch": 0.11}],
11: ['N', { "node": 3, "branch": 0.26}, {"node": 10, "branch": 0.24}],
10: ['N', { "node": 4, "branch": 0.02}, {"node": 5, "branch": 0.08}],
9: ['N',{"node": 1, "branch": 0.4}, {"node": 2, "branch": 0.6}]
}
for i in range(1, 9):
tree4[i] = ['L']
#JC69 model to generate Q matrix
def JC69():
np. full ((4,4), 0.25)
np. fill_diagonal (0,-.75)
Q
Q/0.75
return Q
#Initialize rate matrix
JC69 ( )
# Answer](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F183197c4-4ed3-4535-8fe2-afbff38e7abd%2F02dc950b-3a7d-45de-b7ac-23682d8f8111%2Fqvtx8mm_processed.png&w=3840&q=75)
Transcribed Image Text:# Use this character state vector indicating
# the nucleotide at leaf nodes 1-8
sitel=["A","c","c","c","G","C","C","A"]
# Use this tree structure
tree4 {
"branch": 1.1}],
15: ['N', { "node": 14, "branch": 0.02}, {"node" : 8,
14: ['N', { "node": 13, "branch": 0.11}, {"node": 7, "branch": 1.2}],
13: ['N',{"node": 12, "branch": 0.12}, {"node": 6, "branch": 0.8}],
12: ['N',{"node": 11, "branch": 0.64}, {"node": 9, "branch": 0.11}],
11: ['N', { "node": 3, "branch": 0.26}, {"node": 10, "branch": 0.24}],
10: ['N', { "node": 4, "branch": 0.02}, {"node": 5, "branch": 0.08}],
9: ['N',{"node": 1, "branch": 0.4}, {"node": 2, "branch": 0.6}]
}
for i in range(1, 9):
tree4[i] = ['L']
#JC69 model to generate Q matrix
def JC69():
np. full ((4,4), 0.25)
np. fill_diagonal (0,-.75)
Q
Q/0.75
return Q
#Initialize rate matrix
JC69 ( )
# Answer
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education