Skip to content

LoL-align: probability scoring, output, clustering and CI - #595

Open
lasseReifenrath wants to merge 1 commit into
steineggerlab:masterfrom
lasseReifenrath:master
Open

LoL-align: probability scoring, output, clustering and CI#595
lasseReifenrath wants to merge 1 commit into
steineggerlab:masterfrom
lasseReifenrath:master

Conversation

@lasseReifenrath

Copy link
Copy Markdown
Contributor

Add the LoL-align alignment mode (--alignment-type 3) end to end:

  • Homology-probability classifier (LoLAlignProbability) with a 39-feature MLP; store the probability in result.score (*10000) and the normalized LoL-score in result.eval.
  • tmalign.cpp: self-hit handling for the LoL-align path.
  • convertalis: register --alignment-type (forwarded by easy-search) and rescale score back to [0,1] on output for the bits/prob/raw columns, the default and empty format-output tab, BLAST+len (-m 2) and HTML (-m 3). SAM (-m 1) stays on the bit-score path.
  • StructureCluster: dispatch --alignment-type 3 in the cascaded clustering workflow (main alignment + reassignment steps).
  • Regression: bump submodule to the updated LoL-align search targets (SFAM 0.448889, FOLD 0.27193).
  • mac-arm64 CI: install rust via rustup.rs (Homebrew rustup no longer ships rustup-init) and export cargo to PATH for the block_aligner build.
  • README: add the LoL-align publication and document the new parameters.

@sooyoung-cha

Copy link
Copy Markdown
Collaborator

Hello! Did you mean to upload the .gitignore file as well?

@lasseReifenrath

Copy link
Copy Markdown
Contributor Author

No, this was by mistake

@martin-steinegger

Copy link
Copy Markdown
Collaborator

@lasseReifenrath could remove the .gitignore please? Also const bool isLolAlign = (par.alignmentType == LocalParameters::ALIGNMENT_TYPE_LOLALIGN); would it make sense that this should be an extended db type?

…--blocklen fixes

Add the LoL-align alignment mode (--alignment-type 3) end to end and make it
robust for block lengths other than the default 16.

Alignment mode:
- Homology-probability classifier (LoLAlignProbability) with a 39-feature MLP;
  store the probability in result.score (*10000) and the normalized LoL-score
  in result.eval.
- tmalign.cpp: self-hit handling for the LoL-align path.
- convertalis: register --alignment-type (forwarded by easy-search) and rescale
  score back to [0,1] on output for the bits/prob/raw columns, the default and
  empty format-output tab, BLAST+len (-m 2) and HTML (-m 3). SAM (-m 1) stays on
  the bit-score path.
- StructureCluster: dispatch --alignment-type 3 in the cascaded clustering
  workflow (main alignment + reassignment steps).
- Regression: bump submodule to the updated LoL-align search targets
  (SFAM 0.448889, FOLD 0.27193).
- mac-arm64 CI: install rust via rustup.rs (Homebrew rustup no longer ships
  rustup-init) and export cargo to PATH for the block_aligner build.
- README: add the LoL-align publication and document the new parameters.

Non-default --blocklen crash fixes (heap corruption / segfault), all in the
FwBw/LoLAlign block path:

1. Anchor buffers were sized with the unpadded max sequence length, but the
   blocklen-padded max_targetLen is passed to initQuery as maxTLen and bounds the
   anchor-zeroing loop. When blocklen padded past the real max length (e.g. 32/64),
   the loop wrote past anchorQuery/anchorTarget and corrupted the heap. Size the
   LoLAlign buffers with the padded max_targetLen.

2. The FwBw SIMD kernel pads each block to a multiple of VECSIZE_FLOAT, so a block
   length that is not a multiple of VECSIZE_FLOAT overran the per-block buffers
   (blocklen 17, 63). Round the requested block length up to VECSIZE_FLOAT.

3. When the forward-backward posterior overflows to all-zeros (maxP == 0, only at
   pathologically large block lengths), recover the alignment the way the
   refinement phase does: raise the temperature (which shrinks the score exponents
   back into float range) and re-run the FwBw until a usable posterior is found,
   giving up past temperature 30 (initScoreMatrix is re-called each retry because
   it divides the score matrix by the temperature). An empty-anchor bail-out plus
   bounds guards on the neighborhood loop and alignStartAnchors act as a fallback
   so the sentinel-0 seed can never index out of bounds.

Also register --blocklen on the lolalign command so it can actually be set.

Verified valgrind-clean for block lengths 1-512; the healthy range (16/32/64) is
numerically unchanged (blocklen-16 output byte-identical), and block lengths that
previously produced all-zero posteriors (>= ~80 on ~150-residue proteins) now
recover full results.
@lasseReifenrath

Copy link
Copy Markdown
Contributor Author

I removed the gitignore, and I will check out the db type Idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants