Repository navigation
Giraffe server engine - #4879
parsaeskandar wants to merge 57 commits into
Conversation
Refactor Giraffe usage into a reusable in-process engine that loads indexes once and maps batched reads repeatedly, and add a giraffe-server subcommand with framed output/flush control for stable middleware request-response behavior.
adamnovak
left a comment
There was a problem hiding this comment.
@parsaeskandar You wanted me to check this for overly tight coupling to what Giraffe does. I don't think it should have to change too much when Giraffe changes. We won't be able to avoid touching it if we e.g. add a new thing MininizerMapper needs to have loaded in order to work, but I'm not sure there's a great way to avoid that.
But I think you might not connect to the Giraffe machinery quite enough, because there's no way here to e.g. set the mapping parameters that need to change between HiFi and R10 reads (and there's no code to set them to good values for pretending to be BLAT). I'm not sure we're even turning on the chain-based mapping. The Giraffe preset system is all tied in with its option parsing system, which makes using it from here difficult, but maybe it needs to be broken out somehow?
There also seems to be a profusion of little classes defined mostly in relation to each other, like HaplotypeSurjectionResult and GiraffeEnginePaths, which could do with more explanation of what they really represent or mean for someone who does not, to begin with, care about a HaplotypeSurjector or a GiraffeEngine.
# Conflicts: # autocomp.bash # autocomplete.sh
scripts/lint.py (formerly check_options.py) now also requires every subcommand in doc/vgmanmd.desc.md and doc/vgmanmd.py. That check arrived with the merge of master, so make test has failed on this branch since then. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolves the doc/vgmanmd.py conflict (upstream deprecated genotype and viz; keep giraffe-server in the list) and follows upstream's rename of min_chains -> target_alignment_attempts in the engine's hifi and blat presets, without which the engine no longer compiles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d make the blat preset report near-best copies with length-independent MAPQ
…s up the mapper after load
…GAF lines instead of the engine
…framed-output is gone
…g the whole batch
…- old thread pools junk gone
…stead of hanging or aborting
…nd the server names the haplotypes when it writes the tags
…rl boundaries in a method of its own
|
Thanks @adamnovak. I went through all of the code by hand this time. Here is a summary of what changed:
|
|
I also hand copied this into the giraffe-server-engine branch so the tests can run. |
Changelog Entry
To be copied to the draft changelog by merger:
vg giraffe-serversubcommand that loads the Giraffe indexes once and maps queries streamed on stdin, with optional surjection onto any haplotype path.vg giraffepresetblat, which reports up to 20 near-best alignments with MAPQ independent of query length.Description
This PR adds a server-oriented in-process Giraffe mapping API and extends giraffe-server to emit structured graph-path payloads that middleware can forward to coordinate-translation code.