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. (An explanation of how the tree is encoded is given at the beginning of the next section). A 9 2 12 (11 4 10 (13) 5 14 15) C 7 A 8
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. (An explanation of how the tree is encoded is given at the beginning of the next section). A 9 2 12 (11 4 10 (13) 5 14 15) C 7 A 8
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, provide a thorough code in python
![# 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 = {
15: ['N',{"node": 14, "branch": 0.02}, {"node": 8, "branch": 1.1}],
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():
Q =
np. full ((4,4), 0.25)
np.fill_diagonal (Q,-.75)
Q/0.75
return Q
#Initialize rate matrix
Q = JC69 ( )
# Answer](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F183197c4-4ed3-4535-8fe2-afbff38e7abd%2F3b0c9b74-a34a-4e3c-9799-b4c542162132%2F31wj9f_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 = {
15: ['N',{"node": 14, "branch": 0.02}, {"node": 8, "branch": 1.1}],
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():
Q =
np. full ((4,4), 0.25)
np.fill_diagonal (Q,-.75)
Q/0.75
return Q
#Initialize rate matrix
Q = JC69 ( )
# Answer
![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. (An explanation of how the
tree is encoded is given at the beginning of the next section).
A
1
9
с
2
с
3
(12)
(11)
C
4
(10)
(13)
G
5
(14)
C
6
15
C
7
A
8](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F183197c4-4ed3-4535-8fe2-afbff38e7abd%2F3b0c9b74-a34a-4e3c-9799-b4c542162132%2Fwwua0gq_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. (An explanation of how the
tree is encoded is given at the beginning of the next section).
A
1
9
с
2
с
3
(12)
(11)
C
4
(10)
(13)
G
5
(14)
C
6
15
C
7
A
8
Expert Solution

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 2 steps

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
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education