加勒比久久综合,国产精品伦一区二区,66精品视频在线观看,一区二区电影

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

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仿真分析服務-企業/產品研發/客戶要求/設計優化
    有限元分析 CAE仿真分析服務-企業/產品研發
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
  • 短信驗證碼 目錄網 排行網

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

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

    国产一区国产二区国产三区| 日本午夜一区| 日韩三区免费| sdde在线播放一区二区| 亚洲人成亚洲精品| 老司机精品视频网| 精品伊人久久久| 日韩亚洲一区在线| 成人在线视频你懂的| 伊人久久av| 婷婷综合久久| 国产主播性色av福利精品一区| 影音先锋亚洲精品| 午夜欧美精品| 成人台湾亚洲精品一区二区| 亚洲伦伦在线| 蜜桃精品在线| 午夜亚洲一区| 欧美大黑bbbbbbbbb在线| 麻豆91在线播放| 婷婷综合视频| 清纯唯美亚洲经典中文字幕| 久久99高清| 你懂的亚洲视频| 免费在线播放第一区高清av| 日韩免费久久| 欧美激情欧美| 免费亚洲电影在线| 日韩最新av| 美女久久99| 日本免费一区二区三区四区| 久久精品1区| 午夜日韩影院| 日韩成人免费电影| 国产精品一在线观看| 欧美亚洲日本精品| 久久蜜桃av| 欧美交a欧美精品喷水| 日本一区二区三区播放| 国产午夜精品一区在线观看| 色天天综合网| 99久久影视| 少妇精品导航| 加勒比中文字幕精品| 欧美aaa在线| 一区二区91| 日本伊人午夜精品| 日韩高清不卡在线| 欧美韩国日本在线观看| 麻豆成人在线| 蜜臀av在线播放一区二区三区| 在线亚洲成人| 老司机精品导航| 蜜臂av日日欢夜夜爽一区| 99国产精品自拍| 精品国产不卡| 精品国产乱码久久久久久果冻传媒 | 亚洲综合色站| 韩国三级大全久久网站| 国产亚洲字幕| 日韩激情在线观看| 欧美aaa在线| 日韩高清欧美| 老鸭窝91久久精品色噜噜导演| 国产精品美女| 蜜桃一区二区三区在线观看| 亚洲午夜精品久久久久久app| 在线日韩av| 国产成人福利av| 老牛精品亚洲成av人片| 国产精品午夜一区二区三区| 偷拍自拍亚洲色图| 国内揄拍国内精品久久| 免费一二一二在线视频| 国产成人精品一区二区三区免费| 丝袜亚洲另类欧美综合| 在线日本制服中文欧美| 91欧美极品| 激情另类综合| 99久久精品网| 午夜影院日韩| 亚洲欧洲午夜| 免费久久99精品国产| 一本大道色婷婷在线| 日本系列欧美系列| 亚洲精品777| 亚洲美女炮图| 日本欧美国产| 丝袜亚洲精品中文字幕一区| 日韩伦理精品| 国产高潮在线| 日日夜夜一区二区| 日韩丝袜视频| 亚洲小说区图片区| 日本久久精品| 蜜桃91丨九色丨蝌蚪91桃色 | 成人自拍视频| 久久激情av| 亚洲一区观看| 亚洲视频成人| 亚洲精品1区| 欧美综合久久| 99久久亚洲精品蜜臀| 亚洲深爱激情| 另类激情亚洲| 亚洲mmav| 国产成人短视频在线观看| 91麻豆精品| 欧洲一区在线| 国产最新精品| 伊人久久大香伊蕉在人线观看热v| 亚洲精品极品| 国产精品xxxav免费视频| 一本色道久久综合亚洲精品高清 | 日本女优在线视频一区二区| 99精品中文字幕在线不卡| 黄色av一区| 美女网站久久| 免费一级片91| 午夜天堂精品久久久久| 色综合久久中文| 碰碰在线视频| 国产精品久久久久久妇女| 久久精品理论片| 一区二区三区四区精品视频| 第四色中文综合网| 蜜臀av一区二区在线免费观看| 日本中文字幕一区| 99精品视频精品精品视频| 都市激情亚洲一区| av成人亚洲| 亚洲精品观看| 91精品秘密在线观看| 日韩欧美高清| 麻豆国产精品一区二区三区| 亚洲精品九九| 成人短片线上看| 国产精品久久777777毛茸茸| 中文字幕一区二区av| 日韩欧美久久| а√天堂中文在线资源8| 久久精品国产久精国产爱| 99精品美女视频在线观看热舞| 国产在线成人| 欧美丰满日韩| 日韩精品免费一区二区夜夜嗨| 精品久久97| 99riav1国产精品视频| 成人一区二区| 日韩精品视频在线看| 91嫩草亚洲精品| 亚洲精品色图| 91久久综合| 国产精品亚洲二区| 蜜桃视频第一区免费观看| 欧美在线精品一区| 婷婷成人综合| 欧美a级一区二区| av成人黄色| 日韩一级电影| 欧美天天视频| 一区二区蜜桃| 91精品国偷自产在线电影| 成人亚洲一区二区| 日本成人中文字幕| 中文字幕一区二区三区四区久久| 欧美xxxxx视频| 国产成人福利夜色影视| 亚洲午夜在线| 欧美一区二区三区婷婷| 日本欧美韩国国产| 狠狠入ady亚洲精品经典电影| 综合激情网站| 一呦二呦三呦国产精品| 国产精品观看| 国产精品精品| 91精品一区二区三区综合在线爱| 日韩福利视频网| 精品在线网站观看| 中文在线аv在线| 精品无人区一区二区| 日本va欧美va欧美va精品| 日韩精品一级二级 | 视频一区日韩| 欧美一区成人| 精品亚洲免a| 一区二区三区四区电影| 亚洲黑丝一区二区| 综合亚洲自拍| 国产欧美在线观看免费| 大陆精大陆国产国语精品| 久久精品国产99国产| 精品国产日韩欧美| 日韩欧美午夜| 九一成人免费视频| 青青青伊人色综合久久| 老牛国产精品一区的观看方式| 国产成人夜色高潮福利影视| 在线观看一区| 自拍视频亚洲|