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

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

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號線
  • 短信驗證碼 trae 豆包網頁版入口 目錄網 排行網

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

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

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

          9000px;">

                久久99国内精品| 色悠悠久久综合| 天天操天天综合网| 成熟亚洲日本毛茸茸凸凹| 欧美日本精品一区二区三区| 亚洲高清视频的网址| 91精品在线一区二区| 国产成人av在线影院| 亚洲一区二区欧美激情| 悠悠色在线精品| 日本大香伊一区二区三区| 国产超碰在线一区| 中文字幕+乱码+中文字幕一区| av爱爱亚洲一区| 5566中文字幕一区二区电影| 成人精品免费看| 一本久久综合亚洲鲁鲁五月天| 欧美a级一区二区| 日韩精品亚洲一区| 亚洲精品成人少妇| 亚洲午夜在线电影| 99久久伊人久久99| 精品一区二区三区在线播放 | 日韩一二三四区| 韩国精品一区二区| 亚洲va国产va欧美va观看| 日韩精品91亚洲二区在线观看| 国产精品免费视频一区| 欧美高清你懂得| 91丨九色丨黑人外教| 成人动漫视频在线| 激情图区综合网| 一区二区三区高清| 91精品国产91热久久久做人人| 91网上在线视频| 91亚洲国产成人精品一区二区三| 91色porny在线视频| 丁香激情综合国产| av一二三不卡影片| 99精品国产99久久久久久白柏| 国产久卡久卡久卡久卡视频精品| 成人网页在线观看| 国产91综合一区在线观看| 日产国产高清一区二区三区| 日韩视频免费观看高清在线视频| 国产一区二区三区精品欧美日韩一区二区三区| 亚洲高清视频中文字幕| 日本韩国一区二区三区| 久久成人久久鬼色| 欧美视频中文一区二区三区在线观看| 91视频国产观看| 91久久久免费一区二区| 欧美一卡2卡3卡4卡| 久久人人爽人人爽| 亚洲一区二区视频在线观看| 视频一区视频二区中文| 秋霞国产午夜精品免费视频| 日韩欧美综合在线| 日韩一区二区电影在线| 亚洲国产成人在线| 日本欧美久久久久免费播放网| 日韩和的一区二区| 成人黄色网址在线观看| 成人少妇影院yyyy| 欧美精品久久一区| 蜜臂av日日欢夜夜爽一区| 一本到不卡免费一区二区| 在线一区二区三区做爰视频网站| 欧美精品一区二区在线观看| 亚洲天堂网中文字| 欧美aⅴ一区二区三区视频| 色哟哟亚洲精品| 欧美大度的电影原声| 中文字幕在线一区二区三区| 国产一区二区精品久久99| 99精品视频在线播放观看| 国产成人综合网站| 欧美大尺度电影在线| 中文字幕一区在线观看视频| 国产成人免费视频精品含羞草妖精 | 欧美性受xxxx| 精品粉嫩超白一线天av| 偷偷要91色婷婷| 激情国产一区二区| 欧美一区二区三级| 亚洲欧美一区二区久久| 久久机这里只有精品| 日韩亚洲欧美成人一区| 亚洲综合色区另类av| 精品一区二区三区香蕉蜜桃| 欧美日本国产视频| 中文字幕精品一区二区三区精品 | 精品久久人人做人人爱| 亚洲激情六月丁香| 在线观看三级视频欧美| 中文字幕日韩精品一区| 久久精品国产久精国产爱| 亚洲欧美日韩精品久久久久| 国产综合色视频| 337p亚洲精品色噜噜噜| 日本欧美加勒比视频| 91福利视频久久久久| 国产女人aaa级久久久级| 国产999精品久久久久久绿帽| 精品国产亚洲在线| 国产一区二区电影| 美女网站色91| 日本中文字幕一区| 欧美激情艳妇裸体舞| 91精品蜜臀在线一区尤物| 日韩美女精品在线| 国产午夜一区二区三区| 日本电影欧美片| 亚洲精品在线三区| 91精品国产综合久久婷婷香蕉 | 国产日本欧美一区二区| caoporn国产精品| www.亚洲免费av| 国产精品免费久久久久| 3751色影院一区二区三区| 精品一区二区影视| 国产欧美一区二区精品性色 | 亚洲欧美综合另类在线卡通| 亚洲私人黄色宅男| 亚洲色图在线视频| 亚洲图片欧美一区| 久久免费视频一区| 国产电影一区在线| 亚洲成国产人片在线观看| 欧美自拍丝袜亚洲| 成人欧美一区二区三区黑人麻豆| 欧美日韩国产免费一区二区| 天天av天天翘天天综合网| 日本一区二区三区四区在线视频| 日本视频在线一区| 久久精品欧美日韩精品| 99在线视频精品| 午夜成人免费视频| 欧美老肥妇做.爰bbww视频| 日韩成人精品在线| 欧美日韩黄视频| 91麻豆成人久久精品二区三区| 亚洲第一搞黄网站| 国产精品高清亚洲| 欧美日韩在线播放三区| 九九国产精品视频| 日韩精品久久理论片| 国产喷白浆一区二区三区| 欧美亚男人的天堂| 老司机免费视频一区二区三区| 中文字幕一区二区三区精华液| 99久久99久久久精品齐齐 | 国产欧美一区二区精品性色超碰 | 不卡av电影在线播放| 久久国产视频网| 亚洲精品中文字幕在线观看| 国产精品天天看| 欧美成人欧美edvon| 在线观看亚洲一区| 色欧美88888久久久久久影院| 精彩视频一区二区三区| 青青草97国产精品免费观看 | 日日夜夜一区二区| 国产精品久久久99| 日日嗨av一区二区三区四区| 亚洲一卡二卡三卡四卡五卡| 国产日韩欧美一区二区三区综合| 精品国产91九色蝌蚪| 欧美日韩美女一区二区| www.日韩在线| 色婷婷久久一区二区三区麻豆| 国产成人免费av在线| 国产91精品在线观看| 国产精品一区二区三区网站| 亚洲天堂久久久久久久| 91丝袜美女网| 亚洲欧美视频在线观看视频| 91片在线免费观看| 中文字幕亚洲在| 成人一道本在线| 日韩免费一区二区| 日韩一级免费观看| 一区二区视频在线看| 色www精品视频在线观看| 亚洲免费大片在线观看| 欧美色爱综合网| 国模无码大尺度一区二区三区| 国产午夜精品一区二区三区视频| 成人av在线播放网址| 亚洲动漫第一页| 日韩午夜激情免费电影| 午夜婷婷国产麻豆精品| 久久中文字幕电影| 欧美体内she精高潮| 国产激情一区二区三区| 亚洲三级在线观看| www.亚洲人| caoporn国产精品| 在线观看免费亚洲| 91精品国产91久久久久久最新毛片|