Closed nh13 closed 6 years ago
ksw_align
: SSE local alignmentksw_extend
: one side extensionksw_global
: global alignmentksw is largely deprecated. ksw2 is generally the way to go, although some ksw functionality is missing from ksw2.
@attractivechaos thanks, it looks like ksw_extend
isn't working for the following:
query = GATTAC
target = AAAAGATTACAAAAA
It reports a query end of 2
(_qle
), target end of 1
(_tle
), and a score of 1
. I assume given it is "extend" the query start and end are both 0
. See the details below.
To me, it looks like it allows the alignment to start anywhere:
Thanks for any help you can offer.
Thanks for your help!
Extension is also called seed extension. You have to have a seed hit before calling it, or it won't give you meaningful result. Also, don't use ksw. Use ksw2.
I see, you don't feed the sequence after the seed, you feed in the sequence with the seed included.
ksw2
doesn't have local or glocal
. It was much easier to use ksw_local
, and adapt ksw_global
to create ksw_glocal
.
Local alignment is ok. ksw_global
is buggy and I have no plan to fix it. Don't use.
Forgot to say – ksw2 has a global alignment implementation, which is more correct.
Thanks Heng, this is great information. I will be porting over the global, extension, and glocal (an overloaded term) to use ksw2. The latter is the full query to a sub-sequence of the target, so I think I can just use global and trim off the start/end deletions.
I'll keep relying on klib's ksw_local
until such time that ksw2
has a local implementation.
Thanks for the quick responses and helpful insights as always.
@attractivechaos @lh3
I am trying to figure out the types of alignment based on the function names, guessing the following:
ksw_align
- local alignment: a sub-sequence of the query aligned to a sub-sequence of the targetksw_extend
- a prefix of the query aligned to a prefix of the target**ksw_global
- alignment of the full query to the full target**
doesn't behave this way, which is why I am askingAlso, I have a
ksw_glocal
implementation if you are looking for a contribution.