Post

WFA groups semi-global/overlap/extension into 'ends free', which makes sense to me. (In fact I should add that to the fig somehow.) Wasn't aware that semi-global is also used fo the general thing. I replaced {global-ext, ext} by {ext, local-ext}, since the global one makes more sense / is simpler.

x.comx.com

I like the 'ends free' term! That feels like a much better descriptor than semi-global. Thanks for the twitter link too, that's helpful to see. I wonder why parasail chose to implement a "dynamic" semi-global instead of implementing all the different specific combinations.

I thought about it a bit more, and actually I think that in practice, ends-free is not actually a catch-all. Rather, it's the case where relatively short ends are free, so that the problem is still sufficiently similar to global alignment.

Ohhh, tell me more about clipping penalties! I think that's exactly what I'm trying to formalize more in the semi-global chapter, and I haven't really seen any formal treatment of this so far. Like, one idea (that's easy and I already implemented) is to replace free ends by eg cost-0.5-per-char 1/

by simply alternating edges of cost 0 and 1 along the edges. The ratio of 0 and 1 can also make more fine-grained clipping-costs. This can also replace a fixed cut-off length by just a fixed cost along the *entire* edge. Do you happen to know some papers on this?

It seems that clipping is something everyone does, but nobody cares to elaborate and define it properly. I always assumed clipping was a cost-per-char, but it seems to rather be a fixed cost. Is there a max clipping length? What does minimap do? Someone lift the taboo?

I’d always thought of clipping as a post-main alignment step, which I think is how BWA describes it as well? rust-bio is abnormal (to me) for how it describes clipping, which really just sounds like a fixed cost gap open penalty is what they actually mean.

The idea is that you may be mapping 10kb reads onto a many MB genome, but the reads have noisy ends due to ONT sequencing. So you preferably align them fully, but for a cost, you can skip say the last 100 characters. But it's slightly weird to me that this cost is fixed instead of variable.

It does seem odd given the strong justification for affine gap scores inter-sequence. Maybe there’s some justification in that the read end gaps aren’t usually “biological” but often due to an artifact of some sort.

I think what BWA describes is what rust-bio does: indeed a fixed "end-gap" cost to the end (without variable part). Given such a cost model, it really is a part of the alignment. The post processing is simply to not report the end-gap, but that's independent of the alignment itself right