Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
9 | 2 | 4 | 0.967 | block |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 9 | 417 | Bio/pairwise2.py |
2 | 6 | 426 | Bio/pairwise2.py |
| ||||
# Align the first residue in sequenceB to the ith residue in # sequence A. This is like opening up i gaps at the beginning # of sequence B. score = match_fn(sequenceA[i],sequenceB[0]) if penalize_end_gaps: score+=calc_affine_penalty(i,open_B,extend_B,penalize_extend_when_opening) score_matrix[i][0] = score |
| ||||
score = match_fn(sequenceA[0],sequenceB[i]) if penalize_end_gaps: score+=calc_affine_penalty(i,open_A,extend_A,penalize_extend_when_opening) score_matrix[0][i] = score # In the generic algorithm, at each row and column in the score # matrix, we had to scan all previous rows and columns to see # whether opening a gap might yield a higher score. Here, since # we know the penalties are affine, we can cache just the best # score in the previous rows and columns. Instead of scanning # through all the previous rows and cols, we can just look at the # cache for the best one. Whenever the row or col increments, the # best cached score just decreases by extending the gap longer. # The best score and indexes for each row (goes down all columns). # I don't need to store the last row because it's the end of the # sequence. |
| |||
# Align the first residue in sequenceB to the ith residue in # sequence A. This is like opening up i gaps at the beginning # of sequence B. score = match_fn(sequenceA[ [[#variable30a82a60]]],sequenceB[ [[#variable30a829e0]]]) if penalize_end_gaps: score+=calc_affine_penalty(i, [[#variable30a82960]], [[#variable30a82900]],penalize_extend_when_opening) score_matrix[ [[#variable30a82a60]]][ [[#variable30a829e0]]] = score # In the generic algorithm, at each row and column in the score # matrix, we had to scan all previous rows and columns to see # whether opening a gap might yield a higher score. Here, since # we know the penalties are affine, we can cache just the best # score in the previous rows and columns. Instead of scanning # through all the previous rows and cols, we can just look at the # cache for the best one. Whenever the row or col increments, the # best cached score just decreases by extending the gap longer. # The best score and indexes for each row (goes down all columns). # I don't need to store the last row because it's the end of the # sequence. |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#30a82a60]] | i |
1 | 2 | [[#30a82a60]] | 0 |
2 | 1 | [[#30a829e0]] | 0 |
2 | 2 | [[#30a829e0]] | i |
3 | 1 | [[#30a82960]] | open_B |
3 | 2 | [[#30a82960]] | open_A |
4 | 1 | [[#30a82900]] | extend_B |
4 | 2 | [[#30a82900]] | extend_A |