多语言展示
当前在线:112今日阅读:22今日分享:22

Human Gene Functions(JAVA版)

Given two genes AGTGATG and GTTAG, how similar are they? One of the methods to measure the similarity of two genes is called alignment. In an alignment, spaces are inserted, if necessary, in appropriate positions of the genes to make them equally long and score the resulting genes according to a scoring matrix. For example, one space is inserted into AGTGATG to result in AGTGAT-G, and three spaces are inserted into GTTAG to result in –GT--TAG. A space is denoted by a minus sign (-). The two genes are now of equal length. These two strings are aligned: AGTGAT-G -GT--TAG In this alignment, there are four matches, namely, G in the second position, T in the third, T in the sixth, and G in the eighth. Each pair of aligned characters is assigned a score according to the following scoring matrix.
工具/原料
1

eclipse-luna-32

2

win732bit and jdk1.7

3

DELL 显示器

4

QQ截图工具

方法/步骤
1

算法分析

2

相似度得分计算主要功能:

3

辅助函数1:

4

辅助函数2

5

测试main函数:

6

运行结果:

7

增加功能:

8

输出结果:

注意事项
1

如果一直出现数组越界的问题就要单步调试

2

认真检查程序中的递增递减变量的符号是否正确?

3

谢谢支持

推荐信息