99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

CS 369代做、代寫Python編程語言

時(shí)間:2024-05-24  來源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯(cuò)



CS 369 2024 Assignment 4
See Canvas for due dates
In the ffrst part of this assignment, we use a Hidden Markov Model to model secondary
structure in protein sequences and implement a couple of algorithms we saw in lectures.
In the second part, we simulate sequences down a tree according to the Jukes-Cantor
model then use distance methods to try to reconstruct the tree.
Write your code in Python and present your code embedded in a report in a Jupyter
Notebook. Make sure you test your code thoroughly and write clear, commented code
that others can understand.
Submit two ffles to Canvas: the .ipynb and .html both showing code and results by 10pm
on the due date.
There are 30 marks in total for this assessment.
1. [14 marks total] Suppose we wish to estimate basic secondary structure in protein
(amino acid) sequences. The model we consider is a simplistic rendition of the
model discussed in S C. Schmidler et al. (2004) Bayesian Segmentation of Protein
Secondary Structure, doi:10.1089/10665270050081496
We assume that at each point of the sequence, the residue is associated with one
of three secondary structures: α-helix, β-strand and loops which we label H, S
and T, respectively. To simplify the problem, we classify the amino acids as either
hydrophobic, hydrophilic or neutral (B, I or N, respectively) so a sequence can be
represented by this 3-letter alphabet.
In a α-helix, the residues are 15% neutral, 20% hydrophobic and 65% hydrophilic.
In a β-strand, they are 30%, 60%, 10% and in a loop they are 70%, 15%, 15%.
Assume that all secondary structures have geometrically distributed length with
α-helices having mean 15 residues, β-strands having a mean of 8 residues and loops
a mean of 6 residues. A β-strand is followed by an α-helix 40% of the time and a
loop 60% of the time. An α-helix is followed by a β-strand 30% of the time and a
loop 70% of the time and a loop is equally likely to be followed by a strand or a
helix. At the start of a sequence, any structure is equally likely.
When writing code below, work in natural logarithms throughout to make your
calculations robust to numerical error.
(a) [3 marks] Sketch a diagram of the HMM (a hand-drawn and scanned picture
is ffne). In your diagram, show only state nodes and transitions. Show the
emission probabilities using a separate table.
Note that the transition probabilities of states to themselves (e.g., aHH) are
not given. Derive them by noticing that you are given the expected lengths
of α-helices, β-strands and loops, and that if a quantity L is geometrically
distributed with parameter p then the expected value of L is E[L] = 1/p.
Make sure you use the correct parametrisation of the geometric distribution
1(noting that you can’t have a secondary structure of length 0) and remember
that
P
l
akl = 1 for any state k.
(b) [3 marks] Write a method to simulate state and symbol sequences of arbitrary
length from the HMM. Your method should take sequence length, and model
parameters (a and e) as arguments. Simulate and print out a state and symbol
sequence of length 200.
(c) [3 mark] Write a method to calculate the natural logarithm of the joint probability
P(x, π). Your method should take x, π, and model parameters as
arguments.
Use your method to calculate P(x, π) for π and x given below and for the
sequences you simulated in Q1b.
π = S,S,H,H,H,T,T,S,S,S,H,T,T,H,H,H,S,S,S,S,S,S
x = B,I,B,B,N,I,N,B,N,I,N,B,I,N,B,I,I,N,B,B,N,N
(d) [5 marks] Implement the forward algorithm for HMMs to calculate the natural
logarithm of the probability P(x). Your method should take x as an argument.
Note that we don’t model the end state here.
Use your method to calculate log(P(x)) for π and x given in Q1c and for the
sequences you simulated in Q1b.
How does P(x) compare to P(x, π) for the examples you calculated? Does
this relationship hold in general? Explain your answer.
22. [16 marks total] In this question you will write a method that simulates random
trees, simulates sequences using a mutation process on these trees, calculate a
distance matrix from the simulated sequences and then, using existing code, reconstruct
 the tree from this distance matrix.
(a) [5 marks] Write a method that simulates trees according to the Yule model
(described below) with takes as input the number of leaves, n, and the branching
 parameter, λ. Use the provided Python classes.
The Yule model is a branching process that suggests a method of constructing
trees with n leaves. From each leaf, start a lineage going back in time. Each
lineage coalesces with others at rate λ. When there k lineages, the total rate
of coalescence in the tree is kλ. Thus, we can generate a Yule tree with n
leaves as follows:
Set k = n,t = 0.
Make n leaf nodes with time t and labeled from 1 to n. This is the set of
available nodes.
While k > 1, iterate:
Generate a time tk ∼ Exp (kλ). Set t = t + tk.
Make a new node, m, with height t and choose two nodes, i and j,
uniformly at random from the set of available nodes. Make i and j
the child nodes of m.
Add m to the set of available nodes and remove i and j from this set.
Set k = k-1.
Simulate 1000 trees with λ = 0.5 and n = 10 and check that the mean height
of the trees (that is, the time of the root node) agrees with the theoretical
mean of 3.86.
Use the provided plot tree method to include a picture of a simulated tree
with 10 leaves and λ = 0.5 in your report. To embed the plot in your report,
include in the ffrst cell of your notebook the command %matplotlib inline
(b) [5 marks] The Jukes-Cantor model of DNA sequence evolution is simple:
each site mutates at rate µ and when a mutation occurs, a new base is chosen
uniformly at random from the four possible bases, {A, C, G, T}. If we ignore
mutations from base X to base X, the mutation rate is
3
4
µ. All sites mutate
independently of each other. A sequence that has evolved over time according
to the Jukes-Cantor model has each base equally likely to occur at each site.
The method mutate is provided to simulate the mutation process.
Write a method to simulate sequences down a simulated tree according to the
Jukes-Cantor model.
Your method should take a tree with n leaves, sequence length L, and a
mutation rate µ. It should return either a matrix of sequences corresponding
to nodes in the tree or the tree with sequences stored at the nodes.
3Your method should generate a uniform random sequence of length L at the
root node and recursively mutate it down the branches of the tree, using the
node heights to calculate branch length.
In your report, include a simulated tree with n = 10 and λ = 0.5 and a set
of sequences of length L = 20 and mutation parameter µ = 0.5 simulated on
that tree.
(c) [3 marks] Write a method to calculate the Jukes-Cantor distance matrix, d,
from a set of sequences, where dij is the distance between the ith and the
jth sequences. Recall that the Jukes-Cantor distance for sequences x and y
is deffned by
where fxy is the fraction of differing sites between x and y. Since we will be
dealing with short sequences, use the following deffnition of fxy so that the
distances are well-deffned:
fxy = min
where Dxy is the number of differing sites between x and y and L is the length
of x.
Include a simulated set of sequences of length L = 20 from the tree leaves and
corresponding distance matrix in your report for a tree with n = 10, λ = 0.5
and mutation parameter µ = 0.5.
(d) [3 marks] Now simulate a tree with n = 10 and λ = 0.5 and on that tree,
simulate three sets of sequences with lengths L = 20, L = 50 and L = 200,
respectively, with ffxed µ = 0.1. For each simulated set of sequences, calculate
the distance matrix and print it out.
Then reconstruct the tree using the provided compute upgma tree method.
Use the plot tree method to include a plot of the original tree and a plot of
the reconstructed tree for each distance matrix.
Comment on the quality of the reconstructions and the effect that increasing
the sequence length has on the accuracy of the reconstruction.

請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp










 

掃一掃在手機(jī)打開當(dāng)前頁
  • 上一篇:代寫CS373 COIN、代做Python設(shè)計(jì)程序
  • 下一篇:CSSE7030代做、代寫Python程序設(shè)計(jì)
  • 無相關(guān)信息
    合肥生活資訊

    合肥圖文信息
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計(jì)優(yōu)化
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計(jì)優(yōu)化
    出評 開團(tuán)工具
    出評 開團(tuán)工具
    挖掘機(jī)濾芯提升發(fā)動機(jī)性能
    挖掘機(jī)濾芯提升發(fā)動機(jī)性能
    海信羅馬假日洗衣機(jī)亮相AWE  復(fù)古美學(xué)與現(xiàn)代科技完美結(jié)合
    海信羅馬假日洗衣機(jī)亮相AWE 復(fù)古美學(xué)與現(xiàn)代
    合肥機(jī)場巴士4號線
    合肥機(jī)場巴士4號線
    合肥機(jī)場巴士3號線
    合肥機(jī)場巴士3號線
    合肥機(jī)場巴士2號線
    合肥機(jī)場巴士2號線
    合肥機(jī)場巴士1號線
    合肥機(jī)場巴士1號線
  • 短信驗(yàn)證碼 豆包 幣安下載 AI生圖 目錄網(wǎng)

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
    ICP備06013414號-3 公安備 42010502001045

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          9000px;">

                9191国产精品| 亚洲欧美在线视频| 亚洲精品免费视频| 色综合婷婷久久| 一区二区三国产精华液| 欧美性三三影院| 喷水一区二区三区| 国产日韩欧美精品电影三级在线| 国产宾馆实践打屁股91| 亚洲午夜一区二区| 久久久精品欧美丰满| 91亚洲男人天堂| 日本成人在线一区| 亚洲欧美综合在线精品| 337p亚洲精品色噜噜噜| 不卡一区在线观看| 免费av成人在线| 综合久久综合久久| 欧美成人性福生活免费看| 91欧美一区二区| 美腿丝袜亚洲色图| 亚洲欧美日韩中文字幕一区二区三区| 日韩一区二区三区在线观看| 99热这里都是精品| 久久99热99| 亚洲国产sm捆绑调教视频| 欧美激情一二三区| 欧美变态凌虐bdsm| 91精品国产一区二区| 色综合 综合色| 岛国一区二区在线观看| 蜜臀av性久久久久蜜臀av麻豆| 亚洲美女电影在线| 国产精品九色蝌蚪自拍| 久久一留热品黄| 欧美一三区三区四区免费在线看 | 亚洲一区二区三区美女| 日韩精品中文字幕在线一区| 色婷婷亚洲一区二区三区| 国产剧情av麻豆香蕉精品| 亚洲www啪成人一区二区麻豆| 国产精品久久久久影院老司 | 亚洲亚洲精品在线观看| 欧美国产乱子伦 | 久久久久久综合| 日韩你懂的电影在线观看| 欧美日本在线一区| 精品视频在线免费看| 在线观看网站黄不卡| 日本久久一区二区三区| av成人动漫在线观看| 成人免费va视频| 白白色亚洲国产精品| 成人激情视频网站| 成人av先锋影音| 成人美女视频在线看| 成人小视频免费在线观看| 国产在线不卡视频| 精品无人码麻豆乱码1区2区 | 国产精品成人一区二区三区夜夜夜| 久久精品视频免费观看| 国产成人午夜精品影院观看视频| 亚洲免费av高清| 亚洲一区二区欧美日韩 | 亚洲高清免费在线| 日韩精品福利网| 国产在线精品一区二区三区不卡| 精品无人区卡一卡二卡三乱码免费卡| 精一区二区三区| 成人动漫一区二区| 欧美性大战久久| 日韩一级免费观看| 国产精品入口麻豆九色| 亚洲综合精品自拍| 九九视频精品免费| 99久久久久久| 欧美一区二区三区视频| 国产农村妇女毛片精品久久麻豆 | **性色生活片久久毛片| 亚洲第一在线综合网站| 国产综合久久久久久久久久久久| av综合在线播放| 欧美日本高清视频在线观看| 精品成人佐山爱一区二区| 自拍偷自拍亚洲精品播放| 丝袜a∨在线一区二区三区不卡| 国产一区二区三区| 色婷婷精品大在线视频| 日韩精品一区二区三区四区| 日本一区二区动态图| 天堂av在线一区| 99精品欧美一区二区三区综合在线| 欧美一级黄色录像| 亚洲色图欧洲色图| 国内精品不卡在线| 欧美日韩精品高清| 亚洲四区在线观看| 日本成人在线电影网| 99精品国产99久久久久久白柏| 日韩视频一区二区三区在线播放| 中文一区二区完整视频在线观看 | 久久国产夜色精品鲁鲁99| 99国产欧美久久久精品| 久久综合九色综合欧美就去吻| 亚洲乱码一区二区三区在线观看| 国产精品一级在线| 7777精品伊人久久久大香线蕉超级流畅 | 中文字幕欧美区| 狠狠久久亚洲欧美| 91麻豆精品国产自产在线 | 欧美日韩激情一区二区三区| 欧美国产欧美亚州国产日韩mv天天看完整 | 综合色天天鬼久久鬼色| 国产精品正在播放| 日韩午夜av一区| 手机精品视频在线观看| 精品视频全国免费看| 亚洲三级小视频| 不卡av免费在线观看| 国产目拍亚洲精品99久久精品| 国内外成人在线视频| 欧美成人a在线| 精品在线观看视频| 久久久精品国产免费观看同学| 狠狠色综合日日| 中文字幕免费观看一区| 不卡欧美aaaaa| 中文字幕一区二区视频| 不卡欧美aaaaa| 亚洲精品免费一二三区| 欧美视频精品在线| 日本免费新一区视频| 久久欧美中文字幕| 成人av电影在线| 亚洲柠檬福利资源导航| 精品视频免费看| 日韩在线a电影| 2024国产精品| 91在线免费播放| 亚洲午夜日本在线观看| 欧美日韩欧美一区二区| 青草国产精品久久久久久| 欧美大胆人体bbbb| 丁香婷婷综合网| 亚洲素人一区二区| 91精品国产aⅴ一区二区| 国产精品一区二区三区网站| 国产精品不卡一区| 欧美日韩成人一区二区| 国内精品国产成人| 中文字幕中文字幕在线一区 | 免费人成精品欧美精品| 欧美精品一区二区三区高清aⅴ| 黑人巨大精品欧美一区| 国产精品久久久久天堂| 99精品视频一区二区三区| 亚洲午夜国产一区99re久久| 欧美精品aⅴ在线视频| 日韩成人免费看| 国产精品毛片久久久久久| 91美女福利视频| 婷婷成人综合网| 国产精品毛片a∨一区二区三区| 欧美主播一区二区三区| 国产白丝网站精品污在线入口| 亚洲精品大片www| 2020国产精品| 欧美午夜精品久久久久久超碰| 麻豆中文一区二区| 亚洲乱码国产乱码精品精98午夜 | 国产日韩精品久久久| 欧美日韩免费一区二区三区视频| 久久99精品国产.久久久久久| ...xxx性欧美| 国产午夜精品在线观看| 欧美日韩二区三区| av欧美精品.com| 国产91精品在线观看| 亚洲永久精品国产| 国产欧美精品一区| 日韩精品自拍偷拍| 欧美视频一区二| 91免费视频网址| 国产精品一二三四区| 蜜臀av国产精品久久久久| 亚洲欧洲制服丝袜| 国产精品素人视频| 26uuu国产日韩综合| 日韩欧美国产一二三区| 欧美狂野另类xxxxoooo| 91国偷自产一区二区三区成为亚洲经典 | 亚洲精品乱码久久久久久| 2023国产精华国产精品| 欧美成人一区二区三区片免费 | 国产一区在线精品| 久久国产精品色| 久久精品理论片| 人人爽香蕉精品| 蜜桃传媒麻豆第一区在线观看| 青青青爽久久午夜综合久久午夜|