Closed huanglangwen closed 4 years ago
Let me push first and then edit my version since I half-addressed this.
score
would just be the highest entry in the similarity matrix, correct? @huanglangwen
What is pos
?
score
would just be the highest entry in the similarity matrix, correct? @huanglangwen What ispos
?
Yes, score
is the maximum of the matrix and pos
is the position of the first matched position in sequenceB.
0 0 0 0 0 0 0 0 0
0 0 3 1 0 0 0 3 3
0 0 3 1 0 0 0 3 6
0 3 1 6 4 2 0 1 4
0 3 1 4 9 7 5 3 2
0 1 6 4 7 6 4 8 6
0 0 4 3 5 10 8 6 5
0 0 2 1 3 8 *13* 11 9
0 3 1 5 4 6 11 10 8
0 1 0 3 2 7 9 8 7
Maximum is 13 @ (7, 6)
G(GTTGAC)TA // sequence A
T(GTT-AC)GG // sequence B
@huanglangwen So pos
would be 7?
@spaceben No, it would be 2 (at the beginning of the matched seq).
Ah understood.
But a 1-based counter (not the usual 0-based)?
Ah understood. ...
@spaceben Currently, it is 1 based. might due to consistency with the POS in SAM file? @hanyao8
Yes, the POS taken from SAM is 1-based
I think we should make some improvements for
LocalAligner
API. Currently, we need 4 steps to actually get the alignment result and we can't get aligned string through public API. Also, we can't specify score function and gap function.So, it might be better to put alignment process (calculateScore) in initialization phase and provide an API to have access to the aligned string (some wrappers of
concensus_a/b
):As a result, the signature of
LocalAligner
would be