Skip to content

Add kegalign and ucsc_chainmergesort to the Mapping section - #1727

Open
richard-burhans wants to merge 7 commits into
galaxyproject:mainfrom
richard-burhans:kegalign-9fdb7d427703
Open

richard-burhans wants to merge 7 commits into
galaxyproject:mainfrom
richard-burhans:kegalign-9fdb7d427703

Conversation

@richard-burhans

@richard-burhans richard-burhans commented Sep 18, 2026

Copy link
Copy Markdown
Member

Installs Tool Shed revision 9fdb7d427703 of richard-burhans/kegalign on usegalaxy.org.

This revision carries three tools rather than one. batched_lastz and growler_lastz previously
lived in their own Tool Shed repositories; they share a scoring contract, a macro file and a file
format with kegalign, so they have been merged into a single repository. Installing this revision
therefore adds two tools alongside the kegalign upgrade:

tool version
kegalign 0.3.2+galaxy0 (was 0.3.1+galaxy0)
batched_lastz 1.04.52+galaxy3 (new id under this repository)
growler_lastz 1.04.52+galaxy1 (new)

kegalign 0.3.2 adds an optional collection output: instead of a tarball of LASTZ commands, it can
emit one gzipped segment file per chromosome pair plus the two .2bit files. growler_lastz is the
consumer for that shape, mapped over the collection. The existing tarball path is unchanged and
remains the default.

Superseded revisions that were never propagated here are skipped, per this repository's convention
of installing the latest installable revision only.

Installation sequence for tool-installers

  • Inspect the automatic Test tool installation summary for the expected changes
  • Merge this PR if the test installation succeeded
  • Inspect the post-merge Deploy tools to CVMFS summary and bot result comment

This revision adds two tools to the repository alongside kegalign
0.3.2+galaxy0: batched_lastz 1.04.52+galaxy3 and growler_lastz
1.04.52+galaxy1. The three share a scoring contract and a file format
and were previously maintained in separate Tool Shed repositories.
Richard Burhans added 2 commits September 19, 2026 09:26
Revision 9fdb7d427703 (numeric 19) is no longer the latest: 49249635e892
(numeric 20) was published on 2026-09-19 and carries the change this
install is most wanted for.

batched_lastz concatenates every per-command alignment into one gzip
stream at the end of its job, and that single write is ~62% of the job's
wall clock. Revision 19 does it at the zlib default of 6; revision 20 at
level 1. Measured on 1.69 GB of real alignment output: 18 MB/s against
137 MB/s.

Both revisions are listed, as the section already lists eleven others.
The two revisions were both listed. Revision 9fdb7d427703 (numeric 19)
has never been installed anywhere -- this pull request is what would
have installed it -- so there is no history or workflow depending on it,
and 49249635e892 (numeric 20) supersedes it in every tool:

  rev 19   batched_lastz 1.04.52+galaxy3   growler_lastz +galaxy1   kegalign 0.3.2+galaxy0
  rev 20   batched_lastz 1.04.52+galaxy4   growler_lastz +galaxy2   kegalign 0.3.2+galaxy1

The reason to carry old revisions is that removing an installed one
breaks the histories and workflows that ran against it. Neither applies
here: usegalaxy.org currently has kegalign 0.3.1+galaxy0 and
batched_lastz 1.04.22+galaxy8, and growler_lastz not at all. Listing 19
would install three tool versions nobody has ever used, one of which
does its final gzip at level 6 rather than level 1.
chainMergeSort had no Galaxy tool anywhere -- absent from tools-iuc,
which wraps nine other UCSC chain tools, from the Tool Shed, and from
this file. The Growler per-pair wrapper cannot run without it: it is
where the chromosome-pair axis collapses back into one score-ordered
stream, and chainPreNet and chainNet cannot be partitioned by chromosome
because each walks one stream marking target and query space
simultaneously.

It is a SEPARATE shed repository from kegalign, so the kegalign entry in
this file does not cover it.

  ucsc_chainmergesort  richard-burhans  rev 9e355f0c9f46  482+galaxy0

The collapse it performs is measured exact against chaining a genome
pair whole: 28 real Cannabis chromosome pairs, 17,696 chains, identical
chain bodies. And its renumbering is load-bearing -- -saveId leaves
15,691 colliding chain ids out of those 17,696, which netChainSubset
resolves by id.
@richard-burhans richard-burhans changed the title Add kegalign revision 9fdb7d427703 to the Mapping section Add kegalign and ucsc_chainmergesort to the Mapping section Sep 19, 2026
Richard Burhans added 2 commits September 19, 2026 10:09
Swaps 49249635e892 (numeric 20) for e288740b966a (numeric 22). Neither
has ever been installed, so nothing depends on the older one, and 22
supersedes it in every tool:

  rev 20   batched_lastz 1.04.52+galaxy4   growler_lastz +galaxy2   kegalign 0.3.2+galaxy1
  rev 22   batched_lastz 1.04.52+galaxy6   growler_lastz +galaxy3   kegalign 0.3.2+galaxy2

The difference that matters is batched_lastz. Its final step concatenates
every per-command alignment into one gzip stream, and that single write
is ~62% of the job's wall clock -- measured twice, on inputs differing
9x. Revision 20 does it with Python's gzip at level 1; revision 22 pipes
it through pigz across the job's whole slot budget, which is idle by
then because the compute workers have finished.

Measured on 1.69 GB of real alignment output:

  the original, gzip -6     18 MB/s
  revision 20, gzip -1     137 MB/s
  revision 22, pigz -1    2456 MB/s standalone, 997 MB/s end to end
                          through the tool, 6.6x over revision 20

Installing 20 as well would add three tool versions nobody has used, one
of which is strictly slower at the step that dominates the job.
scripts/fix_lockfile.py takes the SOURCE .yml and writes the .lock
beside it -- the Makefile feeds it `find -name '*.yml'`. I ran it on the
.lock file instead, so it treated that as a source and generated
mapping.yml.lock.lock, 322 lines of duplicate.

⚠ Which also means the three times I ran it "to validate" the lock
validated nothing: it was generating a new file each time, not checking
the one I had edited.

The check it should have been is `fix_lockfile.py usegalaxy.org/mapping.yml`
followed by a diff, and that now passes: the generated lock is
byte-identical to the hand edit, so both entries -- ucsc_chainmergesort
and the kegalign revision swap -- are exactly what the tooling produces.
@richard-burhans
richard-burhans enabled auto-merge (squash) September 19, 2026 17:32
Revision 22 was pinned before KegAlign v0.3.3 existed. Revision 23
published while this PR was open and is a strict improvement, so this
swaps rather than adds -- there is no reason to install 22 at all.

Revision 23 carries all three tools in the repository:

    kegalign        0.3.3+galaxy0
    batched_lastz   1.04.52+galaxy7
    growler_lastz   1.04.52+galaxy4

0.3.2's container ships the buffered build_pairs.py, whose measured peak
RSS is 52.4 MB + 1.96 x (input MB) -- about 28 GB for a 14.15 GB bundle,
and OOM-killed on a 15 GB machine. The tool invokes exactly that path.
0.3.3 is the first release whose collection output survives a real
genome pair.

All three containers resolve today:

    kegalign-full:0.3.3--hdfd78af_0
    mulled-v2-22e8b6fd71e23314d99ed252d036fc77e59901b5:528c639a...-0
    lastz:1.04.52--h7b50bb2_1

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@richard-burhans

Copy link
Copy Markdown
Member Author

Repointed from kegalign revision 22 (e288740b966a) to revision 23 (69c1842fdb17), which published while this PR was open. Swapped rather than added — there is no reason to install 22.

Revision 23 carries all three tools in the repository:

tool version
kegalign 0.3.3+galaxy0
batched_lastz 1.04.52+galaxy7
growler_lastz 1.04.52+galaxy4

Why 0.3.3 rather than 0.3.2. 0.3.2's container ships the buffered build_pairs.py — verified in the artifact, not inferred from the tree:

docker run quay.io/biocontainers/kegalign-full:0.3.2--hdfd78af_0
  grep -c "def stream_pairs" $KEGALIGN_BIN/build_pairs.py   ->  0

Measured peak RSS for that path is 52.4 MB + 1.96 × (input MB) — ~28 GB extrapolated for a 14.15 GB bundle, and OOM-killed on a 15 GB machine. The tool invokes exactly that path (build_pairs.py --segments-dir .), so 0.3.3 is the first release whose collection output is usable on a real genome pair.

All three containers resolve today:

kegalign        kegalign-full:0.3.3--hdfd78af_0
batched_lastz   mulled-v2-22e8b6fd71e23314d99ed252d036fc77e59901b5:528c639a1084f42d303ce636b563e1bdcff31afe-0
growler_lastz   lastz:1.04.52--h7b50bb2_1

(The batched_lastz mulled image comes from BioContainers/multi-package-containers#4178, merged. Hash computation checked against a positive control before trusting it.)

Diff is one line swapped for one line; ucsc_chainmergesort is unchanged.

🤖 Generated with Claude Code

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.

1 participant