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

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

CS 369代做、代寫(xiě)Python編程語(yǔ)言

時(shí)間:2024-05-24  來(lái)源:合肥網(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.

請(qǐng)加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp










 

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

    合肥圖文信息
    流體仿真外包多少錢(qián)_專(zhuān)業(yè)CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢(qián)_專(zhuān)業(yè)CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務(wù) 管路流場(chǎng)仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務(wù) 管路
    流體CFD仿真分析_代做咨詢服務(wù)_Fluent 仿真技術(shù)服務(wù)
    流體CFD仿真分析_代做咨詢服務(wù)_Fluent 仿真
    結(jié)構(gòu)仿真分析服務(wù)_CAE代做咨詢外包_剛強(qiáng)度疲勞振動(dòng)
    結(jié)構(gòu)仿真分析服務(wù)_CAE代做咨詢外包_剛強(qiáng)度疲
    流體cfd仿真分析服務(wù) 7類(lèi)仿真分析代做服務(wù)40個(gè)行業(yè)
    流體cfd仿真分析服務(wù) 7類(lèi)仿真分析代做服務(wù)4
    超全面的拼多多電商運(yùn)營(yíng)技巧,多多開(kāi)團(tuán)助手,多多出評(píng)軟件徽y1698861
    超全面的拼多多電商運(yùn)營(yíng)技巧,多多開(kāi)團(tuán)助手
    CAE有限元仿真分析團(tuán)隊(duì),2026仿真代做咨詢服務(wù)平臺(tái)
    CAE有限元仿真分析團(tuán)隊(duì),2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內(nèi)
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗(yàn)證碼 豆包網(wǎng)頁(yè)版入口 破天一劍 目錄網(wǎng) 排行網(wǎng)

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

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

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    男人天堂手机在线视频| 久久久在线观看| 欧美在线3区| 亚洲一区免费看| 欧美精品一区二区三区免费播放 | 中文精品视频一区二区在线观看| 久久这里只有精品23| 蜜桃在线一区二区三区精品| 免费在线黄网站| 久久久国产一区二区三区| 国产精品久久久久久久久免费| 日韩少妇内射免费播放| 国产免费黄视频| 精品乱码一区| 国产一级黄色录像片| 国产精品国产三级国产专区51| 黄色片免费在线观看视频| 久久视频在线观看免费| 欧美精品一区免费| 国产精品日韩一区二区| 激情小视频网站| 欧美成aaa人片免费看| 国产日韩欧美91| 一区二区三区一级片| 99久久免费国| 日韩高清av| 日韩一区二区久久久| 人人澡人人澡人人看欧美| 日韩亚洲第一页| 国内一区二区三区在线视频| 国产精品狠色婷| 国产精品永久免费观看| 亚洲午夜精品国产| 久久精品国产美女| 欧美日韩免费精品| 另类专区欧美制服同性| 成人精品一区二区三区电影黑人| 无码人妻h动漫| 久久精品国产欧美亚洲人人爽| 国模无码视频一区二区三区| 欧美片一区二区三区| 777久久精品一区二区三区无码| 日韩av高清在线播放| 国产黑人绿帽在线第一区| 欧洲精品在线一区| 久久伊人精品视频| 91国偷自产一区二区三区的观看方式 | 日本成人精品在线| 日韩在线观看精品| 国产资源在线视频| 亚洲色婷婷久久精品av蜜桃| 久久精品国产精品亚洲精品色| 青青草影院在线观看| 欧美精品在线免费播放| 91国产在线播放| 欧美亚洲伦理www| 欧美精品做受xxx性少妇| 亚洲欧洲国产日韩精品| 日本一区二区三区在线视频| 亚洲一区二区三区加勒比| 亚洲一区精彩视频| 日本欧美一级片| 日韩免费高清在线| 男人亚洲天堂网| 国产精品亚洲网站| 91精品中文在线| 日韩中文字幕网| 国产精品日韩一区二区三区| 国产aⅴ精品一区二区三区黄| 自拍另类欧美| 国严精品久久久久久亚洲影视| 亚洲日本精品一区| 国产免费久久av| 久久精品国产91精品亚洲| 国产精品九九九| 日韩精品第1页| 欧美亚洲国产日本| 日本不卡高字幕在线2019| 在线视频亚洲自拍| 日韩久久一级片| 国产99久久精品一区二区 夜夜躁日日躁| 91成人综合网| 秋霞成人午夜鲁丝一区二区三区| 欧美精品免费播放| 久久久久久久久久久久久久国产| 成人国产精品久久久久久亚洲| 秋霞久久久久久一区二区| 国产日韩专区在线| 日韩中文在线不卡| 婷婷五月色综合| 日本不卡一区二区三区四区| 国产女精品视频网站免费| 国产欧美日韩专区发布| 日韩视频免费在线观看| 欧美人与性动交| 91久久精品www人人做人人爽| 国内伊人久久久久久网站视频| 亚洲一区在线免费| 欧美精品一二区| 国产精品偷伦视频免费观看国产| 国产高清精品一区| av免费观看国产| 国语自产精品视频在线看一大j8| 日本不卡在线观看视频| 亚洲激情一区二区三区| 欧美激情视频网站| 久久国产精品99国产精| 国产精品三级一区二区| 精品国偷自产在线| 日韩有码在线观看| 久久久久这里只有精品| 久久精品视频16| 91精品国产九九九久久久亚洲 | 日韩av中文字幕第一页| 亚洲爆乳无码专区| 中文字幕一区二区三区在线乱码| 久热精品视频在线观看| 国产精品成人在线| 国产精品久久999| 久久天天躁狠狠躁老女人| 久久久国产一区| 国产精品-区区久久久狼| 久久久国产视频91| 精品国产自在精品国产浪潮| 国产成人无码一二三区视频| 久久久av网站| 欧美日韩国产二区| 国产日韩欧美视频| 日本欧美精品在线| 国产精品国产亚洲精品看不卡15| 国产传媒一区| 亚洲欧美日韩在线综合| 国产成人激情小视频| 国产三区二区一区久久| 日韩精品综合在线| 亚洲一区二区精品在线| 国产精品久久久久久久久久三级| 久久久久久久一| 日韩av日韩在线观看| 久久不射热爱视频精品| 久久久久久久久久网| 无码日韩人妻精品久久蜜桃| 日韩一级在线免费观看| 日韩一区在线视频| xxx一区二区| 国产精品久久一| 国产精品毛片一区视频| 欧美久久精品午夜青青大伊人| 国产主播在线一区| 国产成人啪精品视频免费网| 国产欧美亚洲视频| 国产精品午夜av在线| 91av在线不卡| 97精品国产91久久久久久| 国产成人综合亚洲| 国产精品视频中文字幕91| 欧美xxxx14xxxxx性爽| 亚洲伊人久久综合| 日韩av在线一区二区三区| 久久精品视频一| 久久久久中文字幕| 国产精品99免视看9| 久久天天东北熟女毛茸茸| 国产二区不卡| 色黄久久久久久| 精品无码一区二区三区爱欲| 日本高清久久一区二区三区| 中文字幕一区综合| 美女啪啪无遮挡免费久久网站| 亚洲欧洲日韩综合二区| 国产欧美日韩一区二区三区| 日本免费一区二区三区视频观看| 国产精品美女999| 午夜精品短视频| 日韩欧美国产免费| 国产不卡一区二区在线观看| 国产日韩在线免费| 欧美有码在线观看| 色狠狠久久av五月综合|| 精品中文字幕在线观看| 国产精品三区在线| 国产成人无码av在线播放dvd | 亚洲蜜桃av| 日韩欧美在线播放视频| 男人添女人下部视频免费| 成人久久精品视频| 神马国产精品影院av| 日本一区二区在线播放| 天堂精品一区二区三区| 97久久伊人激情网| 久久精品国产一区| 亚洲欧美综合一区| 蜜桃麻豆www久久国产精品| 不卡中文字幕在线| 国产精品久久久久久久app| 日本一区二区黄色| av一区二区在线看| 国产精品国产对白熟妇| 秋霞毛片久久久久久久久| 久久一区二区三区av|