Skip to content

[OC-833b] parallelize oc util mergesqlite - #422

Open
cvaske wants to merge 3 commits into
cvaske/cv-OC-833-postagg-recomputefrom
cvaske/cv-OC-833-mergesqlite-parallel
Open

[OC-833b] parallelize oc util mergesqlite#422
cvaske wants to merge 3 commits into
cvaske/cv-OC-833-postagg-recomputefrom
cvaske/cv-OC-833-mergesqlite-parallel

Conversation

@cvaske

@cvaske cvaske commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Optional PR adding a parallel implementation of oc util mergsqlite, by partitioning the merge on chromosomes. In testing, this improved performance ~2x with 4 CPUs available. The postaggregator step still runs single threaded, but variant merging happens much faster.

This PR is dependent upon a change in the vcfinfo module here: KarchinLab/open-cravat-modules-karchinlab#66

Adds `--parallel`/`--workers N` to `oc util mergesqlite`: shards the
structural merge and postaggregator recompute by chromosome
(ProcessPoolExecutor), then concatenates shards and renumbers uids
globally. Gene table is merged once, globally, instead of per shard.
casecontrol is not supported in --parallel mode (hard error if it would
otherwise run); vcfinfo's multi_sample now comes from vcfinfo's own
--confs override instead of a monkeypatch.
cvaske added 2 commits August 28, 2026 20:49
Previously, chromosomes were divided one bucket per processor, and
each processor was pre-assigned a bucket. Unequal buckets led to
inefficient work division and longer wall-time runs.

Now, there's a work queue were each job is one chromosome, leading
to more efficient division of work.

Additionaly, the serial writing of chromosomes into the final file
begins as soon as the first chromosome is finished, leading to an
earlier start to the long serial process, and a far quicker finish
to the overall process.
@cvaske
cvaske changed the base branch from master to cvaske/cv-OC-833-postagg-recompute August 29, 2026 04:48
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