合肥生活安徽新闻合肥交通合肥房产生活服务合肥教育合肥招聘合肥旅游文化艺术合肥美食合肥地图合肥社保合肥医院企业服务合肥法律

代写HIM3002、代做Python编程语言
代写HIM3002、代做Python编程语言

时间:2025-04-06  来源:合肥网hfw.cc  作者:hfw.cc 我要纠错



Tung Wah College
HIM3002: Computer Programming for Healthcare
Individual assignment: Finding Patterns in Sequence
Background
In Lecture 6, we learned the programming techniques in finding patterns in biological sequence, 
specifically finding fixed pattern and flexible pattern. In this tutorial exercise, you will have 
further practices in finding patterns in sequences. Name your file “T06_PatternAnalyser.py”. 
Task 1
Write a function that takes a sequence and an integer k as inputs. It returns True if the input 
sequence has repeated sub-sequence of size k, and False otherwise. Your function should be 
similar to that below.
def repeated_subseq(seq, k):
 """Return True if the sequence seq has repeated sub-sequence with size 
k and False otherwise"""
 # To be completed
print(repeated_subseq("ACGTAGAGGCGTATTAGCGT", 3))
print(repeated_subseq("ACGTAGAGGCGTATTAGCGT", 5))
The output is
True
False
Task 2
By making use of the function “re_all_match”, find the following patterns in the sequence.
a) A DNA pattern with four symbols, with “A” and “T” at the first and the last symbol, 
e.g., “AGGT”, “ACTT”.
b) A DNA pattern with at least two symbols, with “A” and “T” at the first and the last 
symbol, e.g., “AT”, “ACT”, “AGGGT”.
c) A DNA pattern with at least three symbols, with symbols “A” and “T” at the beginning 
and at the end, and any symbols except “C” in between, e.g., “AGAT”, “AAGT”, 
“AATGT” but not “ACGT”, assuming only “A”, “G”, “C” and “T” are in the sequence.
d) A protein pattern with 10 and 15 symbols, with “M” at the beginning and “D” at the 
end.
For example,
a) Sequence: AGGTAGTTTGACGTTACTG
Found pattern: AGGT located at 0
Found pattern: AGTT located at 4
Found pattern: ACGT located at 10
b) Sequence: AGGTGCAAGTGACGAACAAG
Found pattern: AGGTGCAAGT located at 0
Found pattern: AAGT located at 6
Found pattern: AGT located at 7
c) Sequence: AGGTGCAAGTGACGAACAAG
Found pattern: AGGT located at 0
Found pattern: AAGT located at 6
Found pattern: AGT located at 7
d) Sequence: 
CDEMECMEDDFEMECMEDDFEMECMEDDFEMECMEDDFEGHIEJMCEE
Found pattern: MECMEDDFEMECMED located at 3
Found pattern: MEDDFEMECMEDD located at 6
Found pattern: MECMEDDFEMECMED located at 12
Found pattern: MEDDFEMECMEDD located at 15
Found pattern: MECMEDDFEMECMED located at 21
Found pattern: MEDDFEMECMEDD located at 24


请加QQ:99515681  邮箱:99515681@qq.com   WX:codinghelp




 

扫一扫在手机打开当前页
  • 上一篇:代做MATH2110、Java/Python程序语言代写
  • 下一篇:代写COMP2017、代做python语言编程
  • 无相关信息
    合肥生活资讯

    合肥图文信息
    出评 开团工具
    出评 开团工具
    挖掘机滤芯提升发动机性能
    挖掘机滤芯提升发动机性能
    戴纳斯帝壁挂炉全国售后服务电话24小时官网400(全国服务热线)
    戴纳斯帝壁挂炉全国售后服务电话24小时官网
    菲斯曼壁挂炉全国统一400售后维修服务电话24小时服务热线
    菲斯曼壁挂炉全国统一400售后维修服务电话2
    美的热水器售后服务技术咨询电话全国24小时客服热线
    美的热水器售后服务技术咨询电话全国24小时
    海信罗马假日洗衣机亮相AWE  复古美学与现代科技完美结合
    海信罗马假日洗衣机亮相AWE 复古美学与现代
    合肥机场巴士4号线
    合肥机场巴士4号线
    合肥机场巴士3号线
    合肥机场巴士3号线
  • 上海厂房出租 短信验证码 酒店vi设计