国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

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

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程序設計
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務 管路
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真技術服務
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲勞振動
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲
    流體cfd仿真分析服務 7類仿真分析代做服務40個行業
    流體cfd仿真分析服務 7類仿真分析代做服務4
    超全面的拼多多電商運營技巧,多多開團助手,多多出評軟件徽y1698861
    超全面的拼多多電商運營技巧,多多開團助手
    CAE有限元仿真分析團隊,2026仿真代做咨詢服務平臺
    CAE有限元仿真分析團隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 寵物飼養 十大衛浴品牌排行 suno 豆包網頁版入口 目錄網 排行網

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

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

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    国产高清在线一区二区| 精品少妇人妻av一区二区| 欧美一区二区三区四区在线 | 成人在线观看a| 91久久久久久久久久| 国产精品一区二区欧美| 国产精品手机在线| 欧美一区二区三区免费视| 国产一区在线播放| 日韩在线视频播放| 春色成人在线视频| 国产一区在线观| 国产成人精品久久久| 国产精品成人免费视频| 欧美最猛性xxxx| 久久综合精品一区| 伊人久久99| 国产偷久久久精品专区| 91av视频在线免费观看| 国产精品久久在线观看| 日本公妇乱淫免费视频一区三区| 国产精品一区电影| 国产精品福利观看| 今天免费高清在线观看国语| 俺也去精品视频在线观看| 水蜜桃亚洲精品| 国产精品av电影| 亚洲午夜精品一区二区| 精品欧美一区二区在线观看视频| 国产二区视频在线| 亚洲精品国产一区| av免费观看久久| 中文字幕一区二区三区四区五区| 黄色高清视频网站| www.日韩欧美| 热久久免费国产视频| 久久精品中文字幕一区二区三区| 亚洲综合视频一区| 国产免费一区二区三区在线能观看 | 懂色中文一区二区三区在线视频| 国产日韩亚洲欧美| 国产精品久久久久久久7电影 | 日韩精品欧美一区二区三区| 91国产一区在线| 午夜精品一区二区三区在线视频 | 9a蜜桃久久久久久免费| 欧美黄网免费在线观看| 国产精品香蕉视屏| 宅男在线精品国产免费观看| 国产美女99p| 一区二区精品在线| 97久久精品人搡人人玩| 亚洲伊人久久综合| 国产精品香蕉av| 成人免费毛片播放| 中文字幕免费高| 久久网站免费视频| 黄色免费观看视频网站| 一区二区不卡视频| 精品国产欧美一区二区三区成人| 国产系列第一页| 日本伊人精品一区二区三区介绍| 国产精品网站视频| 99在线视频首页| 欧美精品亚洲| 亚洲美女网站18| 久久九九免费视频| 波多野结衣久草一区| 日韩在线电影一区| 国产精品久久久久久久久电影网| 国产精品一区二区久久| 日韩免费视频播放| 在线不卡视频一区二区| 久久久久99精品久久久久| 成人av播放| 黄色特一级视频| 亚洲精品欧美日韩专区| 国产精品福利在线观看| 国产成人在线一区二区| 国产乱人伦真实精品视频| 欧洲成人在线视频| 亚洲视频欧美在线| 国产精品久久久久久久久久三级| 97公开免费视频| 国产又大又硬又粗| 日韩精品视频久久| 亚洲一区精彩视频| 欧美精品一区二区免费| 国产成人精品视频免费看| 91精品综合久久久久久五月天| 精品免费一区二区三区蜜桃| 污污污污污污www网站免费| 国产精品电影一区| 日韩中文字幕av| 久久久成人精品一区二区三区| 国产日韩视频在线观看| 欧美在线观看网址综合| 天天综合色天天综合色hd| 国产精品免费小视频| 久久精品国产综合精品| 91精品国产自产在线观看永久| 国产综合 伊人色| 欧洲中文字幕国产精品| 欧美一区二区三区艳史| 亚洲国产成人不卡| 永久久久久久| 欧美日韩aaaa| 久久6精品影院| 国产精品第100页| 国产精品入口芒果| 国产精品无码电影在线观看| 日日骚av一区| 久久久久久亚洲精品不卡 | 国产精品久久成人免费观看| 少妇精69xxtheporn| 国产盗摄视频在线观看| 久久久婷婷一区二区三区不卡| 国产啪精品视频网站| 国产三级精品在线不卡| 福利视频久久| www.av毛片| 97国产在线视频| 91精品久久久久久久久久| av在线免费观看国产| www久久99| 97久久精品国产| 99久热re在线精品视频| 99视频免费观看| 久久久婷婷一区二区三区不卡 | 欧美久久久久久一卡四| 欧美精品无码一区二区三区| 欧美精品久久久久久久久久久| 欧美日韩一区二区三区电影| 免费中文日韩| 国产一区二区丝袜| 国产美女久久精品香蕉69| 不卡中文字幕在线| 91国在线高清视频| 久久久之久亚州精品露出| 国产freexxxx性播放麻豆| 久久久久久久久久久久久9999| 日韩中文在线不卡| 久久国产精彩视频| 一区二区三区欧美在线| 亚洲制服中文| 欧美一级片久久久久久久| 青青草原av在线播放| 激情综合网俺也去| 国产精品一区二区性色av| 69国产精品成人在线播放| 国产h视频在线播放| 久久久国产视频91| 麻豆乱码国产一区二区三区| 精品国产免费人成电影在线观...| 久久久久久国产精品三级玉女聊斋| 亚洲精品无码久久久久久| 欧洲在线视频一区| 国产日韩欧美综合精品| 国产精品99导航| 国产精品爽爽爽爽爽爽在线观看| 久精品免费视频| 色乱码一区二区三区熟女| 欧美极品欧美精品欧美图片| 国产精品亚洲自拍| 国产妇女馒头高清泬20p多| 日韩视频中文字幕| 精品国产乱码久久久久久蜜柚| 亚洲成人网上| 青草青草久热精品视频在线网站| 国产这里只有精品| 91精品国产91久久久久青草| 久久久国产成人精品| 中文字幕成人一区| 日本欧洲国产一区二区| 蜜桃精品久久久久久久免费影院 | 国产精品国产亚洲精品看不卡15| 亚洲熟妇无码另类久久久| 欧美在线一级va免费观看| 成人毛片100部免费看| 日韩中文字幕网| 亚洲人成人77777线观看| 男人亚洲天堂网| 91美女片黄在线观| 国产精品电影观看| 日本免费黄视频| 国产精自产拍久久久久久蜜| 国产成人精品一区二区在线| 中文字幕一区二区三区四区五区人 | 91免费国产精品| 国产精品乱码一区二区三区| 亚洲在线免费视频| 免费99视频| 久久久久久久久久码影片| 一区二区三区四区久久| 欧美高清中文字幕| 久热国产精品视频一区二区三区| 久久97久久97精品免视看| 欧美日韩二三区| 久久久国内精品| 亚洲熟妇无码一区二区三区导航|