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

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

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

時間:2024-05-24  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



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










 

掃一掃在手機打開當前頁
  • 上一篇:代寫CS373 COIN、代做Python設計程序
  • 下一篇:CSSE7030代做、代寫Python程序設計
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務-企業(yè)/產品研發(fā)/客戶要求/設計優(yōu)化
    有限元分析 CAE仿真分析服務-企業(yè)/產品研發(fā)
    急尋熱仿真分析?代做熱仿真服務+熱設計優(yōu)化
    急尋熱仿真分析?代做熱仿真服務+熱設計優(yōu)化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發(fā)動機性能
    挖掘機濾芯提升發(fā)動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現(xiàn)代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現(xiàn)代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
  • 短信驗證碼 目錄網 排行網

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

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

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

          9000px;">

                亚洲精品国产欧美在线观看| 在线观看一区二区三区视频| 午夜精品福利在线视频| 一级片在线免费观看视频| 国产又爽又黄免费软件| 天天躁日日躁狠狠躁伊人| www.久久精品.com| 日韩精品无码一区二区| 国产成人在线综合| 一区二区三区视频网| 后入内射欧美99二区视频| 中文字幕在线观看2018| 六月婷婷综合网| aaa一区二区三区| 神马久久久久久久久久久| 国产精品成人免费一区二区视频| 五月天中文字幕在线| 国产一区二区波多野结衣| 亚洲精品一区二区三区区别| 欧洲一级黄色片| 国产精品午夜影院| 亚洲国产日韩欧美在线观看| 蜜桃福利午夜精品一区| 成人精品在线看| 最新中文字幕2018| 熟妇人妻中文av无码| 精品国产免费观看| 成年人网站av| 亚洲国产天堂av| 色婷婷av一区二区三| 精品区在线观看| 国产suv精品一区二区33| 伊人影院综合网| 日本高清黄色片| 精品影片一区二区入口| 懂色av成人一区二区三区| 在线观看精品国产| 日本中文字幕久久| 久久久精品国产sm调教网站| 国产成人亚洲欧洲在线| 亚洲天堂国产视频| 五月婷婷一区二区三区| 欧美日韩 一区二区三区| 国产区二区三区| www.av免费| 一二三四区在线| 最近日本中文字幕| 在线观看国产一级片| 天堂а√在线中文在线鲁大师| 久青草视频在线观看| 国产又黄又粗视频| 国产精品视频中文字幕| av在线免费在线观看| 亚洲图片欧美在线| 亚洲精品视频大全| 最近免费中文字幕大全免费版视频 | 久久久一二三区| 亚洲欧美日韩一二三区| 五月婷婷开心中文字幕| 青青草免费观看视频| 欧美特级黄色片| 欧美日韩中文视频| 亚洲高清无码久久| 91精品人妻一区二区三区蜜桃欧美| 五月婷婷色丁香| 天天干天天爽天天射| 神马午夜一区二区| 网站一区二区三区| 亚洲成年人av| 中文字幕无人区二| 中文字幕在线看高清电影| 中文字幕在线播放一区| 亚洲精品97久久中文字幕| 最新国产黄色网址| 夜夜爽久久精品91| 波多野结衣不卡视频| 高潮毛片无遮挡| 国产小视频在线观看免费| 国产午夜精品久久久久久久久| 国产区在线观看视频| 韩国视频一区二区三区| 久久精品无码一区| 日本天堂网在线观看| 天天综合网久久| 中文字幕永久在线| 97久久人国产精品婷婷| 福利视频第一页| 黄色av网站免费在线观看| 久久久久亚洲天堂| 日韩福利小视频| 在线 丝袜 欧美 日韩 制服| 最新版天堂资源在线| av大片在线免费观看| 国产露脸国语对白在线| 美女久久久久久久久久| 手机看片一区二区| 亚洲精品乱码久久久久久动漫 | 青青操国产视频| 五月天中文字幕| 亚洲综合20p| 国产又粗又猛又爽又| 欧美视频xxx| 永久免费未满蜜桃| 成人免费黄色av| 女教师高潮黄又色视频| 一区二区三区欧美精品| 变态另类丨国产精品| 久久人妻少妇嫩草av蜜桃| 五月婷婷综合激情网| 91成人在线免费视频| 精品黑人一区二区三区在线观看 | 欧美88888| 中文字幕剧情在线观看| 91影院在线播放| 男女性高潮免费网站| 国产麻豆剧传媒精品国产| 国产亚洲成人av| 亚洲欧美一区二区三区在线观看 | 午夜影院免费体验区| 国产伦精品一区二区免费| 亚洲av无码一区二区三区dv| 久久久久99精品成人| www.夜夜爽| 男人午夜免费视频| 亚洲熟妇无码av| 国产又黄又粗又猛又爽的视频| 天堂а√在线中文在线鲁大师| 91麻豆一区二区| 免费黄视频在线观看| 亚洲精品视频网| 久久久精品人妻无码专区| 中文字幕第三页| 精品国产www| 亚洲精品77777| 另类小说第一页| 一级黄色高清视频| 欧美日韩一区二区区别是什么| 亚洲欧洲日本精品| 免费黄在线观看| 99在线观看免费| 日韩精品久久久久久久的张开腿让 | 欧美专区第二页| av片免费播放| 丝袜美腿小色网| 国产三级在线观看视频| 这里只有久久精品视频| 久久久久国产精品夜夜夜夜夜| 亚洲网中文字幕| 日本美女视频网站| 国产精品露脸视频| 中文字幕久久网| 青青青在线视频| 国产精品999久久久| 中文字幕亚洲欧洲| 人妻激情偷乱频一区二区三区| www.四虎在线| 一区二区三区 日韩| 久久精品国产亚洲AV熟女| 91麻豆一区二区| 一区二区三区视频免费看| 免费成人美女女在线观看| 高h视频免费观看| 亚洲高清视频免费观看| 秋霞午夜鲁丝一区二区| 国产情侣激情自拍| 91福利视频免费观看| 五月天婷婷激情视频| 欧美成人aaa片一区国产精品| 国产成人久久久久| 一级特黄aaa大片| 亚洲 自拍 另类 欧美 丝袜| 欧美激情一区二区三区免费观看| 国产精品v日韩精品v在线观看| 亚洲美女综合网| 婷婷五月综合久久中文字幕| 蜜桃在线一区二区| 国产精品国产三级国产专区52| 亚洲天堂黄色片| 伊人网免费视频| 天堂www中文在线资源| 欧美日韩综合一区二区三区| 国产在线免费看| 国产精品久久久久久在线| av资源免费观看| 亚洲va综合va国产va中文| 精品国产免费久久久久久婷婷| 怡红院av久久久久久久| 911av视频| av网站在线不卡| 色婷婷视频在线| 久久发布国产伦子伦精品| 一本色道久久亚洲综合精品蜜桃| 久久人妻免费视频| 国产成人在线免费视频| 中文字幕日本人妻久久久免费| 狠狠躁夜夜躁人人爽天天高潮| 中文字幕男人天堂| 日本视频www| 国产一区二区三区在线视频观看| 日本视频免费观看|